---
title: Depth-guided Parallel Adapters (DPAs)
url: https://www.emergentmind.com/topics/depth-guided-parallel-adapters-dpas
type: topic
---

# Depth-guided Parallel Adapters (DPAs)

Depth-guided Parallel Adapters (DPAs) are lightweight architectural modules designed for efficient multi-modal feature fusion between RGB and depth representations, particularly within powerful frozen vision transformers such as the Segment Anything Model (SAM). They are introduced to overcome the inherent limitations of foundation vision models in tasks like camouflaged object detection (COD) and RGB-D video salient object detection by leveraging complementary spatial and geometric cues from depth without compromising memory or computation overhead. DPAs are mounted in parallel, skip-connection fashion to the main backbone, enabling prompt-free and parameter-efficient adaptation to new tasks while significantly enhancing segmentation accuracy on complex benchmarks [2503.06042][2511.09870].

## 1. Parallel Adapter Architecture and Integration

Depth-guided Parallel Adapters are inserted alongside frozen transformer backbones (e.g., ViT in SAM, or Hiera in SAM2). Their design is characterized by parallel branches for RGB and depth (or for their concatenation), each flowing in parallel and interfacing through skip connections with the frozen feature extractors.

In one paradigm [2503.06042], the architecture maintains separate RGB and depth streams with dedicated adapter modules for each modality. For a given block ℓ, the process is:
- Each modality input $X_{\ell-1}^m$ ($m\in\{\text{RGB},\text{Depth}\}$), with $X\in\mathbb{R}^{N\times C}$.
- Adapter is a two-layer MLP bottleneck $(C\to d\to C)$ applied to modality-specific high-frequency features extracted via 2D Haar Discrete Wavelet Transform (DWT).
- Output is added residually to the input, yielding refined $X_\ell^m$ for the next block.

Alternatively, in a multi-modal fusion context [2511.09870], the DPA concatenates $F_\text{RGB}^{i-1}$ and $F_D^{i-1}$ along channel dimensions. The concatenated tensor launches into a bottleneck adapter (Linear↓–GeLU–Linear↑), followed optionally by spatial downsampling. The output is then summed with the corresponding frozen backbone stage output, yielding $F_\text{RGB}^i = \mathrm{Hiera}^i(F_\text{RGB}^{i-1}) + \mathrm{DS}(\widetilde F_\text{RD}^{\,i-1})$.

## 2. Mathematical Formulation and Bottleneck Design

The essential function of a DPA is to inject trainable, low-rank corrections into frozen feature maps via lightweight bottlenecked projections:
- Channel fusion stage: $\mathrm{Cat}(F_\text{RGB}^{i-1}, F_D^{i-1})$
- Down-projection: $2C_i \to C_i/r$ (bottleneck, $r\geq4$)
- Nonlinearity: GeLU (or ReLU, depending on variant)
- Up-projection: $C_i/r \to C_i$
- Residual addition: output is added to the transformer's output at each targeted layer.

In SAM-COD [2503.06042], the adapter operates directly on high-frequency content extracted by DWT. For each token embedding:
\[
X_{Hf}^{m} = \sqrt{LH^2 + HL^2 + HH^2}
\]
where $LH$, $HL$, and $HH$ are the Haar high-frequency subbands. This processed map is then bottlenecked and residually added back.

In SAM-DAQ [2511.09870], no explicit frequency separation is performed; instead, direct spatial fusion via concatenation and MLP bottleneck suffices, enabling general applicability to video-salient detection.

## 3. Placement and Skip-connection Strategies

DPAs are always deployed in parallel to frozen transformer blocks, ensuring:
- Gradients flow exclusively through the small adapter modules and their adjacent normalization layers (not through the backbone), containing training-time activation memory.
- Both per-modality processing (as in dual-stream) and cross-modal fusion (as in concatenation-adapter) are possible depending on downstream task requirements.
- In practice, DPAs are placed after the first block and replicated at each deeper stage/block, enabling hierarchical depth-guided refinement.

In the Parallel Adapter-based Multi-modal Image Encoder (PAMIE) of SAM-DAQ, DPAs appear at stages $i=2,3,4$ of the Hiera encoder. Each DPA adds its output to the corresponding backbone stage, facilitating prompt-free training and streamlined inference.

## 4. Training Paradigms and Loss Functions

The DPA-empowered frameworks are optimized using task-specific loss functions, often jointly supervising both RGB and depth predictions:
- In SAM-COD [2503.06042]: Joint Dice and Cross-Entropy segmentation losses per stream, plus a KL divergence-based distillation objective to enable bidirectional knowledge transfer. The total loss combines segmentation ($\mathcal{L}_{\mathrm{DiceCE}}$) and distillation ($\mathcal{L}_{\mathrm{KD}}$), typically as:
\[
\mathcal{L} = \lambda\,\mathcal{L}_{\mathrm{DiceCE}} + (1-\lambda)\mathcal{L}_{\mathrm{KD}},\quad\lambda=0.9
\]
- KL distillation is employed both from a teacher model (e.g., pretrained PVTv2 for RGB) and between streams (RGB $\to$ Depth) to align representations and promote stronger multi-modal coupling.
- In SAM-DAQ [2511.09870], training is prompt-free: the DPAs serve as the mechanism for injecting “self-prompted” depth cues into a frozen SAM2 encoder, requiring no manual box/point annotations.

The only trainable parameters are those of (a) DPAs (adapter MLPs), (b) adjacent normalization, (c) prompt encoder convs (in mask prediction), and (d) mask decoders.

## 5. Empirical Effectiveness and Efficiency

Both SAM-COD and SAM-DAQ demonstrate that DPAs yield significant performance improvements with modest parameter overhead:

- On COD10K, deploying dual-stream DPAs with bidirectional knowledge distillation and mixed-prompt embedding leads to $F^{\omega}\approx0.887$, $S_m\approx0.948$, $E^x\approx0.972$, outperforming vanilla SAM by up to +10.4% $F^{\omega}$ [2503.06042].
- Ablations reveal that DPAs alone account for $+5.9\%$ $F^{\omega}$ gain, while knowledge distillation and hybrid prompting contribute further additive improvements.
- In SAM-DAQ, full DPA-equipped PAMIE achieves $E_\xi=0.913$, outperforming variants lacking depth, parallelization, or multi-modal fusion by notable margins. Memory usage remains as low as $\sim21$ GB, compared to >90 GB for sequential or LoRA-based alternatives [2511.09870].

Quantitative ablation summary from [2511.09870]:

| Adapter Variant             | Trainable/Total Params | GPU Mem (GB) | $E_\xi$$\uparrow$ | $S_\alpha$$\uparrow$ | $F_\beta$$\uparrow$ | $M$$\downarrow$ |
|-----------------------------|-----------------------|--------------|------------------|---------------------|-------------------|---------------|
| w/o depth projector         | —         / 237.9M      | 20.3         | 0.899            | 0.870              | 0.808             | 0.023         |
| w/o parallel (sequential)   | 17.4M     / 236.0M      | 91.9         | 0.860            | 0.830              | 0.778             | 0.028         |
| w/o parallel (LoRA)         | 56.0M     / 274.6M      | 95.0         | 0.889            | 0.877              | 0.824             | 0.027         |
| w/o multi-modal fusion      | —         / 237.9M      | 17.9         | 0.876            | 0.853              | 0.782             | 0.029         |
| Ours (parallel DPA + depth) | 19.2M     / 237.9M      | 21.0         | 0.913            | 0.879              | 0.827             | 0.026         |

## 6. Design Implications and Practical Considerations

DPAs add only a small overhead to model size (typically a few percent per block, ∼8% total in SAM-DAQ), making them highly appealing for large-scale deployments. Gradient routing solely through adapters minimizes computational overhead, enabling high-resolution (e.g., $1024\times1024$) training on commodity GPUs. The parallel, skip-connection topology is central for limiting backward-pass memory.

DPAs facilitate scenarios that previously suffered from foundation model inflexibility:
- Robust prompt-free adaptation, where no manual annotation is required, as the adapters themselves “guide” the backbone with depth.
- Parameter-efficient specialization for modalities like RGB-D, especially critical in tasks like camouflaged or salient object detection where spatial/geometric cues are complementary.

A plausible implication is that DPA-style adapters may generalize to audio-visual or multi-sensor fusion domains with similar design logic.

## 7. Impact and Context within Multi-modal Transfer

DPAs mark a distinct trend toward minimally invasive multi-modal adaptation strategies for frozen vision transformers. Rather than retraining or unfreezing large pre-trained backbones, performance-critical applications can be realized by injecting highly specialized adapters in parallel, demonstrating high sample efficiencies and superior performance with minimal hardware requirements [2503.06042][2511.09870].

The explicit demonstration of prompt-free, depth-guided fine-tuning establishes a new baseline for resource-constrained and annotation-limited environments. DPAs' design also avoids the marked performance/memory trade-offs observed for sequential adapters or LoRA-based solutions, as confirmed by ablation studies.

These results situate DPAs as a compelling architectural primitive for vision foundation models, with empirical evidence for their criticality in bridging inter-modality gaps and achieving state-of-the-art segmentation.

Source: https://www.emergentmind.com/topics/depth-guided-parallel-adapters-dpas