Gating Occluders Out Before They Climb the Feature Pyramid

Person re-identification means matching a photo of someone against a gallery of photos from other cameras. It breaks down when the person is partly hidden by a car, a tree or another pedestrian, because the network folds the occluder's appearance into the person's descriptor. Two design camps disagree about the fix. One says to use features from several network depths, since shallow layers keep fine clothing texture that deep layers blur away. The other says multi-depth features make occlusion worse. Occluded Person Re-Identification with Single-scale Global Representations argues that pyramids amplify a "Clever Hans" shortcut, where the model learns to recognize the obstacle instead of the person. It supports this by beating pyramid and part-based methods with a single-scale backbone and heavy erasing augmentation.

We propose that the pyramid is not the problem. The problem is how its levels are combined. Shallow, high-resolution layers are exactly where occluder edges and textures are strongest. Current fusion either adds them upward unchanged, or gates them with weights computed from the already-contaminated features. The fix we propose is to decide, at every depth, which spatial locations belong to the occluder, using a signal that does not come from the contaminated visual stream, and to suppress those locations before they flow upward. That signal is a small set of learned text tokens describing occluders, cross-attended against each depth's feature map. It is trained with dense supervision from the occluder masks we already know whenever we paste synthetic occluders during augmentation.

Core Claim

Multi-depth fusion helps occluded re-identification once each depth is gated by occluder evidence computed outside the visual branch being gated. Without that gating, multi-depth fusion hurts, as the single-scale camp observed. The claim is falsifiable in both directions. If gated multi-depth fusion does not beat a strong single-scale model on occluded benchmarks and on a direct Clever Hans test, the single-scale camp is right.

The mechanism targets a specific weakness that Attentional Feature Fusion named the "initial integration bottleneck." That paper introduced gated fusion modules (AFF and its iterative version iAFF) that compute a soft weight to blend two feature maps. Those weights are produced from a preliminary sum of the two inputs. When one input is dominated by an occluder, the gate is computed from corrupted evidence. Iterating the gate, as iAFF does, refines the weight, but it still draws only on the same corrupted features. The paper was also evaluated only on unoccluded classification and detection. Our gate is instead a cross-attention score between an occluder query $t_O$ (a learned text-embedding token) and the feature $f_l(p)$ at location $p$ of depth $l$:

$$g_l(p) = \sigma\!\left(\frac{(W_q t_O)^\top W_k f_l(p)}{\sqrt{d}}\right), \qquad \tilde f_l(p) = \big(1 - g_l(p)\big)\, f_l(p).$$

Here $W_q, W_k$ are learned projections, $d$ is their width, $\sigma$ is the sigmoid, and $\tilde f_l$ is the cleaned feature passed into the top-down or bottom-up pyramid merge. Where an occluder is pasted, the known paste mask $M_l$, resized to depth $l$, supervises $g_l$ with a per-pixel binary cross-entropy. This dense supervision is the practical difference from gates that are learned only through the identity loss, which the file flags as prone to latching onto background patterns under severe contamination. The occluder query has a handful of tokens, so the cross-attention cost is linear in the number of feature locations. This avoids the quadratic cost that makes dense cross-modal attention expensive on full-resolution maps.

Relation to Prior Work

The closest work is Categorical Attention: Fine-grained Language-guided Noise Filtering Network for Occluded Person Re-Identification, called FLaN-Net below. FLaN-Net learns separate subject, attribute and occluder prompt tokens, cross-attends them to image patches at one deep layer, and fuses streams with entropy-based weights. We keep its idea of an explicit occluder token. We differ in two ways. We apply the token at every backbone depth and use it as a spatial gate on the pyramid pathway, not as a single-layer filter. We also supervise it with pixel masks, not only through the retrieval loss.

ProFD: Prompt-Guided Feature Disentangling for Occluded Person Re-Identification is a second language-guided method. It uses CLIP body-part prompts to correct noisy segmentation masks in a decoder, also at a single scale. It supplies a caution we adopt: fine-tuning CLIP naively causes forgetting, so we freeze the text encoder and learn only prompt tokens.

The motivating tension comes from two papers that reach opposite conclusions about multiple scales. Multi-Scale Body-Part Mask Guided Attention for Person Re-Identification shows that mask-supervised attention at whole-, upper- and lower-body scales helps. The single-scale paper shows that pyramids hurt under occlusion. Neither paper tested content-aware gating across depths, so neither result tells us whether multi-depth fusion itself causes the failure.

Several visual-only occlusion handlers constrain the design. Learning to Know Where to See: A Visibility-Aware Approach for Occluded Person Re-identification predicts stripe visibility with no pose model at test time and runs at 404 FPS. It shows that visibility can be learned from features cheaply, which makes a visual-only gate a serious competitor to our text-queried one. Pose-Guided Feature Alignment for Occluded Person Re-Identification and High-Order Information Matters: Learning Relation and Topology for Occluded Person Re-Identification rely on keypoint detectors. The file documents that such detectors fail under heavy occlusion and slow inference to about 35 FPS, so we avoid test-time keypoints. Our augmentation source follows the occlusion libraries and simulators of Feature Completion Transformer for Occluded Person Re-Identification and Occluded Person Re-identification. They use pasted occluders for training signal; we additionally treat the paste mask as dense gate supervision at every depth.

Research Program

We will build the model on a CLIP-initialized image backbone with four stages and a standard top-down pyramid merge. Between each stage and the merge sits the occluder gate defined above. The text encoder is frozen, and the model learns one occluder token set plus FLaN-Net-style subject tokens for the identity descriptor. Training combines identity and triplet losses with the per-depth mask loss on pasted occluders. The occluder library is built from real obstacle crops (vehicles, poles, bags, other people), and we partition it by category so that some categories are held out.

The analysis has three parts. The first asks where occluder energy actually enters. For the ungated pyramid we measure, at each depth, how strongly the final descriptor is affected by the occluder region, estimated by gradient attribution restricted to the paste mask. The single-scale paper's argument predicts that the shallow levels dominate this effect. The second part checks whether gating removes that contribution while keeping the fine texture signal. The third part checks whether the language query generalizes to occluder categories never pasted in training. That is the only place where text should beat a purely visual gate.

Baselines

The naive reference is a CLIP-initialized backbone using only its final layer, trained with the same identity and triplet losses and the same pasted-occluder augmentation. It fixes the floor. The second naive reference is the same backbone with an ungated pyramid that merges levels by plain addition. Its gap to the naive reference measures the pyramid penalty claimed by the single-scale paper. If this ungated pyramid does not lose to the single-scale model on Occluded-Duke, the motivating tension does not reproduce, and we report that before anything else.

The strongest existing method in the file is FLaN-Net, which reports 75.2% Rank-1 and 65.5% mAP on Occluded-DukeMTMC and 92.6% Rank-1 on Occluded-REID. It is the right competitor because it already uses occluder text tokens and cross-attention. Our method therefore wins only if the multi-depth gating adds something beyond that. We will retrain it on the same backbone, input resolution, augmentation, epoch budget and hyperparameter search budget as our model, and compare at matched parameter count. Beating it means exceeding the retrained FLaN-Net by more than seed-to-seed variation across three seeds on Occluded-Duke mAP, while not falling below it on Market-1501.

The strongest single-scale competitor is the method of Yan et al., which combines compound batch erasing, reconstructive pooling and a bounded distance loss. The file gives only a relative 13.9% Top-1 gain on Occluded-Duke and 96.1% Rank-1 on Market-1501, with no reported absolute Occluded-Duke number found on Lacuna. We will reimplement it on our backbone with its augmentation in place of ours.

For a fast visual-only reference we include the visibility discriminator of Yang et al. (62.2% Rank-1, 46.3% mAP on Occluded-Duke). For partial-body retrieval we include ProFD, which reports 91.7% Rank-1 on P-DukeMTMC. The FCFormer re-ranked figures of 79.4% Rank-1 and 77.2% mAP are not comparable to non-re-ranked results, so we compare with re-ranking only in a separate row.

Three ablations isolate the key ingredient. The first replaces our gate with iAFF computed from the visual features alone. This tests whether an externally anchored gate matters at all. The second keeps the per-depth mask supervision but replaces the text query with a learned visual query vector. This tests whether language matters beyond supervision. The third applies the gate only at the deepest level, which recovers roughly FLaN-Net's single-depth placement. This tests whether depth matters.

Why not just…?

Why not just use single-scale global features with aggressive erasing? This is the most serious threat, and the single-scale paper is direct evidence for it. The ungated-pyramid versus single-scale comparison, followed by the gated-pyramid comparison, settles it. If the gated pyramid does not beat the reimplemented single-scale model on Occluded-Duke and OPReID, and does not show a lower Clever Hans swap rate, we will conclude that the single-scale view is correct and report the negative result.

Why not just add a feature pyramid to FLaN-Net? Plain pyramid merging is exactly the static fusion that the file identifies as a channel for occluder noise from high-resolution layers. We run FLaN-Net plus an ungated pyramid as its own condition. If it matches our model, per-depth gating is unnecessary, and the contribution collapses to "FLaN-Net benefits from a pyramid."

Why not just supervise a visual mask predictor on the pasted occluders and drop the text? This alternative plausibly works as well on in-distribution occluders, which is why the learned-visual-query ablation keeps the same mask supervision. We expect parity on seen occluder categories. The text query has to earn its place on held-out occluder categories and on real occlusions in Occluded-REID, where FLaN-Net's language-guided filtering already outperformed visual-only methods. If the visual query ties there too, we will present the method as mask-supervised depth gating with text as an optional component.

Why not just use iterative attentional fusion as designed? iAFF refines its weights using the same corrupted features it is trying to clean. The visual-only iAFF ablation, compared under increasing synthetic occlusion area, tests whether that circularity actually costs accuracy when occlusion is heavy.

Proposed Experiments

We will train on each benchmark's standard training split and evaluate Rank-1 and mAP on Occluded-DukeMTMC, Occluded-REID, P-DukeMTMC-reID, Partial-REID and OPReID. Market-1501 and DukeMTMC-reID check that holistic performance is not sacrificed. Throughput in frames per second on fixed hardware is reported for every method, with the visibility discriminator's 404 FPS as the efficiency reference.

The decisive check is a controlled occluder-swap test of the Clever Hans effect. For each occluded query, we paste the same occluder instance onto gallery images of a different identity. The swap rate is the fraction of queries whose top-1 match becomes such a distractor. The single-scale paper's claim predicts that the ungated pyramid has the highest swap rate. Our claim predicts that gating reduces it below both the ungated pyramid and the single-scale model. We run the test separately for occluder categories seen and held out during training.

A second check sweeps occlusion area from 10% to 60% of the person box. The prediction is that the advantage of the gated pyramid over the visual-only iAFF gate grows with occlusion area, because the initial integration bottleneck should matter most when one input is mostly occluder. A third check compares the per-depth attribution maps before and after gating, to confirm that suppression happens mainly at shallow levels.

If the gated pyramid beats the single-scale model and the retrained FLaN-Net on Occluded-Duke mAP, lowers the swap rate, and keeps its advantage on held-out occluder categories, the pyramid-versus-single-scale disagreement is resolved in favor of content-aware multi-depth fusion. If it fails on the swap test, the single-scale camp's diagnosis stands.