Design Archive
中EN

(4) Recipes that missed the adoption bar

National Medical Insurance Imaging AI Contest, preliminary round, part 4: After single, we tried positive assignment, last-layer fine-tuning, a spatial residual, the optimizer, mid-level features, output count, learning rate and batch size. None met the adoption rule of beating single by 0.003. H8 came closest, and its weights were later used in output fusion.

L.04 / 14
CATEGORY
Study
YEAR
2026
STATUS
Note
TOOLS
pytorch / retinanet

entryWrite-up

The single detection head chosen in the previous part scored 0.165304 mAP17 on the 1,396-case dev set. From 23 to 27 September we tried several kinds of change on single, covering positive assignment, last-layer fine-tuning, a spatial residual, the optimizer, mid-level features, output count, learning rate and batch size, to see whether this single model could go any higher. The requirements for each experiment were fixed before evaluation; for a newly trained candidate to replace single, its dev-set mAP17 had to beat single by at least 0.003.

On 23–24 September we started with positive assignment. When the detection head trains, each GT is supervised through the positive anchors assigned to it. Counting how many positive anchors each GT actually received, 29.17% of GTs had 2 or fewer, so their supervision was thin. We switched to an ATSS-inspired assignment rule, which is not a full ATSS reproduction: positive anchors were picked by the mean plus the standard deviation of the candidate anchors’ overlap with the GT, and any GT left without a positive anchor was given one. The candidate and a control trained together; the control started from the same single weights, kept the original assignment, and continued for the same number of steps on the same sample order. The plan had been 5 epochs; before evaluation we tightened it to decide from the epoch-1 result whether to continue, with two preset requirements: beat the control by a preset margin, and beat single by 0.003. After epoch 1 the candidate was at 0.163841 and the control at 0.163259, both below single’s 0.165304. Neither requirement was met, so training ended at epoch 1; this conclusion covers only this one adjustment.

On 24 September we turned to last-layer fine-tuning and a spatial residual. The encoder under the detection head had been frozen throughout, and there were two things to check: whether the frozen features limited detection, and whether adding local spatial features helped. Each change got one epoch of paired training, with candidate and control trained at the same time. One unfroze the encoder’s last block; the other added a CNN branch on the same 518 input image to extract local spatial features and added them back as a residual, with the branch’s final projection zero-initialized so that its output was zero at the start of training and the model matched the original. The unfrozen candidate scored 0.161796 against a control of 0.162194; the spatial-residual candidate scored 0.153600 against a control of 0.156439, all below single. Both controls were dropping too, so the regression could not be put down to the unfreezing or the new branch alone. The spatial-residual branch still read the 518 input, so detail lost when the image was resized was not recovered; this result is also not enough to rule out other ways of adapting the backbone.

Continued training had now regressed several times: the controls in both previous experiments fell below single, and so did the matching continuation control for quality in the previous part. So we checked three things: we re-reviewed the annotations for explicit negative labels that the detection task allowed us to use; compared a fresh AdamW optimizer for continuation against restoring the optimizer state from the end of single’s training (the step count and both moment estimates); and, with the original detector frozen, compared a residual drawn from mid-level features against a last-layer residual with the same parameter count. No explicit negative labels that we were allowed to use turned up, so we kept the existing data and did not treat unlabeled images as negatives. Restoring the optimizer state gave 0.164026, below the fresh optimizer’s 0.164827. The mid-level residual candidate reached 0.166057, only 0.000034 above its control. The optimizer restore and the mid-level residual stopped there, with no further sweeps over layers or learning rates.

From 24 to 26 September we went back to single itself, checking whether the cap of 100 output boxes per image (top100) dropped valid candidates, and whether a lower learning rate could improve the final result. On the same single model we changed only the output cap, from 100 to 200, and left the other decoding settings unchanged. For the learning rate, the original recipe was learning rate 1e-4, batch 8, 20 epochs; another run lowered the learning rate to 5e-5, and both trained a full 20 epochs from the same random initialization. Input prefetching was added before these two runs, after first checking that inputs, model, optimizer and RNG states matched before and after the change. With top200, mAP17 was 0.164373 and there were 94,230 extra boxes; the 5e-5 run finished at 0.154446, below the original recipe’s 0.165304 (the same as single). We kept top100 and the original learning rate. Input prefetching let this round of full training finish, but timing on a short stretch does not represent the speed-up over a whole run.

On 26–27 September we tried another direction, comparing a higher learning rate, a larger batch and more epochs, with the completed original recipe serving directly as the control. There were four recipes: H8 was learning rate 2e-4, batch 8, 20 epochs, where the 8 in the name is the batch size; M16 was 1e-4, batch 16, 20 epochs; H16 was 2e-4, batch 16, 20 epochs; E30 was 1e-4, batch 8, 30 epochs. The four trained together and finished in about 24.14 hours. H8 led at 0.167247, 0.001943 above single and short of the preset 0.003; the other three all scored below single. Under the preset plan, only a candidate that cleared the bar would get one more random seed as a check; H8 did not clear it, so no second seed was run. The single-model comparison ended there for this round: single was not replaced, and the weights from all four recipes were kept.

The H8 weights were kept; its training result differed from single’s, and it was later used in output fusion. Each direction was tried with one specific setting and no broad sweep, so the conclusions cover only the settings tried. Why the controls also dropped during continued training was not resolved; none of the extra training steps, the sample order, the learning-rate schedule or overfitting could be ruled out.

processBefore & after

Dev-set mAP17 (1,396 cases)

single · baseline
0.165304
R1 assignment
0.163841
R2 last layer
0.161796
R3 spatial residual
0.153600
R5 restored optimizer
0.164026
top200
0.164373
Low LR 5e-5
0.154446
H8
0.167247 · +0.001943
M16
0.156649
H16
0.158323
E30
0.157283

resultTakeaways

Finding
None of the recipes met the adoption rule. The best was H8 (learning rate 2e-4, batch 8) at 0.167247 mAP17, 0.001943 above single and below the preset +0.003.
Parameters
Baseline single 0.165304 · 1,396-case dev set · mAP17 · adoption bar +0.003 · fixed end point per branch
Open
In several experiments the controls also fell below single after continued training, and the cause was not found. Each direction was tried with only one specific setting, so the conclusions cover only the settings tried.

logChangelog

2026-09-24
R0 / R1: 29.17% of GTs had 2 or fewer positive anchors; adding matches still fell short of single
2026-09-24
R2 / R3: last-layer unfreezing and spatial residual both dropped below single, along with their controls
2026-09-24
R4–R6: checked negatives, optimizer state restore and mid-level features; none cleared the bar
2026-09-26
top200 and a full 20-epoch run at learning rate 5e-5 both scored below single
2026-09-27
Ran the four recipes H8, M16, H16 and E30; H8 scored highest but missed the bar

Related experiments

note
L.03(STUDY)2026

(3) A new detection head

chest-xraypytorchrad-dino+1
note
L.05(STUDY)2026

(5) Averaging two models

chest-xraypytorchretinanet
note
L.01(STUDY)2026

(1) Choosing a base model

chest-xraypytorchrad-dino+1
← LabL.04 / 14
1 / 1

100%