Spatial Pattern Adapter: Key Techniques
- Spatial Pattern Adapter is a descriptive umbrella for modules that incorporate explicit spatial inductive bias into frozen predictors using techniques like CNN heads and dual-kernel convolutions.
- Core architectural principles include receptive-field engineering, separation of local and global structure, and structured latent residual modeling for effective adaptation.
- Empirical evidence shows SPA variants boost performance in low-data regimes and specialized tasks while remaining parameter-efficient compared to full fine-tuning.
Spatial Pattern Adapter (SPA) is not a uniformly standardized term in the recent literature. A plausible umbrella usage is to denote an adapter module whose primary inductive bias is the modeling and transformation of spatial structure—such as local textures, multi-scale feature maps, effective receptive field, channel topology, or spatial residual covariance—while a pretrained predictor remains frozen or largely unchanged. Under that interpretation, several distinct lines of work instantiate the idea through locally-aware spatial branches in Vision Transformers, dual-kernel convolutional adapters, spatial–temporal gating over multichannel signals, and post-hoc residual-field decompositions with explicit covariance models (Shao et al., 2023, Zhu et al., 21 Feb 2026, Shook et al., 13 Nov 2025, Wang et al., 12 May 2026).
1. Terminology, scope, and disambiguation
The phrase “Spatial Pattern Adapter” is best treated as a descriptive umbrella rather than a canonical paper title. In “DeepFake-Adapter: Dual-Level Adapter for DeepFake Detection,” the term used for the spatial module is “Locally-aware Spatial Adapter (LSA),” with subparts LSA-H and LSA-I; the paper explicitly states that “Spatial Pattern Adapter” is never used as a name, although LSA is the spatial adaptation mechanism of the method (Shao et al., 2023). In “Dual-Kernel Adapter: Expanding Spatial Horizons for Data-Constrained Medical Image Analysis,” the paper states that a Spatial Pattern Adapter can be understood conceptually as any adapter whose main inductive bias concerns how spatial patterns are modeled and transformed rather than just channel-wise reweighting, and presents Dual-Kernel Adapter (DKA) as a concrete spatially focused instance (Zhu et al., 21 Feb 2026).
Two prominent acronym collisions are essential to distinguish. In “Structured Pruning Adapters,” SPA stands for “Structured Pruning Adapters,” not “Spatial Pattern Adapter”; the method concerns parameter-efficient structured pruning and fusible low-rank updates rather than explicit spatial pattern modeling (Hedegaard et al., 2022). In “SPA: 3D Spatial-Awareness Enables Effective Embodied Representation,” SPA denotes “3D SPatial-Awareness,” and the paper is a representation-learning framework built around multi-view differentiable rendering, not an adapter module in the PEFT sense (Zhu et al., 2024).
This terminological fragmentation has substantive consequences. Some papers use “spatial” to mean local image evidence, some to mean multi-scale receptive field control, some to mean electrode-wise topology in time series, and some to mean residual structure over Euclidean spatial coordinates. The shared theme is not a single architecture, but the explicit introduction of spatial inductive bias into a frozen or otherwise fixed upstream predictor.
2. Core architectural principles
Across the cited works, SPA-like modules are defined less by a single operator than by a recurring set of design commitments. First, the backbone is typically frozen. DeepFake-Adapter freezes ViT-Base, including patch embedding, positional embeddings, and all transformer block parameters, while training only Globally-aware Bottleneck Adapters (GBA), Locally-aware Spatial Adapters (LSA), and the classifier (Shao et al., 2023). DKA is inserted into ViT-B, Swin-T/B, Segmenter-B, RadImageNet-ResNet-50, MedSAM, and MedCLIP with all backbone weights frozen (Zhu et al., 21 Feb 2026). STAMP uses a frozen pretrained TSFM as a univariate feature extractor for EEG and trains only the adapter stack on top (Shook et al., 13 Nov 2025). The Spatial Adapter of residual fields freezes a first-stage predictor and learns a second-stage adapter on residuals without modifying any first-stage parameter (Wang et al., 12 May 2026).
Second, spatial structure is made explicit in the adapter path. In DKA, token features are down-projected, reshaped to a 2D grid, passed through a depthwise convolution and a depthwise convolution, summed, activated with GELU, up-projected, and added residually:
This formulation makes receptive-field control the central design variable rather than a side effect of generic token-space MLPs (Zhu et al., 21 Feb 2026).
Third, several SPA-like methods separate local and global structure. DeepFake-Adapter pairs GBA, which targets global low-level cues, with LSA, which targets local low-level forgeries through a CNN head and stage-wise cross-attention (Shao et al., 2023). DKA uses a dual-kernel decomposition in which the branch preserves local detail and the branch expands spatial context (Zhu et al., 21 Feb 2026). STAMP factorizes spatial and temporal interactions through separate gating units and , then recombines them within each CC-GMLP block (Shook et al., 13 Nov 2025).
Fourth, SPA-like methods often expose a structured latent representation rather than only a feature correction. The Spatial Adapter on residual fields writes the latent field as
where are spatial basis functions and 0 are per-sample scores. Smoothness, sparsity, and orthogonality constraints make the decomposition identifiable and induce a closed-form low-rank-plus-noise spatial covariance (Wang et al., 12 May 2026). This suggests that, in some settings, the adapter is not merely a task-conditioning device but also a statistical model of spatial structure.
3. Locally-aware spatial adapters in vision transformers
DeepFake-Adapter provides a canonical image-domain example of a spatially focused adapter integrated into a frozen ViT. The architecture is explicitly dual-level. GBA modules are inserted after each MHSA and in parallel to each MLP, while the spatial branch is implemented by LSA, consisting of a convolutional head part (LSA-H) and an interaction part (LSA-I) that performs multi-head cross-attention between spatial CNN features and ViT features at each stage (Shao et al., 2023).
LSA-H runs in parallel to the ViT patch embedding and extracts multi-scale spatial feature maps from the input image using a ResNet-like CNN. For a 1 input, the base stem produces feature maps at 112 and 56 spatial resolution, followed by Conv-1, Conv-2, and Conv-3 blocks yielding 2, 3, and 4 maps. Projection blocks map each resolution to the ViT embedding dimension 5, and the three projected maps are flattened and concatenated into
6
with downsampling ratios 7 (Shao et al., 2023).
LSA-I then enforces bidirectional, stage-wise interaction. At stage entry, ViT tokens query spatial tokens:
8
After the ViT blocks of the stage, spatial tokens query the updated ViT tokens:
9
The ViT has 12 blocks divided into 0 stages, each with 1 blocks, and each MHCA uses 2 heads (Shao et al., 2023).
The trainable parameter budget is substantial but still parameter-efficient relative to full ViT adaptation. ViT-Base has 85.8M parameters; GBA contributes 1.19M, LSA contributes 15.73M, and the total trainable parameters are 16.92M, approximately 19.7% of the ViT parameters (Shao et al., 2023). Ablation under cross-manipulation evaluation shows that LSA alone already yields large gains over linear probing. For example, when trained on DF and tested on DF/FS, the baseline without GBA and LSA reports 91.41/67.20 AUC, whereas “only LSA” yields 99.19/73.16. When trained on FS and tested on DF/FS, the baseline reports 75.49/80.41, whereas “only LSA” yields 87.65/98.55 (Shao et al., 2023). The full model reaches 79.51 AUC for train-on-DF, test-on-FS and 88.57 AUC for train-on-FS, test-on-DF, exceeding the best baseline values reported in the same comparisons (Shao et al., 2023).
Qualitative analyses align with the architectural intent. The paper reports that ViT+LSA attention maps highlight patches within face regions such as eyes, cheeks, and mouth, reflecting local texture artifacts, while ViT+GBA emphasizes more global contours. This is a direct operationalization of a spatial pattern adapter as a localized-forgery extractor coupled to a frozen semantic backbone (Shao et al., 2023).
4. Receptive-field engineering and dual-kernel spatial adapters
DKA frames spatial adaptation in terms of effective receptive field (ERF), especially under extreme data scarcity in medical imaging. The paper reports that conventional adapters can degrade performance under severe data constraints and may perform worse than linear probing when trained on less than 1% of the corresponding training data. It identifies a sharp reduction in ERF as a key factor behind this degradation (Zhu et al., 21 Feb 2026).
The adapter is inserted twice per transformer block in the pattern 9 with all backbone parameters frozen and only DKA modules and the task head trainable. Internally, DKA uses a spatial dual-kernel structure: linear down-projection to 3, reshape to a 2D grid, parallel depthwise convolutions with kernel sizes 4 and 5, elementwise sum, GELU, linear up-projection, and residual addition (Zhu et al., 21 Feb 2026).
The empirical interpretation is explicit. The 6 branch expands global context, the 7 branch preserves local detail, and the sum
8
acts as a multi-scale spatial pattern model. Frequency-domain analysis in the appendix further supports this division: 9 kernels have higher spectral centroid 0, while 1 kernels have lower 2, biasing them toward global information (Zhu et al., 21 Feb 2026).
The performance evidence is strongest in low-data regimes. With ViT-B on COVID at 0.63% data, linear probing reaches 86.84% ACC, Adapter 83.29%, Convpass 84.72%, Full FT 87.43%, and DKA 89.01%. On BUSI at 0.63%, the corresponding numbers are 73.48%, 63.18%, 64.83%, 71.17%, and 74.23%. On ISIC-2019 at 0.63%, they are 59.15%, 52.77%, 54.72%, 60.04%, and 60.52% (Zhu et al., 21 Feb 2026). In segmentation with Segmenter-B at 0.63% data, DKA similarly exceeds linear probing, Adapter, Convpass, and Full FT across BRATS, BUSI, and ISIC-2018, with mIoU values 9.47, 26.85, and 63.13 respectively (Zhu et al., 21 Feb 2026).
The adapter remains parameter-efficient despite its large kernels because the convolutions are depthwise and the bottleneck dimension is small. The paper states that “Even with two kernels, the total trainable parameters introduced by all DKA modules remain less than 2% of the pretrained backbone” (Zhu et al., 21 Feb 2026). Ablations also show that performance gains are primarily due to spatial design rather than raw parameter count: increasing kernel size from 11 to 51 yields steeper gains than merely increasing 3 to match parameter budgets (Zhu et al., 21 Feb 2026). A plausible implication is that, for SPA design, explicit ERF engineering can be a more decisive intervention than generic bottleneck widening.
5. Spatial–temporal and residual-field formulations
STAMP extends the SPA idea to multichannel EEG modeled on top of a frozen univariate time-series foundation model. EEG recordings 4 are segmented into non-overlapping 1-second windows of length 5, yielding 6. Each token 7 is passed through a frozen pretrained TSFM to obtain 8, assembled into 9, and linearly compressed to 0 (Shook et al., 13 Nov 2025).
Spatial pattern modeling enters through positional encodings and CC-GMLP. STAMP learns spatial embeddings 1, temporal embeddings 2, and token-wise embeddings 3, combining them as
4
Within each CC-GMLP block, the core spatial operator is the spatial gating unit
5
where 6 mixes channels along the spatial axis. A corresponding temporal gating unit 7 acts along the time axis, and their outputs are concatenated and projected back. The model stacks 8 such blocks and then applies Multi-Head Attention Pooling (MHAP) to aggregate the 9 grid into a trial representation (Shook et al., 13 Nov 2025). STAMP contains approximately 0.7–0.8M parameters at 0, whereas EEG foundation models such as CBraMod are reported at about 25–46M and LaBraM-Base at about 5.8M (Shook et al., 13 Nov 2025). The reported comparisons show that STAMP often matches or exceeds EEGFMs on motor imagery, cognitive tasks, and clinical event detection, though it underperforms on emotion recognition datasets (Shook et al., 13 Nov 2025).
The Spatial Adapter of frozen predictors moves SPA into statistical spatial modeling. Instead of inserting a module inside a backbone, it learns a post-hoc low-rank residual decomposition on top of a frozen first-stage predictor. The residual field is expressed through a spatial basis 1 and per-sample scores 2, with objective
3
where 4 is a thin-plate spline roughness matrix and 5 (Wang et al., 12 May 2026). Training uses a tractable mini-batch ADMM procedure with a closed-form Gaussian consensus update
6
The resulting covariance estimator is
7
which supports kriging-style prediction and plug-in uncertainty quantification at unobserved locations (Wang et al., 12 May 2026).
Empirically, the Spatial Adapter recovers residual spatial structure across synthetic data, Weather2K, and GWHD patch grids. In the synthetic rank-1 setting, CovFrob error versus the true covariance is 0.847 for OLS, 0.025 for the unregularized adapter, and 0.018 for the regularized adapter. On Weather2K spatial-holdout prediction, held-out station RMSE drops from 7.667 for STDK alone to 2.705 for SPA unregularized and 2.664 for SPA regularized. In GWHD, adapter overhead ranges from 0.009% to 0.32% of the frozen backbone parameter count, depending on the backbone (Wang et al., 12 May 2026). This widens the SPA concept beyond feature adaptation into structured residual modeling.
6. Empirical regularities, misconceptions, and related non-adapter usages
Several empirical regularities recur across these works. Spatially focused adapters tend to be most valuable when the frozen backbone is strong but spatial inductive bias is deficient or task-misaligned. In DeepFake-Adapter, the frozen ViT contributes generalizable high-level semantics while LSA supplies local forgery cues (Shao et al., 2023). In DKA, standard adapters can underperform linear probing in severe low-data regimes, and explicit large-kernel spatial context reverses that behavior (Zhu et al., 21 Feb 2026). In STAMP, a frozen univariate TSFM becomes competitive on multichannel EEG tasks only after a dedicated spatial–temporal adapter learns cross-channel patterns (Shook et al., 13 Nov 2025). In the Spatial Adapter, a frozen predictor can remain unchanged while residual spatial structure is recovered post hoc and converted into a low-rank covariance (Wang et al., 12 May 2026).
Common misconceptions follow directly from acronym reuse. “Structured Pruning Adapters” are not spatial adapters: the paper states that SPA means Structured Pruning Adapters, and its concrete instantiation, SPLoRA, is a channel-based pruning-aware low-rank adapter fused into a structured-pruned dense model for efficient inference (Hedegaard et al., 2022). Likewise, “SPA: 3D Spatial-Awareness Enables Effective Embodied Representation” is not an adapter layer. It is a pretraining framework in which a vanilla ViT is trained through multi-view differentiable neural rendering, dynamic 3D feature volumes, and SDF-based supervision. The strongest model uses more than 6000 GPU hours to train, and SPA achieves Mean S.R. 88.63 and Mean Rank 3.20 across 268 tasks, but these results concern 3D-aware representation learning rather than parameter-efficient spatial adaptation (Zhu et al., 2024).
The current SPA-like literature also exposes domain-specific limitations. DeepFake-Adapter’s spatial module is tailored to forgery cues such as local textures and blending artifacts and is evaluated within deepfake detection (Shao et al., 2023). DKA shows that kernel scale must be tuned: kernels that are too small or too large degrade performance, and adaptive gating over scales can be slightly worse under 0.63–1.25% data than a fixed 8 configuration (Zhu et al., 21 Feb 2026). STAMP models channel relations through dense spatial mixing matrices but does not encode explicit 3D scalp geometry or local electrode neighborhoods (Shook et al., 13 Nov 2025). The Spatial Adapter assumes Euclidean spatial coordinates, a low-rank-plus-noise working covariance model, and a nonconvex stochastic three-block ADMM procedure without global convergence guarantees (Wang et al., 12 May 2026).
Taken together, these results suggest that “Spatial Pattern Adapter” is most useful as a cross-domain descriptor for modules that inject structured spatial bias into frozen predictors. The specific implementation can take the form of a CNN token stream with cross-attention, a dual-kernel depthwise bottleneck, a channel-axis gating operator over multivariate time series, or an orthonormal residual basis with closed-form covariance. What unifies them is not a single acronym, but the insistence that spatial organization be modeled explicitly rather than left to emerge implicitly from generic bottleneck adaptation.