(5) Averaging two models
National Medical Insurance Imaging AI Contest, preliminary round, part 5: Neither quality nor H8 met the adoption bar on its own. Averaging their outputs with equal weights before NMS brought dev-set mAP17 to 0.172174 and platform validation to 48.01. A8, trained afterwards, and a three-way fusion did not beat it.
- CATEGORY
- Study
- YEAR
- 2026
- STATUS
- Note
- TOOLS
- pytorch / retinanet
entryWrite-up
In the previous note’s recipes, H8 did not meet the adoption bar on its own and did not replace single. H8 is a detection head trained separately under another recipe, from the same random initialization as single and on the same frozen features; quality is a detection head obtained by continuing training from single. On the platform, quality ran the full validation and scored 47.85 overall, 0.07 above single and short of the 0.10 improvement we had set ourselves in advance. The original plan called for rolling back to single. We re-assessed quality’s score and delivery risk: it was already deployed and had completed the full validation, the displayed safety score was unchanged, and we found no new delivery risk, so we kept using quality. The 0.07 gain did fall short of the original requirement; this was an engineering trade-off made after seeing the result, not a finding of statistical significance.
On 28 September we first looked for gains with the existing weights and inference pipeline. Taking half of single’s parameters and half of quality’s gave SQ50, which scored 0.164344 mAP17 on the 1,396-case dev set, below both original models. That ended parameter averaging, and we moved on to output fusion.
The same day, with about 64 hours to the deadline, we checked whether the outputs of two model pairs were complementary. Before evaluation we fixed two equal-weight combinations: E-SQ, made of single and quality, and E-QH, made of quality and H8. For the same anchor, the two models’ 17 class sigmoid probabilities and 4 box regression values were averaged at 0.5 and 0.5, with the averaging placed before NMS and a single decode after it. The fusion used existing weights at a fixed ratio, and the quality and H8 heads shared one backbone forward pass. The rule set in advance was that among combinations whose dev-set mAP17 beat quality, the highest would go on to downstream checks. E-SQ came in at 0.165575, below quality; E-QH reached 0.172174, 0.003690 above quality’s 0.168484. H8, not adopted on its own, raised AP when used together with quality. Only E-QH went on to downstream checks.
With the detection boxes changed, the regions T4 quantifies and the localization in T5 changed too, so attributes computed from the old boxes could not be reused. On 28 September we re-validated T4 and T5 with E-QH’s new boxes, then built a standalone release package and ran a 2-case HTTP integration test, a clean-environment startup and a health check. Total internal GT matches rose from 2,300 to 2,342; some quantified attributes were missing, so the quantification metrics over the full sample still could not be computed. The internal results supported going ahead with the release. After the service handover, quality was kept as the fallback version and a full platform validation run was started, with no new score at that point.
The platform result came back on 28 September: E-QH scored 48.01 overall, 0.16 above quality, with T3 up 0.28, T4 down 0.16, T5 up 0.05 and safety unchanged at 19.80. We made the deployed E-QH the default final candidate and accepted the actual outcome of a higher total with a lower T4.
On 28 and 29 September we checked whether the T4 drop was related to the box changes, and whether taking box regression from quality alone would do better. We first ran paired statistics on the existing 1,396-case cache, then tested Qbox, in which the class probabilities are averaged half and half from quality and H8 and the box regression comes from quality only. The statistics showed that quality and E-QH jointly detected 2,164 GTs, E-QH gained 178 and lost 136, and both missed 1,057; there was no systematic T4 regression internally. Qbox scored 0.165310 mAP17, 0.006864 below E-QH. We found no clear implementation bug, and the internal statistics use different samples and metrics from the platform. The cause of the T4 drop was not found. E-QH stayed in use, and Qbox did not go on to downstream or platform validation.
None of the existing candidates showed evidence of reaching 60. With the other components unchanged, a total of 60 would need T3’s contribution to rise from 4.95 to 16.94; these are platform contribution points, not a multiple of raw mAP. On 29 September A8 ran one more full training from the same RAD41 weight source, started and finished within the day. A8 started from quality’s detection head and trained the 12 encoder blocks and the final LayerNorm, with the patch embedding kept frozen; the control continued training the detection head only. Both ran a fixed 8 epochs on 11,242 cases, taking about 20 hours, while E-QH stayed in service. The control reached 0.156718 mAP17 and A8 0.161579, 0.004861 above the control and 0.010595 below E-QH. Both fell below quality before training, and the cause of the regression was not determined. The A8 single-model experiment ended there, without downstream checks, release or platform validation.
On 30 September, following what happened with H8, we checked whether A8, with lower overall AP, still had value in a fusion. We fixed in advance a scheme weighting quality, H8 and A8 at 1/3 each, analyzed complementarity on the existing match results first, and would fuse only if preset conditions were met. The statistics showed that A8 and E-QH jointly detected 2,103 GTs, E-QH alone 239, A8 alone 153, and both missed 1,040; of A8’s 153 unique detections, 147 had confidence below 0.25. The per-GT union of the two models’ detections is only an analysis result, not a deployable algorithm and not an upper bound on AP; and because A8 changed the encoder blocks, fusing it means running its own backbone separately. Evaluated in full on the 1,396 cases, with the original decoding and no search over other ratios, the three-way combination scored 0.171618 mAP17, 0.000556 below E-QH; A8’s unique detections did not turn into a gain in overall AP. The three-way fusion ended there. E-QH stayed as the final version, with no further T4 or T5 validation and no retraining, and the target of 60 was not reached.
On 30 September E-QH ran a last platform validation. The total was still 48.01, with safety at 19.80 and T3, T4 and T5 at 4.95, 15.60 and 7.66, the same as on 28 September; 48.01 is the platform’s model validation score and does not represent an official result. This stage followed two practices. Fusion combinations and ratios were fixed before evaluation, with no ratio search; a combination went on to downstream checks only if its dev-set mAP17 beat quality, and with no winner the line was closed without adding candidates; the limit of this approach is that the 1,396-case dev set was used many times, so the results above are not independent evidence of generalization. When the detection boxes change, T4 and T5 are re-validated on the new boxes, without reusing attributes computed from the old ones.
processBefore & after
Platform validation total
| ROI · 09-16 | 39.31 |
|---|---|
| single · 09-21 | 47.78 |
| quality · 09-27 | 47.85 |
| E-QH · 09-28 | 48.01 |
| re-run · 09-30 | 48.01 |
Breakdown: quality → E-QH
- T1 + T2 safety
- 19.80 → 19.80
- T3 detection
- 4.67 → 4.95 · +0.28
- T4 attributes
- 15.76 → 15.60 · −0.16
- T5 localization
- 7.61 → 7.66 · +0.05
Internal matches: quality → E-QH
- mass
- 111 → 114
- effusion
- 165 → 177
- total
- 2,300 → 2,342
Dev-set mAP17 (1,396 cases)
- single
- 0.165304
- SQ50
- 0.164344 · dropped
- E-SQ
- 0.165575 · dropped
- H8
- 0.167247
- quality
- 0.168484
- E-QH
- 0.172174 · adopted
- Qbox
- 0.165310 · dropped
- A8
- 0.161579 · about 20 h training · dropped
- Q/H/A8
- 0.171618 · dropped
resultTakeaways
- Finding
- E-QH scored 48.01 on platform validation, 0.16 above quality (T3 +0.28, T5 +0.05, T4 −0.16). A re-run on 30 September still gave 48.01, and E-QH was set as the final version.
- Parameters
- 0.5 quality + 0.5 H8 · 17-class sigmoid probabilities and 4 box regression values averaged before NMS · NMS 0.5 · up to 100 boxes
- Open
- 48.01 is a platform model validation score and does not represent an official result. The 1,396-case dev set was used repeatedly to choose between options, so it is not an independent test set. The platform T4 drop did not reproduce internally, and its cause was not found. The fusion ratio was fixed in advance and not searched.
logChangelog
- 2026-09-27
- Quality on platform validation: 47.85 (+0.07), kept in use
- 2026-09-28
- SQ50 weight averaging 0.164344, dropped
- 2026-09-28
- E-QH dev set 0.172174; platform validation 48.01
- 2026-09-29
- Qbox 0.165310, dropped; started A8 full-layer adaptation
- 2026-09-29
- A8 finished 8 epochs at 0.161579, below E-QH
- 2026-09-30
- Three-way fusion 0.171618; dropped it along with A8
- 2026-09-30
- Re-run 48.01; locked as final