Skip to content
Back to the log
[insight]2026.11.227 min readdrawn by Muhammed Musthafa S · Founder & Lead Developer

I let AI agents improve a model. Half of the progress they claimed was luck.

I re-tested every improvement an AI agent claimed. Some were real. Many were not. The ones that survived were only about half as big as the agent said.

FIG. 00 · COVER

Where it started

An AI agent had been working on a small model for hours. Its log was full of one word: kept.

Each "kept" meant the agent had changed the training code, run it, and seen a better score. Score here means a number where lower is better. The agent changed something, the number dropped, and the agent kept the change. Then it tried the next idea on top.

It looked like progress. I did not trust it.

This is how I checked those wins, what I found, and the one cheap habit I now use because of it.

The problem with one run

Training a model has randomness in it. Not a bug, just how it works. The starting numbers are random, and the order of the data is random. So the same code can give a slightly different score each time.

Think of a basketball player shooting free throws. Ten shots, seven go in. Is that player a 70% shooter? Maybe. Or maybe it was a good night. Shoot ten more and you may get five.

An AI agent that tests each idea once is that player on one good night.

I measured how big the wobble was. I ran the exact same code again and again, and the score moved by about 0.001 each time, even on one single machine with the same seed. Changing the seed, which is the random starting point, moved it by about the same amount. My first small test had suggested that repeating the same seed barely moves the score. Later runs proved that wrong, so I am glad I kept measuring.

FIG. 02 · SAME CODE, DIFFERENT SCORES

Here is the uncomfortable part. Most of the agent's wins were about the same size as the wobble.

A test with do-nothing edits

First I tried something silly. I made 30 edits that do nothing useful. I nudged the learning rate by 1% up or down. No new idea, no real change.

On a single run, 20 of those 30 do-nothing edits "beat" the baseline.

Then I let a keep-the-best rule run on top of them, the same rule the agents use. Keep a change only if the score drops. After a few rounds, this rule showed steady "progress" from edits that did nothing.

I re-ran those record-setting edits on fresh seeds. The progress vanished. It was never there.

That was the first surprise. A rule that keeps whatever scored best on one run does not find improvements. It finds luck.

Then I let real agents run

Next I used real AI language models as the agent. Three runs, 60 attempts each. Each attempt: the model proposes a change to the training code, we run it, and if the score is better the change is kept.

Across the three runs, 24 changes were kept.

Then I took every kept change and tested it again on fresh seeds, five of them, always compared against the plain code on the same seeds.

Only 5 of the 24 held up clearly. Fifteen of them at least pointed in the right direction, which still leaves nine that made things slightly worse on fresh seeds.

I also tried 34 ideas I wrote by hand, the kind of thing an agent would try. Of the 16 that looked like wins, 6 held up. One of them, a change to the batch size, was a big and clearly real win. The rest were small.

So most single "kept" steps were not independently real. They were lucky rolls that got locked in.

The final result was real, but smaller

Here is the good news, and I want to be fair about it. When I took each agent's final code, the end of its 60 attempts, and tested it against the plain code on five fresh seeds, all on the same machine, it was better on average in all three runs. In two of them the gain was clear. In the third it was smaller, and the error bar touched zero, so I cannot say for sure that one is real.

But the gain was smaller than the agent believed. The agents' logs claimed improvements of roughly 0.008 to 0.012. On fresh seeds the gain was roughly 0.003 to 0.006.

About half.

FIG. 01 · CLAIMED VS REAL GAIN

This is the same free-throw story. The agent kept the best nights. The real shooter is good, just not as good as the best nights suggest.

A cheap fix

If wins are half luck, the fix is boring. Do not trust one run.

I simulated it. Say you try 100 ideas. If you keep anything that wins on one run, about 40 get kept, and about half of those are false. If you re-test each winner on just two more fresh seeds and keep it only if it still wins, the false share drops from about 49% to about 5%.

Two extra runs per winner. That is all.

I also tried a fancier statistical method that adjusts as it goes. I expected it to be cheaper. It was not. The simple re-test did just as well. My guess was wrong, and I am glad I tested it.

What I would not claim

I want to be careful here, because this is easy to overstate.

This was one small model, one dataset, one score. Small training runs. I do not know if the same thing happens with huge models. My guess is that the luck problem exists there too, but that is only a guess.

The agents were free AI models, and I had to switch between providers when one ran out of limit. So I cannot say which model is better or worse. One model did most of the work.

Only three agent runs. That is a small number, and the error bars are wide. The true share of real wins could be somewhat higher or lower than 21%.

One more thing. The per-step tests, the 21% and the 38%, compared runs done on different machines. The machines looked alike where I could measure them, but I did not check every one. For the final results I ran a clean check, with everything on one machine, and it agreed with the first test.

And my "replicated" test uses only three to five seeds. It can miss tiny real gains. So some changes I called luck may have been small but real.

If you use AI agents to improve things

Whether it is an agent tuning a model, a script tuning a website, or a person tuning a spreadsheet: the best result out of many noisy tries is usually inflated.

Do not build the next idea on top of a win you only saw once. Run it again, with a fresh seed or a fresh sample, before you keep it.

Test twice. Then believe it.

For the curious: the numbers

All scores are validation bits-per-byte on a small model. Lower is better. Differences are what matter.

QuestionResult
Same code, same seed, rerun (4 runs, one machine)wobble about 0.0011
Same code, same seed, rerun (6 runs, two machines)wobble about 0.0013
Same code, different seed (5 runs)wobble about 0.0014
First small test, 5 reruns on one machinewobble 0.0003 (too optimistic)
30 do-nothing edits, single run20 of 30 "beat" the baseline
Keep-the-best on do-nothing editsabout 0.003 of fake progress; gone on fresh seeds
16 hand-written "wins"6 held up on 5 fresh seeds (38%)
24 real agent "wins" (3 runs)5 held up (21%); 15 pointed the right way (62%)
Agent end products, claimed vs fresh (one machine, 5 seeds)about 0.012 to 0.006, 0.010 to 0.003 (error bar touches zero), 0.008 to 0.004
Re-test on 2 fresh seeds (simulation)false wins about 49% down to about 5%

Code and raw data are in the project files. The cheap verifier numbers come from a simulation, not from a live run, so treat them as an estimate.

#AI agents#research#statistics#machine learning

Share this post

LinkedInX

Enjoyed this entry?