A
OREKID / RESEARCH NOTES
Private repository · curated record
Anomaly detection · DINOv2 · parameter-efficient adaptation

What we tried.
What survived.

A decision-oriented history of the AnomalyDINO experiments. Each milestone records the hypothesis, the branch that implemented it, the measured outcome, and why the next research step changed direction.

MVTec AD 2 · 8 categoriesDINOv2 ViT-S/14 · 448 px4-shot normal supportSeed 0 unless noted
Best AUROC65.09%Four-adapter ensemble · MVTec AD 2
Best AP77.71%Frozen baseline · MVTec AD 2
Best F182.26%Four-adapter ensemble · MVTec AD 2
Ensemble latency0.532 sPer sample · 3.35× frozen baseline

Research timeline

From representation adaptation to the current ensemble candidate.

Select any step to expand
EARLY VisA EXPERIMENTS
Prototype supervision beats consistency matching
A change in the adaptation objective produced a measurable gain.
Useful finding

The early LoRA comparison tested a prototype-based objective against feature consistency. The prototype objective gave the stronger result, motivating the later support-set prototype formulation rather than treating teacher/student consistency as the default adaptation target.

Prototype AUROC 85.69%Consistency AUROC 81.98%Gain +3.71 pp
  • Prototype: AUROC 85.69%, AP 82.63%, F1 81.28%.
  • Consistency: AUROC 81.98%, AP 76.59%, F1 78.57%.
  • This is a VisA experiment, not directly comparable with the later MVTec AD 2 table.
PROXY VALIDATION
Leave-one-shot-out validation becomes the adaptation control
Use the support set itself to validate normality learning without using test anomalies.
Method established

The proxy-validation line uses four folds for a four-shot support set. In each fold, three normal support images train the adapter and the held-out normal image validates it. This provides a repeatable way to inspect normal-feature behavior while keeping synthetic defects disabled for the reported MVTec AD 2 comparison.

  • Four leave-one-normal-shot-out folds: 3 support images for training, 1 held out for validation.
  • The validation signal is diagnostic; it is not proof that anomaly ranking improves.
  • The single-adapter route trains a final normal-only proxy adapter after fold validation.
Single proxy adapter AUROC 61.64%AP 74.47%F1 81.25%0.147 s/sample

On the MVTec AD 2 seed-0 comparison, this did not beat the frozen baseline on AUROC or AP, though it was slightly faster and raised F1 by 0.75 percentage points. This branch became the common foundation for the later proxy experiments, not a final performance win.

27 OCT 2026 · BASELINE CHECK
Frozen features remain a stronger reference than one adapted student
The first MVTec AD 2 comparison exposes the cost of adapting only on normal support.
Reference point

The frozen DINOv2 feature bank is the control for the subsequent MVTec AD 2 experiments. Across the eight public categories, it outperformed the single proxy adapter on AUROC and AP. This is an important constraint: improving normal compactness or fitting a proxy objective does not guarantee better separation between normal and anomalous queries.

AUROC 64.46%AP 77.71%F1 80.50%0.15872 s/sample

All values in this section are seed-0 macro results. They are a useful development reference, not a multi-seed statistical claim.

29 OCT 2026
Cross-fold consensus student does not transfer teacher agreement into better anomaly ranking
Four final-epoch fold teachers supervise one additional 40-epoch student.
Dead end for now

The corrected implementation freezes each fold's final-epoch adapter as a teacher. A new student is then trained for a full 40 epochs. For every support image, one student view is matched independently to four independently augmented teacher views; the four patchwise cosine losses are averaged rather than collapsing the teachers into one averaged target. Best-validation epochs are diagnostic only, not the teacher checkpoints.

Measured result · MVTec AD 2

AUROC 60.22%AP 74.31%F1 80.84%0.16894 s/sample
  • Versus frozen baseline: AUROC −4.24 pp, AP −3.40 pp, F1 +0.34 pp.
  • Versus the single proxy adapter: AUROC −1.42 pp, AP −0.16 pp, F1 −0.41 pp.
  • Versus the earlier averaged-target consensus run: AUROC −0.71 pp and AP −1.10 pp, with F1 +0.22 pp.
  • Fabric AUROC fell from 56.13% in the legacy consensus result to 45.19% in the corrected result; fruit_jelly improved from 72.08% to 79.50%.

Why this became a dead end

The student objective rewards teacher imitation plus normal-bank compactness. With synthetic defects disabled, there is no explicit term pushing anomalous queries away from the normal region. A falling teacher-matching loss therefore demonstrates imitation, not improved anomaly separation. The fabric regression reinforces that the cross-fold compromise can remove useful discriminative variation.

Decision: do not increase consensus weight or training duration based on this run. Teacher disagreement and student-to-each-teacher losses are useful diagnostics before any further consensus experiment. Results are one seed only.

29 OCT 2026
Four-adapter ensemble becomes the strongest measured candidate
Each adapter scores queries in its own feature geometry; anomaly maps are fused after scoring.
Best candidate

Instead of forcing four fold adapters into one student feature space, this branch retains the four fold-best models selected by proxy validation. Each model independently encodes all four normal shots to build its own feature bank, scores the query in that model's geometry, and contributes a patchwise anomaly map. The maps are averaged. Embeddings from different adapters are not concatenated.

Measured result · MVTec AD 2

AUROC 65.09%AP 77.28%F1 82.26%0.53208 s/sample
  • Versus frozen baseline: AUROC +0.63 pp, AP −0.43 pp, F1 +1.76 pp.
  • Versus corrected consensus: AUROC +4.87 pp, AP +2.97 pp, F1 +1.42 pp.
  • Inference is about 3.35× slower than the frozen baseline and 3.15× slower than corrected consensus.
  • Per-adapter diagnostic JSON/CSV files were generated in local result folders, but were not committed with the run logs; image-level disagreement and false-positive/false-negative analysis still requires those files.
  • Category AUROC: can 29.00%, fabric 63.37%, fruit_jelly 80.58%, rice 79.76%, sheet_metal 73.24%, vial 76.03%, wallplugs 33.63%, walnuts 85.11%.

Why it survived

It preserves each fold adapter's own feature geometry rather than distilling potentially disagreeing representations into a single student. It is the best observed AUROC and F1 in the current MVTec AD 2 comparison, but it is not a clean win on every metric: frozen features still have slightly better AP, and the ensemble is substantially slower.

Decision: keep as the lead candidate, inspect the per-adapter diagnostics and false-positive/false-negative lists, then repeat paired seeds 1 and 2 (preferably more) before making a general performance claim. Alternative score-fusion variants remain exploratory because choosing among them on the same public test labels would introduce test-set selection bias.

Metric comparison

Matched MVTec AD 2 development runs · macro averages · seed 0.

Higher is better for all three metrics
MethodAUROCAPF1Inference / sample
Frozen baseline64.46%77.71%80.50%0.15872 s
Single proxy adapter + refit61.64%74.47%81.25%0.14704 s
Legacy averaged-target consensus60.93%75.41%80.62%0.19042 s
Corrected four-teacher student60.22%74.31%80.84%0.16894 s
Four-adapter ensemble65.09%77.28%82.26%0.53208 s

The table combines one-seed runs from the same MVTec AD 2 evaluation setup. It is a decision aid, not a statistical comparison. Best-in-column values are highlighted.

Branches that matter to the decision

Only branches with a material result or a methodological role are listed here.

main

Frozen AnomalyDINO reference and the control point for MVTec AD 2 comparisons.

feature/class-prototype-loss-change

Early VisA evidence: prototype objective outperformed consistency matching.

anom-proxy-validation

Leave-one-shot-out proxy-validation foundation; original base is feature/proxy-val.

anom-proxy-crossfold-consensus

Corrected four-teacher student. Retained for reproducibility, but currently a dead end on the benchmark.

anom-proxy-four-adapter-ensemble

Lead candidate: best AUROC/F1, with a clear inference-time trade-off.

Current research decision

Do not spend more compute on longer consensus training yet. The ensemble is the strongest measured route, but its latency penalty needs to be addressed and its gains need multi-seed confirmation. The next decisive work is diagnostic inspection of the four independent banks and paired-seed evaluation—not another round of low-impact adapter-depth or rank sweeps.