NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Relearning Co-occurrence-Robust Fusion Gates for Long-Tailed Multi-Label Recognition

In multi-label image recognition, one photo carries several labels at once, and some labels are rare. A rare label such as "leopard" is usually seen alongside a common one such as "tree." A model trained on this data learns a cheap shortcut: it scores "leopard" partly by detecting trees. Common remedies do not remove this shortcut. Duplicating leopard images also duplicates trees. Loss re-weighting changes how hard each label pushes, but not where the model looks. Vision-language models make things worse in a specific way: they attend to whatever is most salient in the image, which is usually the frequent object.

We propose to find and repair the shortcut at the place it lives, which is the fusion step. For each class, a text-queried attention module pools evidence from the image regions that match that class. A small learned gate then mixes this local evidence with a whole-image context vector. Our claim is that when this gate is trained on long-tailed data, it learns to lean on context for rare classes, and context in practice means co-occurring common objects. Because the architecture gives a separate feature per class, the gate can be retrained in a second stage on class-balanced data. That second stage also uses deliberately chosen hard negatives: images that contain the rare class's usual companion but not the rare class itself. This is resampling without the resampling paradox. It should raise rare-class accuracy without the usual loss on common classes, because each class's gate is fitted separately.

Core Claim

Cross-modal attention, meaning attention where one modality supplies the queries and another supplies the keys and values, turns an entangled multi-label image into per-class features. That makes per-class decoupled training possible for ordinary object images.

Once features are per class, the fusion gate between each class's own evidence and scene context is the component where the co-occurrence bias is stored. It can be diagnosed there and retrained there. The new ingredients are two:

  • Partner-conditioned negative sampling. When retraining the gate for rare class $c$, negatives are drawn preferentially from images that contain $c$'s most frequent co-occurring common class but not $c$.
  • A pair of shortcut measurements. These test directly whether a class's score depends on its partner rather than on itself.

Concretely, for class $c$ with text embedding $t_c$ and image patch tokens $P$, the fused feature is

$$z_c = \alpha_c \, v_c + (1-\alpha_c)\, u, \qquad v_c = \mathrm{softmax}\!\left(\frac{t_c W_q (P W_k)^\top}{\sqrt{d}}\right) P W_v, \qquad \alpha_c = \sigma\big(g_c([v_c, u])\big).$$

Here $v_c$ is the class-specific attended evidence, $u$ is the global image embedding, $g_c$ is a small per-class gating function, and $\sigma$ is the sigmoid. A per-class linear head scores $z_c$.

Relation to Prior Work

Four lines of work motivate the proposal.

The first diagnoses the problem. Distribution-Balanced Loss identifies the co-occurrence trap and the dominance of negative labels. It addresses them with frequency-aware re-weighting and a margin that stops pushing on negatives once they are confidently low. We keep this loss for stage one. We differ in intervening on where evidence comes from, not only on how much each label counts.

The second supplies the decoupling recipe. Pedestrian Attribute Recognition as Label-balanced Multi-label Learning freezes the backbone and resamples from attribute-specific feature banks. Label-Specific Feature Augmentation builds label-specific text features and transfers variation from common to rare prototypes. We reuse the "freeze, bank, rebalance" recipe. We obtain the per-class features from text-queried cross-attention over generic scenes, and we add partner-conditioned negatives, which neither paper uses.

The third is the closest vision-language work. CSSFE fuses class activation maps with label text embeddings under a fixed binary mask that lets information flow only from common to medium to rare classes. LMPT tunes prompt tokens on frozen CLIP. CAPNET adds adapters and a text-derived label-correlation graph, and observes that CLIP focuses on the most salient object.

These three methods share a limitation. None of them learns an input-dependent balance between a class's own regions and scene context, and none measures whether rare-class scores rest on co-occurring objects. CAPNET's label graph actually pushes the other way: it propagates co-occurrence on purpose. That is a real tension. Our experiments test whether that propagation helps rare classes on average but fails when the usual partner is absent.

The fourth supplies the gating mechanism and a constraint on it. Gated Cross-Attention for drug-target interaction introduces the gate form we adopt and shows that it prevents one modality from washing out the other. That paper also reports sensitivity to gate hyperparameters, which is why our gate is kept tiny and per class. Attentional Feature Fusion shows that learned channel gates beat static addition on single-label ImageNet. It never tests those gates under label imbalance, and that is the failure we hypothesize.

Head-to-Tail feature fusion grafts common-class channels into rare-class features in single-label recognition. We deliberately avoid that kind of blending. In multi-label images, the common-class channels are already present in the same image, and they are the source of the shortcut.

Research Program

Stage one trains the cross-attention and gates end to end on frozen CLIP ViT-B/16 with Distribution-Balanced loss. The trainable parameter budget is matched to CAPNET's roughly 6M.

Diagnosis. We then measure the co-occurrence shortcut in three ways:

  • Gate reliance. The average $\alpha_c$ as a function of class frequency.
  • Partner gap. For each rare class, its AP on test images where its top co-occurring common class is present, minus its AP where that partner is absent.
  • Region-masking score. Using COCO and VOC bounding boxes, we blank the rare object's region and measure how much of the class score survives. A high surviving score means the model is scoring the class from context.

The hypothesis predicts three things. Rare classes should show low $\alpha_c$, large partner gaps, and high surviving scores. Common classes should not.

Stage two freezes the attention and the context encoder, then extracts per-class banks of $(v_c, u)$ pairs. For every class it retrains $g_c$ and the classifier head on batches with equal positives and negatives. For rare classes, a tunable fraction of negatives are partner-present, rare-absent images.

Mechanism ablations separate three effects: rebalancing alone, partner-conditioned negatives alone, and retraining the gate versus retraining only the head.

Transfer tests. We check whether the effect carries to PA100k. Attribute co-occurrence there, such as backpack with jeans, is the canonical case of the paradox. There we compare against the reported FRDL number rather than claiming a new best result.

Baselines

Naive reference. Frozen CLIP ViT-B/16 with a linear multi-label head, trained with plain binary cross-entropy under ERM, the same frozen-CLIP setup as all other runs. This anchors how much any adaptation matters. Distribution-Balanced Loss is also reported from its paper on its original ResNet setting, to make the loss-only reference explicit. That paper reports 41.27% ERM and 53.55% DB mAP on COCO-MLT. This is a different backbone, so it is a reference point rather than a matched comparison.

Strongest existing method. CAPNET, which reports 93.03% mAP on VOC-LT and 76.36% on COCO-LT, plus a tail gain of nearly 5% over standard fine-tuning. It is the strongest competitor because it uses the same frozen CLIP encoders, a similar parameter budget, and the same distribution-balanced family of losses. It also encodes co-occurrence explicitly, which is exactly what our method tries to discount.

We will rerun CAPNET from its described components on our splits, with the same epochs, the same hyperparameter search budget (an equal number of configurations), and test-time ensembling either on for both methods or off for both. We report its published numbers next to our rerun so any reproduction gap is visible.

Beating CAPNET means one of two outcomes:

  • Matching its overall COCO-LT mAP within noise across three seeds, while showing a statistically clear gain in tail mAP and a clearly smaller partner gap.
  • Improving overall mAP outright.

A tail gain that comes with a drop in head mAP larger than the tail gain would not count.

Prompt-tuning baseline. LMPT, which reports 87.88% mAP on VOC-LT and 66.19% on COCO-LT, rerun on the same encoder. It represents prompt tuning with no region-level fusion.

Static-mask fusion baseline. CSSFE, for which no reported overall mAP was found on Lacuna. The file only gives a gain of up to 1.08% tail mAP over CPRFL on LT-COCO. It represents fixed-mask cross-modal fusion.

Key ablations. These run on identical data and budget:

  • The same architecture without any gate: the class feature is $v_c$ alone, trained with Distribution-Balanced loss. This is the "just a query decoder" baseline.
  • The same architecture with stage-two balanced resampling but random negatives.
  • Stage two retraining only the heads, with gates frozen.

The claim that the gate is the site of the bias survives only if the full method beats all three on tail mAP and partner gap.

Why not just…?

Why not just use a class-query cross-attention decoder with a rebalanced loss and no gate? This is the most serious threat. Text-queried attention alone already produces per-class features, and it may already ignore partner regions. If the no-gate variant shows the same small partner gap and the same tail mAP as our full method, then the gate adds nothing. We would then drop it and report the decoupled per-class resampling as the contribution. The gate-reliance and region-masking diagnostics tell us which of these cases holds before any stage-two claim is made.

Why not just apply FRDL-style decoupled resampling to the global CLIP embedding? Pedestrian Attribute Recognition as Label-balanced Multi-label Learning shows this works on pedestrian attributes, reaching 89.44% mA on PA100k. But a single global vector for a COCO scene still contains the tree whenever it contains the leopard. Balancing positives and negatives over that vector cannot separate the two. We will run exactly this variant. We expect it to improve tail mAP but leave the partner gap largely intact. If it closes the gap, per-class attention is unnecessary.

Why not just post-hoc adjust per-class thresholds or logits? Shifting a rare class's bias term raises recall uniformly. It cannot make the score depend less on the partner. The partner gap and the masking score are therefore invariant to it by construction. We include logit adjustment on top of stage one as a baseline. It may match us on mAP. It should not match us on the shortcut measurements, and that is the point of reporting them.

Why not just keep CAPNET's co-occurrence graph, since co-occurrence genuinely predicts labels? Co-occurrence is real signal, and exploiting it may win on in-distribution mAP. Our position is not that context is useless. It is that the balance between own-region evidence and context should be learned per image, with the rare-class balance fitted on data where context is not a free answer. If CAPNET wins overall but loses on partner-absent images, both facts will be reported.

Proposed Experiments

Main benchmarks. COCO-LT and VOC-LT, with metrics of overall, head, medium and tail mAP. We add two derived measures defined above: the partner gap, which requires only labels, and the region-masking surviving score, which uses the original COCO and VOC boxes. All results are averaged over three seeds with the matched budgets described in the baselines.

Secondary benchmark. PA100k, reporting mA against FRDL's reported 89.44%, with the partner gap computed over attribute pairs.

Stress test. CXR-LT is an optional check. Its top team reached 0.372 mAP. Its findings co-occur strongly, for example support devices with many pathologies, but its class names are short and uninformative. It therefore probes the known weakness that text-queried methods need good class text. A null result there would be informative rather than fatal.

Decisive checks. Three results decide the outcome:

  • Diagnosis. After stage one, rare classes must show lower $\alpha_c$ and a larger partner gap than common classes. If they do not, the hypothesis is wrong at its root.
  • Mechanism. Partner-conditioned stage two must shrink the rare-class partner gap substantially more than random-negative stage two. It must do so while keeping common-class mAP within noise of stage one, which is the test of whether the head-tail seesaw is avoided.
  • Necessity. The no-gate query-decoder ablation, run with the same stage two, must fall short of the full model. If it does not, the paper becomes one about per-class decoupled resampling over cross-attention features, without the gate.