Train a simulated fly brain to review code changes
Nick Nisi trained Google's simulated 176,422-neuron fruit fly brain to judge code changes; he reports it agreed with automatic tests on 290 of 301 changes it had never seen.
Done with Other
What they did
Nick Nisi asked an agent whether Google's 176,422-neuron fruit fly brain simulation could run on a laptop. Then he asked if it could do something useful for engineers, like reviewing code. The fly can't read code, so a model called Jev answered thirty yes/no questions about each change, and those answers became the fly's input. He labeled good and bad parts of the code by deliberately breaking it to see if tests caught it, then trained the fly's memories on those labels.
How it went
The author reports that on 301 changes it had never seen, the fly agreed with the tests 290 times. A simple, standard statistical method using the same thirty answers got 298.
Worth knowing
A plain statistical method beat the fly. A commenter suggested splitting results by type of change, such as tests, code tidy-ups and changes in behavior, since overall agreement can hide a weak area that matters.
Try it yourself
Help me run an experiment on automated code review for [repo URL]. First, define thirty yes/no questions that describe a code change, for example whether it touches core business logic or changes tests. Then run mutation testing to label which changes are good or bad. For each change in [commit range], answer the thirty questions and train a simple classifier, starting with logistic regression, to predict the test outcome. Hold out unseen changes for evaluation and report agreement overall and by change type (tests, refactors, behavioral changes). Show me the question list and plan before running anything.
Swap the highlighted [parts] for your own details.
Source: DEV Community · Nick Nisi · Oct 14, 2026
Written with AI assistance from the original post and checked against our editorial guidelines. Results are as reported by the source, not independently verified.