A small learning brain that learns new kinds of tasks quickly from its own experience. Research by Khive Labs, Islamabad.
What it is
libbrain4 is a learning library written in C and CUDA. A trained brain is about 400 KB. It learns by acting: it tries things, sees what happens, and adapts. It is built to cope with a new kind of task, not just a new level of one it already knows.
Our goal is a general learner that needs less experience than a human to pick up a new task. We measure that directly: how many tries the brain needs before it gets a task right, compared with standard methods and, where data exists, with people and animals.
Results so far
All results are from our own runs. Scores are the share of the best possible score, averaged over many separate lives (fresh brains on fresh task draws), with standard errors where shown.
Test
brain v4
Comparison
Held-out task families (whole kinds of task never seen in training)
0.38–0.39
RecurrentPPO 0.076
MinAtar Breakout: steps to reach the score threshold, fresh seeds
60k steps
PPO 85k steps
Harlow learning-to-learn: success on the second try of a new problem
up to 0.78
reaches the level monkeys show after long practice
Training task families
0.72–0.74
Caveats we take seriously. The PPO and RecurrentPPO baselines were run with standard settings, not tuned with the same budget we gave our own brain. The held-out benchmark is our own. Some comparisons used few seeds. So the next step is a fair test: tune the baselines with an equal budget, run 10 seeds, add public benchmarks such as Atari 100k, and publish every result, including where brain v4 loses.
How it improves
1. Ways of learning, chosen by situation
The same trained brain can live with different learning settings: how fast it changes, how much it explores, how long its short-term memory lasts. We search for good settings with an evolutionary search that is checked on separate validation tasks. The current best, “chain D”, is strongest at memory and matching. A second set, “evo”, is better in open spaces such as foraging and mazes. The brain now recognises its situation and switches between the two. Confirmed on fresh tasks, this lifted held-out score by about 0.02 over either setting alone, and choosing perfectly by task family would give 0.43, so there is room left.
2. Experts on a shared core
The brain grows a few specialist parts (“experts”) on top of a shared core and learns which situation calls for which. We found that a handful is enough: given room for 8 or 32, it still uses fewer than two at a time, and extra room makes training worse.
3. Rewriting its own learning rules
The brain’s learning rule is itself a small program. A rule editor, which is itself a brain v4, proposes edits to it. Each edited copy (a “child”) lives many fresh lives, and is kept only if it learns better than its parent and passes a second check on new lives. One confirmed change so far improved learning on delayed-reward tasks. It was found by random search, not yet by the editor. The current round tests whether the editor can find improvements nobody showed it.
4. Making its own problems
We let the brain invent its own practice problems and solve them, growing them as it gets better. Its problems come out bigger and less trivial than random ones (mean size 5.4 against 3.7), and problem size grows until it levels off around 10. We are now measuring whether this makes it faster at genuinely new tasks.
Demos
MinAtar Breakout. Left: random play, for scale. Right: brain v4 after learning.
A maze demo is on its way: brain v4 learns an 11×11 maze in about 50 episodes.
Research log
Switching ways of learning beats either one alone
Living “chain D” first and “evo” second, chosen by situation, scored 0.391 held-out against 0.370 for chain D alone, on three blocks of fresh tasks no setting was chosen on. The lead held in all three blocks. It keeps chain D’s matching skill and gains in open spaces, at some cost to memory.
The brain makes its own curriculum
Asked to invent and solve its own problems, the brain chose problems bigger and less often trivial than random ones, and kept raising difficulty for the first 80 of 200 rounds. Whether this helps on new tasks is being measured now.
First confirmed self-edit of a learning rule
One edit to the brain’s learning-rule program held up on two independent sets of 64 fresh lives per task family. The gain is small and mostly on delayed-reward tasks. The test gate, not the proposer, was the bottleneck, so the gate now looks at more lives before deciding.
Faster than PPO on MinAtar Breakout
On fresh seeds, brain v4 reached the score threshold in 60k environment steps against PPO’s 85k, using about 20% less estimated energy.