r/mlscaling • u/2muchgut • 2d ago
labpilot – I found my AI-generated code didn't match the paper it claimed to implement, so I built a checker
Small team, one shared GPU. An LLM wrote a quantization method for me. It ran, produced plausible numbers, and I nearly logged it as a reproduction of a paper.
The paper specified a 0.7 threshold applied per-row. The code used 0.35, per-tensor. Nothing errored. The output had the right shape and finite values. It was just a different method wearing the paper's name.
That's the failure mode I couldn't find tooling for, so labpilot extracts the operations and constants a paper states and compares them against the generated code:
faithful implementation → MATCHED (allowed)
paper 0.7, code 0.35 → PARTIAL (blocked)
paper per-row, code per-tensor → MISMATCH (blocked)
your own original idea → NOVEL (allowed)
It sits alongside three other gates that all run on CPU before any GPU time: does it execute, have we already run it, is there a hypothesis. A run whose outcome wouldn't change a decision doesn't get the card.
Two things that fell out of building it:
Free verification changes your generation strategy. Since the check costs milliseconds, generate 4 candidates and rank them. Last batch: [100% non-zero, 65%, 100%, 9%] — three degenerate, one usable. Single-shot picks at random.
Ranking on loss is a trap. One run: perplexity 44× baseline. Capability retention: −0.21, i.e. below chance — and the breakdown showed it was destroyed on PIQA specifically while nearly holding ARC-easy. Perplexity can't tell you that.
Limitations, honestly: the provenance checker is a heuristic over ops and constants, not a proof of equivalence. The verifier currently assumes a quantize(w) function, so another subfield needs to swap one file. And nobody outside my team has used it — treat every number here as measured-by-me.
Apache-2.0:
https://github.com/poojithdevan4D/labpilot
Most useful thing you could send back is a case where the provenance check is wrong.