Papers
Topics
Authors
Recent
Search
2000 character limit reached

CAPNET: Adaptive Correlation for Visual Recognition

Updated 2 December 2025
  • The paper presents CAPNET, an end-to-end framework that leverages CLIP, learnable soft prompts, and a GCN to model semantic label correlations in long-tailed multi-label recognition.
  • It employs a distribution-balanced focal loss and parameter-efficient fine-tuning, achieving superior performance over state-of-the-art baselines on VOC-LT, COCO-LT, and NUS-WIDE.
  • The framework integrates semantic correlation modeling, test-time ensembling, and PEFT to effectively mitigate data imbalance while ensuring robust inference.

The Correlation Adaptation Prompt Network (CAPNET) is an end-to-end framework for long-tailed multi-label visual recognition, leveraging pre-trained vision-LLMs, specifically CLIP, to explicitly model label correlations and address head-tail data imbalance. CAPNET utilizes a graph convolutional network (GCN) for label propagation, learnable soft prompts for refined class embeddings, a distribution-balanced focal loss with class-aware re-weighting, test-time ensembling for robust inference, and parameter-efficient fine-tuning (PEFT) to prevent overfitting on scarce classes. The framework demonstrates substantial improvements over state-of-the-art baselines on benchmarks including VOC-LT, COCO-LT, and NUS-WIDE (Tang et al., 25 Nov 2025).

1. Architecture Overview

CAPNET is built atop the dual-encoder structure of CLIP, integrating both a vision encoder EI()E_I(\cdot) (e.g., ResNet-50, ViT-Base/16) and a Transformer-based text encoder ET()E_T(\cdot). The system processes an input image x\boldsymbol{x} as follows:

  • Learnable soft prompts {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C for each class are fed into ETE_T, producing initial per-class textual features Ft=[f1,,fC]\boldsymbol{F}_t = [\boldsymbol{f}_1,\dots,\boldsymbol{f}_C]^\top.
  • These features are refined via a three-layer GCN over a label correlation graph G\mathcal{G}, generating residuals HL\boldsymbol{H}_L for each class:

Ft=Ft+HL=[f1,,fC]\boldsymbol{F}_t^* = \boldsymbol{F}_t + \boldsymbol{H}_L = [\boldsymbol{f}_1^*,\dots,\boldsymbol{f}_C^*]^\top

  • The image encoder outputs a visual latent v=EI(x)\boldsymbol{v} = E_I(\boldsymbol{x}). Per-class probabilities are computed via cosine similarity and a sigmoid activation:

ET()E_T(\cdot)0

where ET()E_T(\cdot)1 is a trainable temperature parameter.

Training employs a binary cross-entropy-style loss, modified to address label imbalance and correlation.

2. Semantic Label Correlation Modeling

CAPNET departs from conventional reliance on co-occurrence statistics—which are unreliable for tail classes—by explicitly constructing a semantic affinity matrix using CLIP's textual encoder. For each class ET()E_T(\cdot)2, a prompt-encoded representation ET()E_T(\cdot)3 is generated from a template, such as “a photo of a [CLS]”.

The raw correlation matrix is obtained via cosine similarity:

ET()E_T(\cdot)4

Self-loop and neighbor weights are balanced:

ET()E_T(\cdot)5

where ET()E_T(\cdot)6 controls self-loop strength. The final row-normalized correlation matrix, using softmax with temperature ET()E_T(\cdot)7:

ET()E_T(\cdot)8

3. Graph Convolutional Network and Prompt Learning

Each class serves as a node in a three-layer GCN, with features propagated according to the learned label correlation graph:

ET()E_T(\cdot)9

where x\boldsymbol{x}0, x\boldsymbol{x}1, x\boldsymbol{x}2, and x\boldsymbol{x}3 is the ReLU activation. Only prompt tokens, GCN, and adapter weights are updated during training; the remainder of the text encoder is frozen.

Class prompt vectors x\boldsymbol{x}4 of length x\boldsymbol{x}5 (empirically, x\boldsymbol{x}6) are initialized as

x\boldsymbol{x}7

with token vectors x\boldsymbol{x}8 being learnable.

4. Loss Function and Imbalance Mitigation

CAPNET employs a distribution-balanced focal loss tailored for long-tailed distributions. The class-specific re-weighting factor:

x\boldsymbol{x}9

with {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C0 the number of positives for class {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C1 and {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C2 the dataset size. A margin term:

{tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C3

is incorporated into the logits.

The per-class loss for an image {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C4 and class {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C5:

{tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C6

where {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C7 is the margin-adjusted, sigmoid-modulated logit, and {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C8, {tc}c=1C\{\boldsymbol{t}_c\}_{c=1}^C9 are hyperparameters. The full loss is averaged across all images and classes.

Rare tail classes (ETE_T0) receive higher ETE_T1, amplifying their impact during training, while head class penalization is moderated by the margin and sigmoid mapping.

5. Inference Robustness and Parameter-Efficient Fine-Tuning

For robust test-time prediction, CAPNET employs five-crop ensembling: the input is resized and five spatial crops are generated, with class probabilities averaged:

ETE_T2

Parameter-efficient fine-tuning is realized via the AdaptFormer scheme in each ViT MLP block:

ETE_T3

where ETE_T4, ETE_T5 with ETE_T6. Only the adapter weights, prompts, and GCN parameters are trained. For ViT-Base/16, this requires approximately 6.6 million parameters versus 91.3 million for full fine-tuning.

6. Empirical Evaluation and Ablation

CAPNET delivers substantial improvements on long-tailed multi-label recognition. Key results:

Benchmark Backbone Prior Best (mAP) CAPNET (mAP) CAPNET + TTE + PEFT (mAP)
VOC-LT ResNet-50 84.37 % (MLC-NC) 87.46 % 88.42 %
COCO-LT ResNet-50 60.52 % 64.44 % 65.75 %
VOC-LT ViT-Base/16 87.88 % (LMPT) 93.03 %
COCO-LT ViT-Base/16 66.19 % (LMPT) 76.36 %
NUS-WIDE ViT-Base/16 57.29 % (finetune CLIP) 60.34 %

Ablation studies reveal:

  • Distribution-balanced loss ETE_T7 improves mAP by up to 1.47%.
  • GCN-based correlation propagation yields further gains.
  • Test-time ensembling (TTE) and PEFT both contribute incrementally, cumulatively resulting in state-of-the-art mAP (e.g., 93.03% / 76.36% on VOC-LT / COCO-LT).
  • Prompt-based cosine correlation matrices outperform data-derived co-occurrence matrices (+1.2% VOC-LT, +2.3% COCO-LT).
  • Optimal GCN self-loop weight ETE_T8, softmax temperature ETE_T9, and prompt length 4 initialized with “a photo of a [CLS]”.

7. Context and Impact

CAPNET establishes an integrated method for exploiting vision-language priors in long-tailed, multi-label settings by explicitly modeling inter-class label relationships and tailoring the optimization to class imbalance. It unifies prompt tuning, graph-based semantic propagation, distribution-aware losses, robust inference, and resource-efficient adaptation, achieving empirically verified, superior performance on established benchmarks. Contemporary analyses underscore the effectiveness of prompt-based semantic correlations over traditional data-driven label affinity schemes and demonstrate that PEFT with adapters can match or exceed full fine-tuning using an order of magnitude fewer trainable parameters (Tang et al., 25 Nov 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Correlation Adaptation Prompt Network (CAPNET).