Letting Feature Density Decide What Counts as Background

An object detector learns by sorting thousands of candidate boxes per image into positives (this box covers an object) and negatives (this is background). Methods that adapt this sorting, called label assignment, have received a great deal of attention. Nearly all of that effort goes into choosing positives. The negative side is still a blunt rule: any candidate that overlaps no annotated object strongly enough is labeled background. That rule is only correct if every object in the image was annotated. In crowded street scenes, dense tree canopies, and large-vocabulary datasets, many objects are not annotated. The detector is then trained, thousands of times per image, to call real objects "background."

We propose to decide the background label with a second signal besides box overlap. That signal is how typical a candidate's internal feature vector is of the features of known objects. A small density model, trained alongside the detector, estimates this. If a candidate overlaps no labeled box but its features look like a dense cluster of real object features, it is neither punished as background nor rewarded as an object. It is simply ignored. The threshold for "looks like an object" adapts per image, using the same mean-plus-standard-deviation rule that made adaptive positive assignment work, applied to log-density instead of overlap.

Core Claim

Adaptive label assignment and latent density estimation have so far met only at the positive side, or after assignment is over. On the positive side, PAA fits a two-component one-dimensional Gaussian mixture to scalar anchor losses to choose positives. After assignment, FFS trains a normalizing flow on second-stage region features of Faster R-CNN to synthesize outliers, and leaves the assignment rule untouched. A normalizing flow is an invertible network that maps features to a Gaussian, so it gives an exact log-likelihood for any feature vector.

We claim that the right place for feature density inside assignment is the negative band. A candidate with intersection-over-union (IoU, the overlap ratio between two boxes) below threshold with every annotated box should become a negative only when its feature log-density under a foreground model is low. When the density is high, the candidate should be ignored. Concretely, per image we compute the mean $\mu_p$ and standard deviation $\sigma_p$ of the log-density $\log p(z)$ of that image's assigned positives, where $z$ is a candidate's feature vector. A far-from-any-box candidate is set to ignore when

$$\log p(z) > \mu_p - \sigma_p .$$

This deliberately mirrors the $\tau=\mu+\sigma$ rule of ATSS, which computes the same statistics over candidate IoUs.

The claim is falsifiable in a specific way. The rule should recover most of the accuracy lost when annotations are missing. It should beat a matching rule that uses the detector's own classification score in place of density. It should cost almost nothing when annotations are complete.

We arrived at this framing after rejecting the more obvious idea, which was to use flow density to choose positives or to set OTA's positive budget in crowds. A class-level density cannot tell two overlapping people apart: an anchor between them looks "very person-like" for both. So density adds little that the classification score and OTA's cost competition do not already supply. Missing annotations are different. There, the detector's own classifier is actively trained to suppress the evidence, and a detached density model is not.

Research Program

The detector. We build on one-stage dense detectors with modern positive assignment, TOOD's task alignment learning and ATSS, so that positive selection is held fixed and only the negative rule changes.

The density model. At each training step we take the classification-tower features at currently assigned positive locations. We stop gradients into the backbone and project the features to 64 dimensions. A class-conditional flow is trained on them online with its own optimizer: a few affine coupling layers, the masked-autoregressive design of MAF being the alternative we will compare.

Stopping gradients is a deliberate response to the collapse risk the file notes for joint encoder–flow training. If gradients flowed back, the backbone could make every feature trivially likely. Detaching keeps the density an observer of the representation rather than a shaper of it. Because positives are few, the flow is trained on a running memory of recent positive features. Because it is tiny, we can score every candidate negative per image. This is what addresses the scalability concern raised by DifferNet's globally pooled design. We do not need spatial maps from the flow, only a likelihood per anchor.

Where the rule applies. The ignore rule switches on after a one-epoch warm-up. It applies only to candidates whose IoU with every annotated box is below 0.1. Boundary anchors next to a real box therefore stay negatives and continue to teach localization.

The two roles of the flow. The density plays the role NatPN gives it: latent density as evidence that a region of feature space is supported by training data, independent of where a classifier draws its boundary. Our use differs from NatPN's. We do not change predictions at test time; we change which gradients the detector receives during training. At inference the flow is discarded, so test-time cost is unchanged.

What we analyze. We measure what the flow learns: how often ignored candidates coincide with withheld boxes, and how this precision changes over training. We also test the rule's open-world side effect. Ignoring object-like unlabeled regions might make the detector fire more readily on unknown objects, which is exactly the failure that FFS tries to reduce.

Baselines

The naive reference is the unmodified detector (TOOD and ATSS heads, ResNet-50, 1× schedule), trained on whatever annotations are provided, with every low-IoU candidate treated as background. It defines the damage that missing labels cause. For context on complete annotations, ATSS reports 39.3% AP on COCO with RetinaNet-style heads (ATSS). TOOD reports 51.1 AP with a ResNeXt-101-DCN backbone (TOOD). We will reproduce our own ResNet-50 numbers under identical code rather than compare across papers.

The strongest competitor on this specific question is score-based ignoring. It uses the identical per-image rule and the identical IoU<0.1 gate, but replaces $\log p(z)$ with the detached classification score from an exponential-moving-average copy of the detector. This is what most practitioners would try first, so it is the comparison that decides whether density is needed at all.

Strongest existing assignment method. We run PAA and OTA as-is. OTA reports 40.7% mAP against PAA's 40.1% on FCOS 1× on COCO, and 46.6% miss rate on CrowdHuman. This shows whether better positive assignment alone absorbs the missing-label damage.

Ablations that isolate the key ingredient. We test the estimator family by replacing the flow with a class-conditional Gaussian (Mahalanobis distance), the assumption that FFS replaced in VOS. We test detachment by training the flow jointly with the backbone. We also include an oracle in which exactly the withheld boxes are marked ignore, which gives the upper bound.

Fairness. All variants share the training data, schedule, augmentation, and seeds. Each variant's single extra hyperparameter (the projection dimension for density variants, or the score temperature for the score variant) gets the same small grid on a held-out split.

What counts as beating it. Beating score-based ignoring means a gain in AP under annotation dropout that holds across three seeds. It also means closing a clearly larger fraction of the gap between the naive detector and the oracle.

Why not just…?

Why not just ignore negatives the detector itself scores highly? This is the real threat. The concern with it is mechanical. The classifier is trained precisely to push unlabeled objects toward background, so its score on them decays during training. A detached density model trained only on positives has no such pressure. The concern may be overstated: shared features could make the two signals nearly identical. The head-to-head comparison above settles it. We will additionally plot both signals on withheld-box anchors over training epochs. If the score signal does not decay relative to density, the flow is unnecessary, and we will report that.

Why not just fit a Gaussian, as VOS did, or a one-dimensional mixture, as PAA does? FFS found that replacing Gaussian feature models with a flow reduced FPR95 by 7.58% on PASCAL VOC. That is evidence that object features are multi-modal, but it was measured on second-stage features and for outlier detection, not assignment. The Mahalanobis ablation tests this directly in our setting. If it matches the flow, we will adopt it as the cheaper method. PAA's one-dimensional mixture scores only candidates near annotated boxes, so it cannot see unlabeled objects at all.

Why not just down-weight all negatives, or rely on better positive assignment? Uniform down-weighting weakens the background signal everywhere, including on genuine clutter. The PAA and OTA runs, plus a uniform-weight sweep under the same tuning budget, will show whether anything short of selective ignoring recovers the lost AP.

Proposed Experiments

Controlled missing-label study on COCO. We train on COCO 2017 with 30% and 50% of instances randomly withheld from each training image and evaluate on the full validation annotations. We report AP, AP_S, and the fraction of the oracle gap closed. We also record the precision and recall of ignored anchors against withheld boxes. No reported result was found on Lacuna for this dropout protocol, so all numbers will be produced in-house. As a guard against harming clean training, we also run with complete annotations, where the rule should change AP by no more than seed noise.

Naturally incomplete crowded and dense data. On CrowdHuman, which has dense overlaps (22.6 persons per image) and ignore regions, we report miss rate against OTA's reported 46.6% MR (OTA), alongside our own reproduction. On CanopyRS/SelvaBox dense tree-crown imagery, where unlabeled crowns are common, no reported result was found on Lacuna, so we establish baselines ourselves.

Open-world side effect. Following the PASCAL VOC out-of-distribution protocol used by FFS, we measure FPR95. FFS reports a 7.58% reduction relative to VOS and 51.8% in-distribution mAP. We check whether ignoring raises false detections on unknown objects.

Decisive checks. The proposal succeeds only if density-based ignoring beats score-based ignoring under dropout on COCO and CrowdHuman, with the gap growing over training as predicted by score decay. It must also cost nothing on complete annotations. If the score baseline matches it, or Mahalanobis matches the flow, the honest conclusion is that a simpler signal suffices, and we will report it as such.