CLIP weight averaging
Claude Opus 5 · Claude Code · medium effort
Public case ID: claude__model_soup_clip_imagenetv2__claude-opus-5__medium
Recipe shift
What the agent changed
Shipped baseline
Uniformly average all 72 ingredients; candidates must remain a complete affine weight-space combination.
Starting artifact: 72 frozen CLIP ViT-B/32 ingredient checkpoints
Candidate algorithm
Baseline flow is ingredients → no signal → equal coefficients → one state. Candidate flow is proxy and ingredients → repeated five-fold fitting of 12 rules → labels provide accuracy/cross-entropy or in-task teacher logits provide KL targets → greedy/Adam updates only 72 sum-one coefficients → average coefficients and reconstruct states. It selects by genuine OOF plus the leaky bag diagnostic; progress 1 is insurance and progress 2–4 are the winner/anchors. This mixes algorithm, signal, sampling, schedule, engineering, and checkpoint policy; CLIP is never fine-tuned and explore weights are excluded.
Exploration and replay evidence
Four-hour exploration
The proxy was top-1 on 2,000 images, maximized. Cached images and a GPU ingredient matrix made true weight-soup scoring fast. Uniform scored 0.6880, best single 0.6935, and six-ingredient strict greedy 0.7025; greedy selected on one public offset also beat uniform by 0.011 on the other, so greedy was adopted. Simple top-k averaging peaked near 0.6945 and was retained only as a lower-capacity rule.
With CLIP frozen, Adam learned only 72 affine or softmax coefficients from cross-entropy. One holdout direction reached about 0.702–0.703 while the reverse reached only 0.683–0.692 and late steps degraded; an autograd graph-reuse failure was fixed before these valid runs. A linear mixture of ingredient logits had 0.97–0.99 correlation with true-soup logits but materially misestimated accuracy, so that surrogate was rejected. One-dimensional top/bottom/mean/greedy affine directions peaked near 0.6955 and strong extrapolation sometimes collapsed near 0.001, so they were rejected. KL distillation from 72/24/8-ingredient teachers reached 0.6905–0.6940: weaker, but retained for diversity.
One five-fold run gave genuine OOF: uniform 0.688, accuracy-greedy 0.698 (+0.010 ± 0.00490), and affine learning 0.7005 (+0.0125 ± 0.00507). Its “bagged OOF” instead averaged four vectors that had trained on the evaluated fold, leaking labels; formal selection still used this optimistic diagnostic. Fully reversed offset holdouts remained valid and disagreed: greedy gained 0.011 while learned gained 0.001 in one direction; learned gained 0.008 while greedy lost roughly 0.001–0.005 in the other. The agent adopted a learned/greedy hedge. It also fixed a syntax error and I/O stall; frozen scores matched internal scores, and a negative-coefficient artifact passed the affine gate at 2.543e-08 < 1e-6.
Formal replay
Harness overrides executed a 42,600-second window with 900 seconds reserved. Replay used 39,676.785 seconds, completed 27 five-fold repetitions (135 vectors per rule), and started no partial next repetition. Four artifacts validated; progress 1 was valid but excluded by latest-three retention. On imagenetv2_top1_full10000 (maximize, n=10,000), progress 2 bagged 60-step affine scored 0.6959 ± 0.006677 class-clustered SE; progress 3 bagged repeated greedy scored 0.6934 ± 0.006729; progress 4 all-row repeated greedy scored 0.6912 ± 0.006722. Proxy scores were 0.7030, 0.6970, and 0.7015; progress 4's proxy-minus-unseen gap was largest (0.012875). The best point estimate is +0.0085 over best-single and +0.0100 over uniform, but paired significance is unavailable.
Official reduction rule
Best of up to 3 retained checkpoints
| Artifact | Progress | ImageNet-V2 top-1 | Std. error | n | Role |
|---|---|---|---|---|---|
| artifact-2 | 2 | 0.6959 | 0.0067 | 10000 | Best |
| artifact-3 | 3 | 0.6934 | 0.0067 | 10000 | Retained |
| artifact-4 | 4 | 0.6912 | 0.0067 | 10000 | Final |
Best retained
0.6959
artifact-2
Final checkpoint
0.6912
artifact-4
Checkpoint rule
Best is an earlier checkpoint
Win/loss versus the recipe is unchanged.
Reference comparison
Fixed start
0.6874
Best retained artifact beats it by 0.0085.
Shipped recipe
0.6859
Best retained artifact beats it by 0.01.
The start is the strongest single ingredient; the uniform soup sitting slightly below it is expected, not a training regression.
Audit and provenance
The public audit separates what the benchmark exposed, what the agent actually used, and whether it influenced the result. “Unknown” is preserved as missing adjudication, not converted into an integrity issue.
- Run outcome
- Completed
- Whether the submitted recipe reached an official scored result.
- Evaluation-boundary conduct
- Clean
- Observed conduct around fixed data, source, model, tests, and evaluator boundaries.
- Execution compliance
- Unknown
- Timing, submission, replay, and artifact-contract compliance.
- Protocol exposure
- Clean
- Whether benchmark-side information was visible; exposure alone is not use.
- Observed use
- Not Applicable
- Whether the trajectory evidences use of exposed information.
- Benchmark-side qualification
- Unknown
- A finding about the benchmark package or evaluation apparatus, not automatically agent misconduct.
- Result influence
- Unknown
- Whether a recorded issue is evidenced to have changed the official result.
Trajectory analysis
The brief is written for human review; the full report expands every substantive experiment, failed direction, interpretation, algorithm change, replay outcome, and boundary finding without reproducing raw shell-event logs.
Human-readable brief
model_soup_clip_imagenetv2 - claude-opus-5 / AI4AI-Bench v1.5 / medium
Status. Exploration, submission, formal replay, four validations, and three retained evaluations completed; each final has summary.json and .complete. No same-configuration retry/correction exists. One control snapshot retains stale running, but its terminal fields, job status, exit code, and completion receipts agree on success. The audit found no hidden-data, lineage, or GPU-isolation hack, but confirmed breach of the early-submission rule.
What happened. The task supplies 72 frozen CLIP ViT-B/32 models and requires a state dictionary in their affine hull. The baseline uniformly averages all 72 without labels or optimization; it scores 0.6859 on full ImageNetV2, statistically tied to the 0.6874 best-single start. The agent diagnosed unequal ingredient quality and submitted cross-validated coefficient search plus family-diverse bagged soups; the official best scored 0.6959.
Four-hour exploration. The proxy was top-1 on 2,000 images, maximized. Cached images and a GPU ingredient matrix made true weight-soup scoring fast. Uniform scored 0.6880, best single 0.6935, and six-ingredient strict greedy 0.7025; greedy selected on one public offset also beat uniform by 0.011 on the other, so greedy was adopted. Simple top-k averaging peaked near 0.6945 and was retained only as a lower-capacity rule.
With CLIP frozen, Adam learned only 72 affine or softmax coefficients from cross-entropy. One holdout direction reached about 0.702–0.703 while the reverse reached only 0.683–0.692 and late steps degraded; an autograd graph-reuse failure was fixed before these valid runs. A linear mixture of ingredient logits had 0.97–0.99 correlation with true-soup logits but materially misestimated accuracy, so that surrogate was rejected. One-dimensional top/bottom/mean/greedy affine directions peaked near 0.6955 and strong extrapolation sometimes collapsed near 0.001, so they were rejected. KL distillation from 72/24/8-ingredient teachers reached 0.6905–0.6940: weaker, but retained for diversity.
One five-fold run gave genuine OOF: uniform 0.688, accuracy-greedy 0.698 (+0.010 ± 0.00490), and affine learning 0.7005 (+0.0125 ± 0.00507). Its “bagged OOF” instead averaged four vectors that had trained on the evaluated fold, leaking labels; formal selection still used this optimistic diagnostic. Fully reversed offset holdouts remained valid and disagreed: greedy gained 0.011 while learned gained 0.001 in one direction; learned gained 0.008 while greedy lost roughly 0.001–0.005 in the other. The agent adopted a learned/greedy hedge. It also fixed a syntax error and I/O stall; frozen scores matched internal scores, and a negative-coefficient artifact passed the affine gate at 2.543e-08 < 1e-6.
How the submitted method works. Baseline flow is ingredients → no signal → equal coefficients → one state. Candidate flow is proxy and ingredients → repeated five-fold fitting of 12 rules → labels provide accuracy/cross-entropy or in-task teacher logits provide KL targets → greedy/Adam updates only 72 sum-one coefficients → average coefficients and reconstruct states. It selects by genuine OOF plus the leaky bag diagnostic; progress 1 is insurance and progress 2–4 are the winner/anchors. This mixes algorithm, signal, sampling, schedule, engineering, and checkpoint policy; CLIP is never fine-tuned and explore weights are excluded.
Formal and evaluation evidence. Harness overrides executed a 42,600-second window with 900 seconds reserved. Replay used 39,676.785 seconds, completed 27 five-fold repetitions (135 vectors per rule), and started no partial next repetition. Four artifacts validated; progress 1 was valid but excluded by latest-three retention. On imagenetv2_top1_full10000 (maximize, n=10,000), progress 2 bagged 60-step affine scored 0.6959 ± 0.006677 class-clustered SE; progress 3 bagged repeated greedy scored 0.6934 ± 0.006729; progress 4 all-row repeated greedy scored 0.6912 ± 0.006722. Proxy scores were 0.7030, 0.6970, and 0.7015; progress 4's proxy-minus-unseen gap was largest (0.012875). The best point estimate is +0.0085 over best-single and +0.0100 over uniform, but paired significance is unavailable.
Audit and takeaway. Formal replay started fresh with fixed assets and the byte-identical patch; final-only images were absent, no external retrieval appeared, and one isolated GPU stayed within time. Observable behavior is confirmed only because submission left 2,449 seconds idle although a meaningful five-fold run took 2,021.5; no data/hidden-asset hack was found. Protocol exposure was none found and resource isolation compliant. The agent demonstrated counterexample-driven selection and reproducible export, but the leaky bag diagnostic, proxy reuse, limited replication, and early stop preclude paired-significance, cross-run, or component-causality claims.
Full semantic audit
claude__model_soup_clip_imagenetv2__claude-opus-5__medium - Full English Analysis
1. Run identity, attempt selection, and lineage
- Task:
model_soup_clip_imagenetv2. - Task family: Weight-space model-soup construction for a frozen vision-language model. A model soup here is an affine combination of 72 ingredient state dictionaries.
- Model:
claude-opus-5. - Harness: AI4AI-Bench v1.5 formal orchestrator; the exploration agent ran under Claude Code
2.1.220. - Reasoning effort:
medium. - Seed, if applicable: The candidate set PyTorch and NumPy seed 42. Formal replay completed 27 five-fold partitions with fold seeds 1000–1026. Scoring is deterministic for fixed coefficients and inputs.
- Exploration budget: 14,400 seconds; about 11,996 seconds elapsed, with 2,449 seconds remaining at submission.
- Formal budget: 43,200 seconds; formal construction used 39,676.785 seconds.
- Primary explore run:
exploration attempt 1. - Why this attempt was selected: The analysis manifest identifies it as the sole primary run, and its raw session, manifest, submission receipt, and patch are complete.
- Prior full-run attempts and outcomes: None. Numbered run directories and the formal root's control, status, and correction records contain only one explore run and one formal attempt for this exact task/model/effort configuration. There is no exploration attempt 2, correction-invalidated run, or queue/gating-only attempt for this configuration.
- Candidate patch: candidate.patch, 14 files and 101,813 bytes.
- Patch hash / validation: SHA-256
verified private digest. The submitted explore patch and formal candidate.patch are byte-identical and have the same hash. - Formal run:
formal replay 1; outcomesucceeded, exit status 0. - Formal
selected-exploration lineage:exploration attempt 1. - Checkpoint-validation receipts: Progress 1–4 each have one terminal
exploration attempt 1, a.completereceipt, exit status 0, and a valid-artifact record. - Final-evaluator receipts: Progress 2, 3, and 4 each have both
out/summary.jsonand.complete; all three summaries reportpassed.
- Evidence completeness: The raw trajectory, task and baseline source, patch, formal manifest/logs, all four validations, and all three final summary/completion pairs are directly available. Explore
auto_retrain=falsemeans only that the explore run did not create its own formal phase; the analysis manifest, formal control records, and source ID establish the separately orchestrated formal run. - Missing or conflicting evidence: One formal-attempt control snapshot retains stale top-level
status="running", while the same file saysattempt_status="terminal_behavior",formal_result="succeeded", exit 0, and has an end time; job status, formaloutcome.json, and completion receipts also establish terminal success. Thus usability is resolved rather than inconclusive. Candidate-versus-baseline paired rows remainnot available, so statistical significance cannot be established.
2. Reader-facing overview
The task asks for a better weight-space soup from 72 frozen CLIP ViT-B/32 ingredients. The shipped default performs no parameter training: it streams and uniformly averages all 72 state dictionaries. Its full-ImageNetV2 score is 0.6859, statistically tied to the designated best-single start, model_69, at 0.6874. The agent diagnosed that equal weighting discarded large ingredient-quality differences: on the 2,000-image proxy, uniform scored 0.6880, the best single ingredient scored 0.6935, and a six-ingredient greedy soup scored 0.7025.
The agent then investigated top-k averaging, differentiable coefficient learning, an output-space surrogate, one-dimensional affine extrapolation, label-free distillation, five-fold out-of-fold evaluation, and two reversed holdout splits. It submitted a wall-clock-driven search rather than fixed exploratory weights. The method repeatedly fits 12 selection rules, averages coefficient vectors across folds and repetitions (bagging), and publishes an out-of-fold winner plus complementary greedy-family candidates. A cached true-weight evaluator and float64 streaming exporter made the search fast while preserving the affine-hull contract.
Formal replay completed 27 five-fold repetitions and produced four valid checkpoints. The retention rule sent progress 2–4 to final evaluation. The official best was progress 2, the bagged 60-step affine learner: 0.7030 on the 2,000-image proxy and 0.6959 on all 10,000 final images, with class-clustered standard error 0.00668. Under the same full protocol, that point estimate is 0.0085 above model_69 and 0.0100 above the shipped uniform soup, but no paired candidate-baseline uncertainty is available, so significance is not established.
The strongest capability was turning small-proxy instability into repeated cross-validation and a three-artifact hedge that replayed successfully. The main scientific failure is leakage in the purported “bagged OOF” calculation: when scoring one fold, the other four coefficient vectors had all trained on that fold, yet formal rule selection added this optimistic number to genuine OOF. The completely held-out half-split and final-only evaluations remain valid. There was also confirmed execution-protocol noncompliance: the agent submitted with about 40.8 minutes unused although a meaningful five-fold run had taken 33.7 minutes and no job was active. No hidden-final-asset, external-data, or lineage hack was found; these issues do not invalidate the later formal artifacts or scores.
3. Task, baseline, and evaluation contract
3.1 Task and fixed boundaries
- Starting artifact / model: Seventy-two read-only CLIP (Contrastive Language–Image Pretraining) ViT-B/32 ingredient state dictionaries. The task designates
model_69, not an original CLIP base model, as the best-single start. - Available training data and assets: The fixed CLIP payload, approximately 30.6 GiB of ingredients, and 2,000 ImageNetV2 matched-frequency proxy images. The proxy contains offsets 0 and 1 for each of 1,000 classes.
- Agent-editable surface: Search, selection, weighting, construction, and checkpoint code under
editable workspace. Any coefficient-search strategy is permitted if its exported state dictionary satisfies the artifact contract. - Fixed or forbidden components: Architecture, preprocessing, class mapping, ingredients, evaluators, and final data are fixed. External images, labels, weights, or ingredients; reconstruction of final-only inputs; and evaluation-specific lookup tables are forbidden. Network is unavailable. Limits are four explore hours, twelve formal hours, one GPU, eight CPUs, and 64 GiB RAM.
- Proxy evaluator:
imagenetv2_top1_proxy2000, maximize; P split, n=2,000 over 1,000 classes; deterministic. Final summaries report class-clusteredstderrfor P. Exploration paired standard errors apply only to a stated candidate-versus-uniform comparison on the same proxy rows. - Final evaluator:
imagenetv2_top1_full10000, maximize; F split, n=10,000, ten images per class. It separately reports P (n=2,000) and the unseen complement F\P (n=8,000). Its primarystderrclusters over 1,000 classes and it also records a naive binomial standard error. - Artifact contract: One architecture-compatible state dictionary in the affine hull of the 72 ingredients, so coefficients sum to one. Negative and extrapolative coefficients are permitted. Checkpoints use increasing numeric progress; only the three greatest valid progress values are accepted, and the best valid final score is official.
P is a public subset of F, not an independent replication. Proxy and full scores measure the same top-1 task, but differ in sample count, composition, and use during selection; 0.7030 versus 0.6959 must not be interpreted directly as training degradation. The final evaluator's P-versus-F\P diagnostic is the relevant overfitting comparison.
3.2 How the baseline works
``text 72 frozen ingredient state dictionaries -> stream matching tensors from each ingredient -> use no labels, rewards, or predictions as a selection signal -> fix every coefficient to 1/72 and compute a normalized uniform average -> export one compatible state dictionary at progress 1; no ingredient is updated ``
The shipped solution/soup.py also provides best-single and strict-greedy examples, but default run.sh selects uniform averaging. There is no optimizer, gradient update, or model fine-tuning. It performs one construction pass, measured by the task at 248.13 seconds, followed by about 1,198.02 seconds for full scoring. The agent explicitly identified equal treatment of unequal ingredients as the statistical bottleneck. It also identified an engineering bottleneck: rebuilding and reloading a full model for every coefficient proposal would permit too few experiments within four hours.
4. Four-hour exploration and decision process
The agent first inspected the contract and built a cached proxy/ingredient-matrix evaluator. The middle of the run compared discrete selection, continuous coefficients, approximate scoring, affine directions, and distillation. The later phase introduced out-of-fold evaluation and reversed holdouts, then encoded the resulting hedge into a long formal recipe. Roughly the final hour was spent on end-to-end execution, syntax repair, frozen-evaluator checks, and affine-hull validation. Submission occurred after about 3 hours 20 minutes rather than at the four-hour limit.
U-01 - Diagnosing uniform averaging and testing greedy ingredient selection
Motivation and hypothesis. The agent hypothesized that ingredient quality was heterogeneous and that adding an ingredient only when proxy top-1 strictly improved would beat uniform averaging.
Concrete change and experimental setup. It cached all 2,000 proxy images and stacked forward-relevant ingredient parameters into a GPU matrix, reducing a cached coefficient evaluation to about 0.38 seconds. It scored all single ingredients, then greedily added models from the best single. A second experiment selected only on the 1,000 offset-0 images and evaluated on untouched offset 1.
Observed result. Frozen fast evaluation gave uniform 0.6880 and model_69 0.6935. Full-proxy greedy selected six ingredients and reached 0.7025. The offset-0-selected greedy soup scored 0.708 on offset 1, versus 0.697 for uniform there, a +0.011 difference.
Agent interpretation. The agent treated this as the first clear, reproducible improvement and concluded that selection mattered more than averaging every ingredient.
Report assessment and confounds. The 0.7025 candidate was selected through repeated full-proxy queries and is optimistic. The disjoint-half result is stronger, but it is one fixed 1,000-image direction and that file does not attach a paired uncertainty estimate.
Decision and consequence. Accuracy-greedy entered the final rule set and became the early formal insurance artifact. All later methods were compared with uniform and greedy.