Nested Detection Condensation That Keeps Small Objects in Every Budget

Dataset condensation shrinks a large training set into a few hundred synthetic images, so that a model trained on them approaches a model trained on everything. It has recently been made to work for object detection. Fetch and Forge (DCOD) first trains a detector on real data and then reconstructs images from it, a step called model inversion. It reports 46.4% AP50 on Pascal VOC from 1% of the images. Its output, however, is built for one fixed size. If a device can only afford half as many images, the whole set must be regenerated. Methods that remove this rigidity exist only for small classification images: they produce "nested" synthetic sets, where every prefix is itself a good training set. We suspect that cutting a detection set down hurts unevenly. Small objects are encoded weakly by the image-wide feature statistics that cheap condensation matches. They should therefore be the first thing lost when a set is truncated, much as they are the first thing lost when a network downsamples its feature maps.

We propose to build and test a single condensation run that produces a nested synthetic detection set. Each prefix of the set must match feature statistics that the teacher detector computes separately inside small-, medium- and large-object regions at each level of its feature pyramid (the stack of feature maps at decreasing resolution that a detector uses to find objects of different sizes). The claim has two parts. The first is a diagnostic that nobody has reported: under naive truncation, small-object AP collapses faster than overall AP. The second is a method: scale-stratified, nested inversion keeps small-object AP across budgets from 0.1% to 1%. It should do so at roughly the cost of one DCOD run, compared with one run per budget.

What exists and what is missing

Flexible-size condensation comes in three forms. Multisize Dataset Condensation (MDC) optimizes all prefixes jointly. It uses a loss on sub-budgets, picks the currently "most learnable" prefix to update, and freezes prefixes once they stabilize. It improves IPC-1 accuracy (one synthetic image per class) by 22.17% on CIFAR-10 over naive truncation. Slimmable Dataset Condensation and YOCO instead condense once at a large size and prune afterwards using learned importance scores. DiM distills into a generator and samples on demand, which moves the cost into student training. All of these motivate our nesting objective. All of them are evaluated only on 32×32 to ImageNet-10-scale classification, where the object fills the frame.

Scalable condensation for high-resolution images avoids the memory cost of unrolled bilevel optimization. Bilevel optimization updates synthetic pixels by differentiating through simulated student training, and its memory grows with pixel count, as documented in Scaling Dataset Distillation to High Resolutions. The scalable methods instead match single-level statistics. SRe²L inverts a teacher by matching its batch-normalization running means and variances. Teddy shows that gradient matching approximately reduces to matching layer-wise means and variances. Distribution Matching matches embeddings from random networks. These works supply our method family, but they also expose the flaw we target. Their statistics are averaged over the whole spatial map, so an 8×8 object barely moves them. LIP makes the analogous point for architectures: uniform pooling dilutes small foreground. Replacing it with learned importance-weighted pooling raised Faster R-CNN AP_s on COCO from 21.9% to 24.0%.

DCOD is the closest work. Its Foreground-Background Decoupling suppresses background updates during inversion, and its Incremental PatchExpand tiles each synthetic image into label-guided patches. It has no nesting, it does not separate foreground by object scale, and it reports no AP_s. Foreground-Aware Dataset Distillation preserves small objects by choosing high-resolution crops. It does this for selection-based classification at a fixed budget, and it pays for it with a Grounded SAM2 pass over the dataset. Our scale stratification instead uses the ground-truth boxes a detection dataset already has, so it adds one forward pass of the teacher and no foundation model.

Core Claim

Let $S_{1:k}$ be the first $k$ synthetic images. Let $\mu_{l,s}$ and $\sigma^2_{l,s}$ be the teacher's channel means and variances at pyramid level $l$, computed only over feature positions that fall inside boxes of size bucket $s$ (small, medium, large, plus background). Let $\hat\mu_{l,s}$ and $\hat\sigma^2_{l,s}$ be the same quantities measured once on the real training set. The per-prefix statistic loss is

$$\mathcal{L}_k = \sum_{l}\sum_{s} w_s\left(\lVert \mu_{l,s}(S_{1:k}) - \hat\mu_{l,s}\rVert^2 + \lVert \sigma^2_{l,s}(S_{1:k}) - \hat\sigma^2_{l,s}\rVert^2\right),$$

where $w_s$ upweights small objects in proportion to how little they contribute to the global statistics. On the synthetic side, positions are assigned to buckets using the box labels that DCOD's patch scheme already attaches to each synthetic patch.

The full objective is $\sum_{k\in K}\lambda_k(\mathcal{L}_k + \mathcal{L}^{\text{det}}_k)$ over a set of budgets $K$. Here $\mathcal{L}^{\text{det}}_k$ is DCOD's detection and logit term restricted to the prefix. The weights $\lambda_k$ are set with MDC's most-learnable-prefix selection and freezing rule. The new ingredient is not nesting by itself. It is the requirement that every prefix reproduce the small-object statistics at the high-resolution pyramid levels, which global batch-norm matching lets the optimizer ignore.

Research Program

The work proceeds in three stages. The first is the diagnostic. We run DCOD once at 1% on VOC, COCO and VisDrone-DET2019. We then truncate the set by random order and by YOCO-style importance scores to 0.5%, 0.25% and 0.1%. Students are trained on each truncation, and we report AP, AP_s, AP_m and AP_l alongside DCOD re-run independently at each budget. If AP_s under truncation does not fall disproportionately, the premise of the method is wrong, and the project reduces to an honest negative result about nesting for detection.

The second stage implements the nested, scale-stratified inversion on top of DCOD's released-style pipeline (Faster R-CNN or YOLO-family teacher, 512×512). We track total GPU hours to produce all four budgets.

The third stage tests the claim's two components separately. Nesting with global statistics isolates the effect of nesting. Stratified statistics at a single fixed budget isolates the effect of stratification. We also swap in a LIP-pooled teacher to see whether the architectural fix and the data fix overlap.

Baselines

The naive reference points are a random real subset at each budget and full-data training. DCOD reports Random at 4.9% mAP on VOC at 0.5% compression, against its own 14.2% mAP, and full-data VOC training at 76.4% AP50. We will add K-Center and Herding selection, which DCOD reports it beats on VOC and COCO. These are run with the same detector, schedule and augmentation used for every synthetic set.

The strongest existing method is DCOD run separately at each budget. It reports 46.4% AP50 on VOC at 1%, 14.2% mAP on VOC at 0.5%, and 24.7% AP50 on COCO at 1%. No reported result was found on Lacuna for DCOD's AP_s, for DCOD below 0.5%, or for any condensation method on VisDrone-DET2019. Those cells will be produced by us under DCOD's protocol. Per-budget DCOD is the upper bound on what a dedicated set achieves, so the fair comparison is on two axes. On accuracy, each nested prefix is compared with its dedicated counterpart, using the same teacher, image resolution, student schedule and an equal hyperparameter search budget. On cost, the single nested run is compared with the summed cost of four DCOD runs. Beating it means matching dedicated-DCOD AP within about one point at 1%, since MDC reports a small "flexibility tax" at the largest budget. It also means meeting or exceeding dedicated-DCOD AP_s at 0.25% and 0.1%, at well under half the total GPU hours.

The most dangerous cheap competitor is DCOD-at-1% followed by YOCO-style importance pruning, with an added per-scale quota that preserves small-object patches. It costs one condensation run plus scoring. Our method must beat it on AP_s at the smallest budgets to justify optimizing the prefixes rather than only ordering them.

The two ablations described in the research program, nesting with global statistics and stratification without nesting, show which ingredient carries any gain.

Why not just…?

Why not just run DCOD once per budget? It works, and it is our accuracy ceiling. The cost of producing $|K|$ budgets grows linearly with $|K|$, and each new deployment budget forces another inversion. MDC's classification result, parity with IDC in 0.6 instead of 11.5 hours, suggests joint optimization can be much cheaper. Whether that holds for 512×512 detection inversion is measured directly by our cost comparison.

Why not just prune one large condensed set, as YOCO does? This is the real threat. Pruning ranks whole images, and in detection a single synthetic image carries many patches of mixed object sizes, so a ranking driven by overall loss may discard most small-object content. A scale-quota pruning variant tests exactly this. If it matches our method on AP_s, the honest conclusion is that ordering suffices and joint nested optimization is unnecessary. We would report that and recommend the cheaper method.

Why not just select real images or high-resolution chips? Real images keep tiny objects at native resolution with no synthesis cost, and chip mining helped on VisDrone in the challenge results VisDrone-DET2019. Selection nonetheless lags condensation badly at small budgets: Random versus DCOD at 0.5% on VOC is 4.9 versus 14.2 mAP. DC-BENCH shows the advantage of synthesis is largest exactly at small budgets and vanishes at large ones. We therefore include K-Center and small-object-chip selection at every budget. We also use K-Center as initialization for our method, which DC-BENCH found helps.

Why not just fix the backbone with learned pooling instead of changing the data? LIP's AP_s gain shows the architecture matters. But a LIP-pooled teacher still produces global batch-norm statistics dominated by large regions, and the student that trains on the condensed data may be a different network. The LIP-teacher arm tells us whether the architectural and data-side fixes are additive or redundant.

Decisive Checks

The project succeeds if three things hold. First, the diagnostic shows that AP_s drops more steeply than AP under truncation of a fixed DCOD set on COCO and VisDrone. Second, nested stratified inversion closes most of that AP_s gap to dedicated DCOD at 0.1% and 0.25%, while staying within about a point of its AP at 1%. Third, it beats scale-quota pruning on AP_s at the smallest budgets, at less than half the GPU hours of four separate DCOD runs.

The project fails cleanly in either of two ways: truncation turns out not to hurt small objects disproportionately, or quota pruning matches the method. Either outcome is informative for anyone deploying condensed detection data under variable budgets.