# Research rationale and references

## What is being tested

Can the supplied fly connectome serve as a fixed recurrent substrate for generating correct programs? This is an empirical question. A wiring diagram alone does not specify a living brain's full dynamics, and a neuron count is not equivalent to an LLM parameter count. This project tests an artificial rate model constrained by that diagram, with an external learned decoder.

The [MaleCNS publication record](https://www.janelia.org/node/70503) describes approximately 166,700 neurons across the brain and nerve cord. The [official download catalogue](https://male-cns.janelia.org/download/) provides the v1.0 annotation and segment-to-segment count tables. In the cached files, the explicit `Traced` policy selects 165,122 neurons. The UI uses this measured count. Other records include glia, fragments and incompletely assigned segments; padding to 167,000 would invent neurons. See `data/graph/manifest.json` for the status inventory and exact exclusions. Data attribution: HHMI Janelia FlyEM, Cambridge/MRC LMB and Google Research; CC BY 4.0. Original cache retrieval date is unknown.

## How code LLMs learn and solve tasks

Autoregressive language models encode a text prompt and repeatedly predict a distribution over the next token. A generated program is a sequence of these predictions; it is not automatically a verified solution. Pretraining on large text/code corpora learns syntax, program patterns and reusable representations. Supervised instruction tuning supplies examples of task descriptions paired with answers. Some systems subsequently optimize from execution outcomes or other feedback, and inference systems may sample multiple candidates, run tests and revise code. These are distinct training and inference stages, not a universal recipe every LLM follows.

[DeepSeek-Coder](https://arxiv.org/html/2401.14196v2) gives an open methodological example: code pretraining, next-token and fill-in-the-middle objectives, deduplication/decontamination, and instruction tuning. Its reported scale is orders of magnitude beyond this pilot. It motivates the predictive objective and separation of datasets, not an expectation that a dozen examples will produce general programming ability.

[Chen et al., Evaluating Large Language Models Trained on Code](https://arxiv.org/abs/2107.03374) emphasizes functional correctness through execution and introduces HumanEval and pass@k evaluation. Here, one candidate per task means pass@1 is the fraction whose complete supplied test set passes. We do not infer pass@k from one candidate and do not import any published model score into the UI.

## What can transfer while the fly wiring stays fixed

Next-token cross entropy, teacher forcing, instruction/answer pairs, validation-only checkpoint selection and functional tests are compatible with a frozen core. This implementation uses UTF-8 bytes, fixed input injection, the recurrent connectome, fixed pooling, and a learned linear readout. At generation time it feeds back its own generated bytes. Reference code does not enter inference. Cached teacher-forced states are valid here because none of the components producing those states is trained.

The direct precedent is [Herbert Jaeger's account of echo-state networks](https://www.scholarpedia.org/article/Echo_state_network): drive a fixed recurrent reservoir and learn a readout. [Maass, Natschläger and Markram (2002)](https://igi-web.tugraz.at/PDF/130.pdf) similarly studied readouts extracting information from recurrent dynamics. These methods justify trying a frozen network with a trained output map. They do not establish that a particular fly connectome has the memory or representation needed for code generation. Classical reservoirs are often configured specifically for the target task; biological connectivity was shaped for very different functions.

What does not transfer unchanged is end-to-end representation learning: a conventional LLM updates internal attention/feed-forward weights, while this pilot freezes the entire recurrent core and input encoder. A learned readout can only use information the reservoir makes accessible. If the core forgets earlier instructions, optimizing the output layer cannot recover lost context. A future topology-preserving weight-learning experiment is a different constraint from the strict frozen-weight pilot and should have its own recorded protocol.

## Biological modeling choices and their limits

[Shiu et al., A Drosophila computational brain model reveals sensorimotor processing](https://www.nature.com/articles/s41586-024-07763-9) provides precedent for testing behavior-related hypotheses with a connectome-constrained whole-brain model. Its domain and modeling choices do not validate coding ability, and it uses a different connectome. This pilot deliberately does not claim to reproduce those physiological methods.

We retain raw contact counts, directions and loops, use a global conversion factor and leaky tanh dynamics, and make no claim of physiological synaptic efficacy. The current model omits inhibitory transmitter signs even though an NT prediction file exists locally; interpreting glutamate and unknown transmitters requires an explicit biological policy. No simulated millisecond timescale is claimed. Artificial byte channels and the avatar's schematic positions are also not anatomical sensory pathways.

Global normalization offers a conservative contraction bound, but it may suppress useful recurrence. The no-recurrence comparison isolates this concern without changing any recorded edge file. A lower validation loss than another architecture cannot establish a fly-specific advantage, especially if a graph-free control matches it.

## Fairness, contamination and reinforcement learning

The tiny Transformer is trained from scratch with the same examples and answer-byte exposures. It has a different parameter count and runtime. The optional pretrained GPT-4.1-mini snapshot is a practical reference with unknown training-data overlap, not an equal-budget control. Its API request uses the same visible prompt, no tools, a logged provider-token cap, and a separately applied common code-byte budget. [Official model information](https://developers.openai.com/api/docs/models/gpt-4.1-mini) and [text-generation API documentation](https://developers.openai.com/api/docs/guides/text) guided only the optional reference adapter. They do not supply experimental results.

[LiveCodeBench](https://arxiv.org/abs/2403.07974) motivates attention to contamination and problem release dates. Original wording alone cannot make familiar algorithms unseen to a pretrained model. This project therefore labels its six-task benchmark as a development pilot and recommends fresh, time-documented tasks for confirmation.

Execution-reward training could later optimize the output policy without changing the recurrent graph. It needs a functioning generator, diverse training problems and a reliable judge; otherwise rewards can be sparse or reward loopholes. No RL was run or implemented here. Large-scale pretraining, an inhibition-aware model, longer-memory dynamics, broader corpora and multiple seeds are follow-up experiments, not completed work.

References accessed 2026-10-09. These are high-level methodological rationales and decision records, not private internal reasoning traces.
