Object detectors usually propose many overlapping boxes per object and then delete the duplicates with a fixed rule called non-maximum suppression (NMS). NMS keeps the highest-scoring box and removes every box that overlaps it by more than a set fraction. In crowds this rule breaks. Two different people standing close together look exactly like two copies of one person, so the rule either deletes real people or keeps duplicates. This proposal does two things. First, it lets the network decide which pairs of boxes are duplicates, instead of using a fixed overlap threshold. Second, it replaces the greedy deletion step with a small linear program, an optimization over continuous variables with linear constraints, that picks a set of mutually non-duplicate boxes. That linear program is placed inside the network as a differentiable layer, so the detector's scores are trained against the quality of the final selected set.
The idea depends on a known weakness of the obvious linear program and a known fix from integer programming. Selecting non-conflicting boxes is a maximum-weight independent set problem on a conflict graph. Its textbook relaxation keeps one constraint per conflicting pair, $x_u + x_v \le 1$. That relaxation is weak: on any triangle of mutual duplicates, which is the normal case when three or more boxes cover one person, it returns $x = 1/2$ for every box. Gradients through such a layer then blur all boxes in a cluster together. Valid inequalities are constraints satisfied by every integer solution but violated by these fractional ones. The relevant ones here are clique inequalities: for every group $C$ of mutually duplicate boxes, $\sum_{i \in C} x_i \le 1$. They remove the half-solutions without excluding any legitimate selection. We claim that on real detector conflict graphs these constraints make the relaxation integral almost always. If so, a layer that is cheap, differentiable and usually exact becomes possible, and the edge-only version is not.
Core Claim
The claim has two parts, and each can be tested separately. The first is structural. We expect conflict graphs built from detector proposals on crowded images to be close to "perfect" graphs, the class where the clique-constrained relaxation equals the convex hull of independent sets. If they are, the clique-tightened linear program returns an integral, exactly optimal selection on the large majority of connected components. The edge-only program would not.
The second part is about learning. We expect that training a detector through the clique-tightened layer, with the conflict graph predicted by a learned pairwise duplicate classifier, lowers miss rate on CrowdHuman relative to two alternatives. One is greedy NMS. The other is the same learned conflicts decoded by an exact solver at test time without end-to-end training. The second comparison is the one that matters for the claim, and the proposal is designed so it can fail cleanly.
The formulation is
$$\max_{x \in [0,1]^n} \; \sum_{i} w_i x_i - \frac{\epsilon}{2}\lVert x \rVert^2 \quad \text{s.t.} \quad \sum_{i \in C} x_i \le 1 \;\; \text{for every maximal clique } C \text{ of } G_\theta .$$
Here $x_i$ is the selection weight of box $i$ and $w_i$ is its detector score. $G_\theta$ is the duplicate graph, whose edges come from a learned pairwise classifier with parameters $\theta$. The small quadratic term $\epsilon$ makes the solution unique, so it can be differentiated through its optimality conditions.
Relation to Prior Work
The closest prior work is Segmentation as Maximum-Weight Independent Set. It casts the choice of non-overlapping candidate segments as an independent set problem over pairwise overlap edges and solves it with a discrete fixed-point iteration that finds a local optimum. It provides the formulation we build on. It does not tighten the polytope, does not learn the conflicts, and is not differentiable with respect to the features. We change all three.
Two papers motivate the specific design. Accelerating Non-Maximum Suppression: A Graph Theory Perspective shows that suppression graphs split into small weakly connected components and uses a geometric centroid test to speed up greedy NMS without loss. It reproduces greedy NMS faster and does not change its output. For us its main value is the finding that components are small: enumerating maximal cliques per component is cheap, so the separation problem that is NP-hard in general is not a practical obstacle. CrowdHuman documents the failure we target. Its images average 22.6 persons and 2.4 person pairs overlapping above IoU 0.5, and FPN with NMS has roughly a 50% miss rate. A fixed-threshold conflict graph is therefore wrong on many of the edges that matter. This is why conflicts must be learned, and why exactly solving a fixed-threshold model would not help.
Two papers supply methods we reuse. Learning Non-maximum Suppression introduces GossipNet, which passes messages over pairwise box features such as IoU, offsets and scale ratios, and trains them with a matching loss. We reuse its pairwise features for the duplicate classifier. Unlike GossipNet, our output is constrained to be a valid non-duplicate set. The canonical facets of multi-separator polytopes and Valid Cuts for the Design of Potential-based Flow Networks support the general expectation that facet-level constraints on structured vision and network graphs can close the relaxation gap at the root, in some cases completely. We test whether that holds for box conflict graphs.
One paper constrains the design. Differentiable Integer Linear Programming (DiffILO) turns 0–1 programs, including independent set, into penalty objectives over Bernoulli variables predicted by a graph network. It reaches 97.1% feasibility on independent set but only 50.8% on set covering. That tells us penalty relaxations alone do not guarantee feasible outputs. We therefore enforce the constraints exactly inside the layer rather than penalizing violations.
Research Program
The first stage is purely measurement and needs no training. We run a fixed Faster R-CNN with FPN on CrowdHuman and COCO and keep the pre-NMS proposals. On each image we build conflict graphs in three ways: fixed IoU thresholds of 0.5 and 0.7, and ground-truth duplicate graphs in which two boxes conflict if they match the same annotated person. For every connected component we solve the edge-only relaxation, the clique relaxation, and clique plus odd-hole inequalities, and compare each with the exact integer optimum from an off-the-shelf solver. We record the fraction of components where the relaxation is integral, the integrality gap, and how often the graphs contain odd holes or other obstructions to perfectness. This stage alone answers the structural claim.
The second stage builds the layer. A pairwise head scores each candidate pair as duplicate or distinct. It uses GossipNet-style geometric features plus pooled appearance features from both boxes, because occluded but distinct people differ in appearance more than in geometry. It is supervised by ground-truth matching. Edges above a calibrated probability form $G_\theta$. Maximal cliques are enumerated per component. The regularized clique program is solved with a batched quadratic-program solver, and gradients with respect to the scores $w$ come from implicit differentiation of the optimality conditions. Gradients do not pass through the discrete graph; the edge head learns only from its own pairwise loss. We state this limitation openly. The training loss compares the selected weights $x$ with a one-to-one matching of proposals to ground truth. At test time we threshold $x$ and fall back to exact solving on any component that comes out fractional, so outputs are always valid.
The third stage examines when the approach should not help. We split CrowdHuman by component size and overlap density and report gains per bin. We also run the same pipeline on COCO, where crowding is mild and we expect little or no gain over NMS.
Baselines
The naive reference is greedy NMS at the IoU threshold tuned on validation, applied to the same Faster R-CNN FPN detector. CrowdHuman reports roughly a 50% miss rate for FPN with NMS. Any method that does not clearly beat our own reproduction of this number fails at the most basic level.
The strongest published crowd-specific competitor in the file with the same backbone family is Variational Pedestrian Detection. It treats proposal assignment as latent-variable inference and reports a 40.7% log-average miss rate on CrowdHuman with Faster R-CNN, against FCOS at 48.3%. We will rerun it on our backbone, schedule and image resolution. Beating it means a lower miss rate at equal training epochs and equal detector compute, averaged over three seeds.
The learned-suppression competitor is GossipNet from Learning Non-maximum Suppression. It reports +4.8 AP over greedy NMS on PETS and +7.3 AP in highly occluded scenes. No reported result was found on Lacuna for GossipNet on CrowdHuman, so we will train it on CrowdHuman with the same proposals and the same tuning budget as our pairwise head.
For NMS-free query detectors we include Sparse R-CNN, which reports 45.0 AP on COCO with ResNet-50. No reported result was found on Lacuna for Sparse R-CNN or DETR-style detectors on CrowdHuman. We will train Sparse R-CNN there with its query count raised so it exceeds the maximum person count, and match training epochs.
Two ablations isolate the key ingredients. The edge-only ablation uses the identical layer and learned graph but keeps only pairwise constraints, which isolates the contribution of the valid inequalities. The decoupled ablation trains the pairwise head and the detector separately and decodes with exact independent-set solving on the learned graph, which isolates the contribution of end-to-end training through the layer. A greedy decoder on the learned graph completes the set and separates learned conflicts from exact selection.
Why not just…?
Why not just tune or soften NMS? Any fixed rule based only on overlap gives the same decision to two duplicates of one person and to two distinct people at the same IoU. The overlap statistics in CrowdHuman show that such pairs are common. The tuned-NMS baseline measures how much can be recovered by tuning, and the per-density breakdown shows where tuning stops helping.
Why not just solve the independent set exactly at test time with an off-the-shelf solver, since components are small? This is the most serious threat. Accelerating Non-Maximum Suppression shows that components are small, so exact decoding is cheap and needs no polyhedral work at inference. If the decoupled ablation matches the end-to-end model, the valid inequalities are useful only for making training work, and possibly not even for that. We would then report the result as "learned duplicate graphs plus exact decoding" and drop the claim about the layer. The edge-only versus clique comparison during training is what decides whether tightness has value beyond inference.
Why not just use a DiffILO-style penalty relaxation instead of hard constraints? Differentiable Integer Linear Programming reports infeasible outputs at nontrivial rates on harder problem classes. In detection, an infeasible output means a duplicate detection. We include a penalty-layer variant with the same graph and report its rate of duplicate outputs alongside miss rate.
Why not just use an NMS-free query detector? One-to-one matching removes NMS but not the ambiguity of crowded scenes. Sparse R-CNN acknowledges sensitivity to the query budget in crowds. Sparse Semi-DETR finds noisy duplicate predictions under one-to-one matching in the semi-supervised setting. Because no CrowdHuman number is available in the file, our own Sparse R-CNN run settles the question. If it wins, the honest conclusion is that this post-processing route is not worth pursuing for crowds.
Proposed Experiments and Decisive Checks
The first decisive check is structural. On CrowdHuman proposal graphs built from ground-truth duplicates, the clique relaxation should be integral on more than 95% of components, and the edge-only relaxation should be substantially lower. If clique integrality is mediocre and odd holes are common, the layer loses its main justification, and we would move to clique plus odd-hole separation or stop. We report the same statistics for learned graphs and for IoU-threshold graphs on COCO.
The second check is on detection. We measure log-average miss rate, AP and recall on CrowdHuman full-body boxes, with transfer to CityPersons, where the variational method reports an improvement from 42.8% to 41.5% on the highly occluded subset. The full model must beat greedy NMS, the variational method, GossipNet and the edge-only ablation, and must beat the decoupled exact-decoding ablation by more than the seed-to-seed spread. On COCO we expect parity with NMS, and a regression there would be a warning sign.
The third check is cost. We report per-image latency of clique enumeration and the layer solve, separately for typical components and for the largest ones. The method is a practical replacement only if the added inference time stays within the cost range of the NMS variants measured in Accelerating Non-Maximum Suppression on the median image.
References
- Segmentation as Maximum-Weight Independent Set
- Accelerating Non-Maximum Suppression: A Graph Theory Perspective
- CrowdHuman: A Benchmark for Detecting Human in a Crowd
- Learning Non-maximum Suppression
- The canonical facets of multi-separator polytopes
- Valid Cuts for the Design of Potential-Based Flow Networks
- Differentiable Integer Linear Programming
- Variational Pedestrian Detection
- Sparse R-CNN: End-to-End Object Detection With Learnable Proposals
- Sparse Semi-DETR: Sparse Learnable Queries for Semi-Supervised Object Detection