Skip to content

Structured Hyperedge Adaptation for Parameter-Efficient Fine-Tuning of Vision Transformers

Conference: ECCV 2026
arXiv: 2606.22383
Code: Not provided
Area: Model Compression / Parameter-Efficient Fine-Tuning
Keywords: PEFT, Adapter, Hypergraph, Hyperedge space, Structured inductive bias

TL;DR

This work shifts the adapter fine-tuning of ViTs from "individual token-wise updates" to a "hyperedge space." First, patch tokens are softly routed into several groups (hyperedges) using learnable prototypes. Then, low-rank bottleneck adaptation is conducted on these hyperedges, and finally, the updates are diffused back to the tokens. This achieves a significant accuracy boost in structured reasoning tasks on VTAB-1K with a minimal parameter footprint (<0.5% of the backbone).

Background & Motivation

Transferring large-scale pre-trained ViTs to downstream tasks via full fine-tuning is computationally expensive and memory-intensive, which is particularly impractical when a single backbone needs to serve dozens of tasks simultaneously. Parameter-Efficient Fine-Tuning (PEFT) has thus emerged as a dominant practice: freezing the backbone and training only a tiny fraction of parameters. Among these, adapter-based methods (such as Houlsby Adapter, AdaptFormer, Convpass, and RepAdapter) are highly popular due to their modularity and plug-and-play nature. They insert a lightweight bottleneck module \(\Delta{\bm{x}}_i = {\bm{W}}_{\text{up}}\sigma({\bm{W}}_{\text{down}}{\bm{x}}_i)\) into each transformer block to refine intermediate representations. Low-rank reparameterization methods like LoRA follow a conceptually similar logic.

However, the authors notice a common, almost unquestioned assumption in these methods: adaptation is performed independently for each token. The same bottleneck transformation is applied to each patch embedding in isolation. Although the frozen self-attention layers indeed encode contextual interactions among tokens, the adaptation action itself remains strictly token-wise. This assumes feature refinement should occur inherently in the token space, failing to explicitly model the structural relationships naturally present in visual scenes. In reality, image tokens often correspond to coherent regions, such as an object, a part, or a semantic component. Under this isolated token-wise updating scheme where each token only updates itself, tokens belonging to the same object are adapted independently, leading to redundant updates, spatially inconsistent refinements, and a waste of relational context in the scene.

The key challenge here is that visual features should ideally be refined collaboratively in "groups," whereas the mathematical formulation of current adapters locks each token into an isolated update unit. The authors suggest that the genuinely overlooked key dimension in PEFT is not "how many parameters to tune," but rather "in which space to adapt" (the adaptation space). The core idea is to perform adaptation not in the token space, but to softly group related tokens into hyperedges first, perform low-rank bottleneck adaptation in the hyperedge space, and then diffuse the updates back to the tokens along the hypergraph relation structure. This injects an explicit structured inductive bias into PEFT while fully preserving the low-rank properties, permutation equivariance, and modularity of standard adapters.

Method

Overall Architecture

HyperAdapter is a plug-and-play substitute for standard adapters. It keeps the backbone entirely intact and merely shifts the target of the bottleneck transformation from individual tokens to hyperedges. Given the patch tokens \({\bm{X}}_p\in\mathbb{R}^{N\times D}\) from a frozen ViT, the pipeline consists of four steps: ① Softly routing each token to several hyperedges using \(K\) learnable prototype vectors to obtain a soft relation matrix \({\bm{M}}\in\mathbb{R}^{N\times K}\); ② Aggregating token features weighted by \({\bm{M}}\) into \(K\) compact hyperedge representations \({\bm{H}}\); ③ Running a low-rank bottleneck adapter on the hyperedges to get \(\Delta{\bm{H}}\); ④ Diffusing updates back to the tokens along \({\bm{M}}\) and adding them as a residual to the original features. The CLS token does not participate in routing and only absorbs hyperedge information through an aggregation strategy at the very end. The module is inserted in parallel next to both the Attention and MLP branches.

Key to this formulation is that when each hyperedge contains exactly one token (\(K=N\), \({\bm{M}}={\bm{I}}_N\)), both aggregation and diffusion degenerate into identity mappings, and the entire method precisely reduces to standard token-wise adapters. Hence, HyperAdapter strictly generalizes existing adapters, treating standard implementations as a special case.

%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
    A["Frozen ViT patch tokens X_p"] --> B["Prototype Soft Routing<br/>Learnable Prototypes + Cosine Temperature<br/>Yields Soft Relation Matrix M"]
    B --> C["Hyperedge Aggregation<br/>Weighted Normalization by M<br/>Yields K Hyperedge Representations H"]
    C --> D["Low-Rank Adaptation in Hyperedge Space<br/>Bottleneck Adapter Yields ΔH"]
    D -->|Diffusion back to tokens along M| E["Structured Diffusion<br/>ΔX = M·ΔH<br/>Residual Addition + Learnable Scale α"]
    E --> F["Refined Token Representations"]

Key Designs

1. Reinterpreting the "adaptation space": shifting from token space to hyperedge space

This step is the foundational thesis of the paper, addressing a straightforward limitation: existing adapters update each token in isolation, ignoring the fact that "a group of tokens actually belongs to the same object/part," resulting in redundant and spatially inconsistent refinements. Instead of altering the attention mechanism or adding more parameters, the authors' approach changes the "space where adaptation occurs" so that a group of related tokens is refined jointly. This perspective is effective because it shifts structural relations from being "implicitly encoded by the backbone but ignored during adaptation" to "explicitly utilized during adaptation" while retaining all the benefits of PEFT (intact backbone, minimal parameters, modularity), only redefining the target of the bottleneck transformation. The paper elaborates this using a unified perspective: a token-wise adapter is a degenerated special case of HyperAdapter when "each hyperedge contains only a single token," demonstrating that this is not a built-from-scratch design but a generalization of existing designs into a broader framework.

2. Prototype-driven soft routing: grouping tokens into hyperedges by similarity instead of hard spatial partitioning

To perform adaptation in the hyperedge space, the first step is to determine "which tokens are grouped together." The authors introduce \(K\) learnable prototype vectors \({\bm{E}}\in\mathbb{R}^{K\times D}\) (initialized with Xavier and trained alongside the adapter parameters), serving as representatives of the latent hyperedges. Each token is softly assigned to the hyperedges based on its similarity to the prototypes, calculating the relation matrix using temperature-scaled cosine routing:

\[ {\bm{M}}_{ik}=\frac{\exp\!\left(\langle\hat{{\bm{x}}}_i,\hat{{\bm{e}}}_k\rangle/\tau\right)}{\sum_{j=1}^{K}\exp\!\left(\langle\hat{{\bm{x}}}_i,\hat{{\bm{e}}}_j\rangle/\tau\right)} \]

where \(\hat{{\bm{x}}}_i, \hat{{\bm{e}}}_k\) represent the normalized token and prototype, respectively, and \(\tau\) controls the softness of assignment. This allows each token to differentiably contribute to multiple hyperedges simultaneously. The ingenuity lies in avoiding artificial priors like spatial neighborhoods for grouping, instead allowing the token embeddings—already rich in semantic/spatial info in the pre-trained ViT—to decide similarity-based grouping dynamically and adaptively. The authors validate this in the appendix: even without explicit spatial supervision, the learned hyperedges naturally align with meaningful object regions, and deeper layers spontaneously group more tokens into fewer hyperedges (progressive specialization).

3. Hyperedge aggregation \(\rightarrow\) low-rank adaptation \(\rightarrow\) structured diffusion: sharing updates within groups

After obtaining the soft relation matrix, token features are first aggregated into hyperedge representations by computing a normalized weighted average of tokens assigned to each hyperedge: \({\bm{H}}=({\bm{M}}^\top{\bm{X}}_p)\oslash({\bm{M}}^\top\mathbf{1})\in\mathbb{R}^{K\times D}\). Here, each hyperedge represents a compact, group-level representation fusing multiple related tokens. Adaptation is performed solely on these \(K\) hyperedges via a lightweight bottleneck transformation \(\Delta{\bm{H}}={\bm{W}}_{\text{up}}\sigma({\bm{W}}_{\text{down}}{\bm{H}})\). Then, the updates are diffused back to each token along the relation structure and added residually: \(\Delta{\bm{X}}={\bm{M}}\Delta{\bm{H}}\), and \({\bm{X}}_p'={\bm{X}}_p+\alpha\Delta{\bm{X}}\) (where \(\alpha\) is a learnable scaling factor). Taken together, the entire token-level update can be formulated as a structured smoothing operator:

\[ \Delta{\bm{X}}={\bm{M}}\,{\bm{W}}_{\text{up}}\,\sigma\!\left({\bm{W}}_{\text{down}}\left({\bm{M}}^\top{\bm{X}}_p\right)\right) \]

This mathematically indicates that tokens belonging to the same hyperedge share the same update, yielding coherent, group-wise consistent feature refinements instead of disconnected ones. The authors support the efficacy of this step with two properties: first, the rank of the token-level update is at most \(\min(K, r)\) (where \(r\) is the bottleneck dimension), proving that it does not disrupt the low-rank nature of PEFT and remains parameter- and computation-efficient; second, the overall module is permutation equivariant with respect to tokens (since cosine routing preserves dot products under permutation, and aggregation and diffusion are independent for each hyperedge), which aligns with the intuition that visual tokens have "no fixed inherent order." In other words, it gains "structured group-level adaptation" without sacrificing the core advantages of low-rank structure and permutation equivariance of standard adapters.

Loss & Training

There are no auxiliary custom loss functions; standard downstream classification cross-entropy is used. The backbone is frozen throughout, with only the classification head and the HyperAdapter modules being trained. The default bottleneck rank is set to \(r=8\), and the number of hyperedges is \(K=8\) (\(K\) is fixed across datasets, while the routing temperature \(\tau\) is selected via the validation set). The optimizer is AdamW (weight decay \(1\times10^{-4}\)), with learning rates of \(1\times10^{-3}\) for VTAB-1K and \(5\times10^{-3}\) for FGVC, scheduled with cosine decay and a 10-epoch warmup over 100 epochs total. A batch size of 64 and input size \(224\times224\) are used, requiring only a single GPU. The modules are inserted in parallel next to both the Attention and MLP branches.

Key Experimental Results

Main Results

Using ViT-B/16 (pre-trained on ImageNet-21k) as the backbone, evaluations are performed on VTAB-1K (comprising 19 tasks categorized into Natural, Specialized, and Structured). Compared with strong PEFT baselines, HyperAdapter achieves an average accuracy of 77.6% with 0.44M trainable parameters, outperforming all competitors. The performance gains are most pronounced in the Structured category, which requires structured spatial reasoning (e.g., KITTI-Dist, dSpr-Loc, sNORB).

Method Params (M) Average Accuracy Gain
Full fine-tuning 85.8 68.9
Linear probing 0 57.6
LoRA 0.29 74.5
SSF 0.24 75.7
RepAdapter 0.22 76.1
Res-Tuning 0.55 76.3 Prev. SOTA
HyperAdapter (Ours) 0.44 77.6 +1.3

The conclusions hold consistent when switching to larger or different backbone architectures: it achieves 77.7% on ViT-L/16 (63.8% on Structured, with only 1.18M parameters, which is less than 0.5% of the backbone) and 77.6% on Swin-Base (63.0% on Structured, 0.60M parameters), demonstrating that the method is architecture-agnostic. On few-shot FGVC (5 fine-grained datasets, 1/2/4/8/16-shot settings), HyperAdapter achieves optimal or near-optimal results across almost all datasets and shot configurations, showing the most significant gains in the ultra-low shot intervals (1-4 shots). The authors also validate the method on ADE20K semantic segmentation (with ViT-L), achieving a mIoU of 45.20, which outperforms VPT and RepAdapter, proving that structured hyperedge adaptation can generalize to dense prediction tasks.

Ablation Study

Configuration Mean Accuracy Description
Token-wise baseline (no hyperedge routing, comparable parameter size) 76.3 Same capacity adapter, no grouping
HyperAdapter (Ours) 77.6 With hyperedge routing, +1.3 (Natural +0.3 / Specialized +1.7 / Structured +1.9)
\(K=4\) 77.2 Too few hyperedges, insufficient group aggregation
\(K=8\) (Default) 77.6 Optimal trade-off between capacity and efficiency
\(K=16\) 77.3 Too many hyperedges, token groups are fragmented
Parallel (Attn+MLP) (Default) 77.6 Parallel dual-branch is optimal
Pre (Attn Only) 76.3 Single-branch prepended, worst performance
\(r=8\) (Default) 77.6 Bottleneck dimension of 8 is already saturated
\(r=64\) 77.0 Multiplying parameters does not yield benefits

Key Findings

  • Gains stem from structure, not parameters: The token-wise baseline has a parameter size comparable to HyperAdapter (even when matching the parameter budget—scaling up the baseline's \(r\) to 12 and AdaptFormer's \(r\) to 24 so that all three contain 0.44M parameters—HyperAdapter still outperforms them by about 1 percentage point), confirming that the improvements originate from the structured routing mechanism of hyperedges rather than model capacity.
  • Structured tasks benefit the most: The Structured category gains 1.9 percentage points and Specialized gains 1.7. These are precisely the scenarios with the strongest spatial and relational dependencies, validating the core claim that "group-level adaptation captures high-order relations."
  • Sweet spots exist for both hyperedge count and bottleneck dimension: Performance saturates when \(K\) and \(r\) reach 8, and further increases only bloat parameters without boosting accuracy, demonstrating that the representational bottleneck lies in "whether sorting into groups occurs" rather than capacity.
  • Routing behavior progressively specializes with depth: Shorter/shallower layers exhibit high routing entropy with tokens dispersed across multiple hyperedges (exploration), whereas deeper layers show dropped entropy with tokens concentrated in fewer hyperedges (specialization). Patch-grid visualizations also reveal that deeper layers group adjacent patches into coherent semantic regions. On DAAM attribution maps, HyperAdapter's activations are more focused on the foreground object than the baseline/AdaptFormer, containing less background noise.
  • Mild efficiency overhead: Compared to token-wise methods, the training latency increases from 212–218 to 239 ms/batch, inference latency from 117–121 to 129 ms/batch, and GPU memory from 2.8–3.0 to 3.2 GB. FLOPs remain almost unchanged (17.8G vs 17.6G), showing that the extra overhead of \(O(NKD+KDr)\) is negligible compared to the self-attention complexity of \(O(N^2D)\).

Highlights & Insights

  • Redefining the dimension of "where to adapt": While prior PEFT works heavily focused on "how many parameters to introduce" and "how to perform low-rank decomposition," this work directs attention to "which space the adaptation occurs in"—an orthogonal and previously under-explored dimension. This reframing is highly inspiring.
  • Unified perspective showing token-wise adapter as a special case: When \(K=N\) and \({\bm{M}}={\bm{I}}\), the method degenerates precisely into a standard adapter. This prevents the new method from being "just another trick" and instead positions it within a more general framework, mathematically proving its low-rank nature and permutation equivariance in the process.
  • Clean interpretation as a structured smoothing operator: Formulating "aggregation \(\rightarrow\) low-rank adaptation \(\rightarrow\) diffusion" as a smoothing operator \({\bm{M}}{\bm{W}}_{\text{up}}\sigma({\bm{W}}_{\text{down}}{\bm{M}}^\top{\bm{X}}_p)\) acting on tokens intuitively demonstrates why "sharing updates among the same group of tokens" leads to coherent refinements.
  • Transferable conceptual framework: The paradigm of "soft-clustering into groups, performing lightweight transitions within groups, and then diffusing back to individual units" can be transferred to any domain where basic units exhibit implicit high-order structures but the backbone processes them unit-by-unit (e.g., point clouds, graph nodes, or even multimodal tokens for efficient adaptation).

Limitations & Future Work

  • The authors acknowledge that routing (assignment + aggregation + diffusion) introduces an additional computational layer compared to token-wise adapters. Although the empirical overhead is mild, further optimization of the routing mechanism is necessary to improve scalability to larger backbones and higher-resolution inputs.
  • The number of hyperedges \(K\) is fixed across all layers and datasets; adaptive or data-dependent hyperedge construction holds promise for capturing richer token relations and improving cross-task flexibility.
  • Primary experiments focus on visual classification (VTAB-1K, few-shot FGVC). Although ADE20K segmentation is included as a supplement, validating on more diverse tasks such as video understanding and multimodal learning remains an open direction.
  • An observed limitation: \(\tau\) is tuned only based on the validation set, and its sensitivity curve is only provided for Caltech101 (where \(\tau=0.10\) is optimal), leaving the evidence for temperature robustness across datasets somewhat thin; moreover, while the performance gains across categories in the main results are consistent, their absolute magnitudes are modest (an average of +1.3), meaning the trade-off for the small extra latency should be weighed based on deployment scenarios.
  • vs Standard Adapter / LoRA / AdaptFormer / RepAdapter: These methods refine tokens independently in the token space. In contrast, HyperAdapter performs group-level adaptation in the learned hyperedge space, explicitly capturing high-order relationships between tokens. Ours is stronger under the same parameter budget, especially on structured tasks, at the cost of an additional routing calculation.
  • vs Graph/Hypergraph ViTs (ViG, MobileViG, GreedyViG, Vision HGNN): Those designs embed graph/hypergraph computations directly into the backbone, altering the core operators and learning relationship representations from scratch. HyperAdapter keeps the pre-trained ViT intact and only implements a "routing \(\rightarrow\) adaptation \(\rightarrow\) diffusion" sequence within the bottleneck adapter via a soft hypergraph; the hyperedges function merely as a transient interaction space for adaptation rather than the feature extraction backbone.
  • vs HGNN: HGNN serves as an end-to-end framework for relation representation learning relying on iterative graph propagation. HyperAdapter is a lightweight, plug-and-play PEFT module on top of frozen transformers, replacing iterative propagation with a lightweight routing mechanism while preserving low-rank properties, permutation equivariance, and the ability to degenerate into a token-wise adapter. To the best of the authors' knowledge, this is the first work to formulate PEFT as "hyperedge-level structured adaptation."
  • vs Prompt-based (VPT, E2VPT, VFPT, ViaPT): Prompting methods alter attention interactions through learnable prompt tokens, yet features are still refined token-by-token after attention mixing. HyperAdapter directly re-engineers the target of adaptation, yielding higher mean accuracy compared to VFPT/ViaPT on ViT-L (77.6% vs 75.5% / 76.4%).

Rating

  • Novelty: ⭐⭐⭐⭐☆ Reframing the "adaptation space" coupled with hyperedge adaptation is indeed refreshing and provides a unified perspective showing the token-wise adapter as a special case. However, the underlying building blocks (prototype soft routing, bottleneck adapter) are combinations of mature components.
  • Experimental Thoroughness: ⭐⭐⭐⭐⭐ Covered 3 backbones, 24 downstream tasks, classification + few-shot + segmentation. Ablations comprehensively sweep \(K\), \(r\), placement, temperature, CLS aggregation, and matched parameter budgets, alongside multiple routing entropy, patch-grid, and DAAM visualizations.
  • Writing Quality: ⭐⭐⭐⭐⭐ Clearly argued, with the methodology logically progressing from "revisiting adaptation space" to the unified perspective. Three propositions (degeneration, permutation equivariance, and low-rank properties) establish solid theoretical properties.
  • Value: ⭐⭐⭐⭐☆ Plug-and-play, <0.5% parameters, and architecture-agnostic, making it highly adoptable in practice. Though the overall average gains are moderate, the performance boosts on structured tasks are robust and consistent, and it opens up the "adaptation space" as an exploratory avenue for future work.