Skip to content
All writing

AI research · September 28, 2026 · 8 min

Reproducibility is a feature, not a chore

What building a multi-agent RL platform taught me about replay digests, pre-registration, and publishing your own corrections.

AION is a research platform I built to study a question I find genuinely hard: when do autonomous learning agents, with partial observation, scarce resources, and only a noisy channel between them, develop collective behavior nobody programmed? It is numpy and PyTorch from the ground up. No LLMs, no frameworks, two to sixty-four recurrent agents in a procedural 2D world, trained with PPO, talking through a bandwidth-constrained learned channel.

The scientific question is interesting. But the thing I want to write about is the part of the project that took almost as long as the science: making every result reproducible to the point where the software itself refuses to let me fool myself.

Why I did not trust myself

Multi-agent reinforcement learning is notorious for results that do not replicate. Seeds matter enormously. Small config changes have large effects. It is trivially easy to run twenty experiments, notice the one that looks exciting, and build a story around it. I have read enough papers with that shape to know I would do it too, given the chance.

So the design principle was: remove the chance.

What every run records

Every training run writes, before anything else happens:

  • The git commit hash, and whether the working tree was dirty
  • The random seed
  • A digest of the fully resolved configuration: not the file you passed in, but the config after every default and override was applied
  • Checkpoints at fixed intervals

The dirty flag is the one people skip. If the tree was dirty, the commit hash does not describe the code that ran, and the run is marked as such. It can still be useful for exploration; it cannot be cited.

Replay that fails on divergence

Recording the inputs is table stakes. The piece I am proud of is replay.

When an evaluation episode runs, the engine writes a per-step digest of the complete world state: agent positions, resources, channel contents, RNG state. Later, aion replay reloads the checkpoint and config, re-runs the episode, and compares digests step by step. Any divergence fails the replay with the first step that differed.

This caught real bugs. A non-deterministic iteration order in a dictionary. A place where PyTorch's default nondeterministic kernels crept in. A config override that applied in training but not in evaluation. Each of those would have produced results that were approximately right and silently unreproducible. The replay check turned them into hard failures.

Learning validation against known answers

Before claiming the agents learned anything in the real environments, the learning stack has to pass tasks where the right answer is known analytically.

A four-armed bandit: does the policy converge to the best arm at the expected rate? A memory task designed so that a feedforward policy provably cannot beat chance but a recurrent one can: does the recurrent policy beat chance, and does the feedforward one fail to? If either test fails after a refactor, the refactor broke learning, and no downstream result is trustworthy until it passes again.

There is also a test that the privileged critic information in MAPPO never leaks into the policy network. IPPO and MAPPO share one PPO loop and differ only in what the critic sees; the test ensures that boundary holds, because if it did not, the comparison between them would be meaningless.

Pre-registration, ablations, and corrections

The last layer is methodological rather than technical.

Experiments are pre-registered: a document states the hypothesis, the metrics, the comparison, and the decision rule before the runs happen. The ablation runner computes confidence intervals and effect sizes across seeds, not point estimates from one run. A failure-detection pass looks for runs that diverged or collapsed so they are reported rather than quietly dropped.

And there is a claims directory. Each claim the project makes is written down with its supporting runs, and it has been audited. One audit found a claim that did not hold under the pre-registered protocol. The correction is published in the repo alongside the original.

That last part felt uncomfortable and was the most important thing I did. A research codebase that cannot say "I was wrong" in writing is not doing research.

Why this matters outside research

I build production systems most of the time: agent security, identity infrastructure, payment platforms. The reproducibility habits from AION transfer directly.

A verification engine that scores AI agents needs to be able to replay a decision and get the same answer. A backtesting engine needs point-in-time snapshots so results cannot be contaminated by future data. An incident investigation needs the config that was actually live, not the one in the repo.

Reproducibility is not a chore you do for reviewers. It is the property that lets you trust your own system when it tells you something surprising, and surprise is the only time it matters.

Written by

Samuel Ojerinde · AI Software Engineer

Next: LLM judges need deterministic rails