Verace Neocortex: V11 package code
Source tree of the V11 cortical-column language model, its brain-systems layer and kernels, and the research lines developed beside it.
- L1 re-entrance: Top-down context added again in each settling cycle
- Windowed Hebbian recall: Replaces attention over a local causal window
- L5 output prediction: Applies output prediction with synaptic depression
Overview
The V11 package is the production source tree of Verace Neocortex, whose research name in the lab's papers and code is NeuroCortex Transformer (NCT). It is a large Python codebase with C++ extensions. At its centre is a language model built from cortical columns rather than a standard transformer stack. Each column is a six-layer unit with interneurons, working memory, oscillations and homeostatic plasticity. The columns are wrapped in modelled brain systems: brainstem neuromodulation, thalamus, hippocampus, basal ganglia, prefrontal executive and a global workspace. The question the package addresses is whether a language model can be assembled from such biologically modelled parts, with local plasticity, staged development and sleep.
The column model is CorticalColumn. FreezeMode maps decide which of its layers and learning rules update in each training phase. PrenatalDevelopment runs eight ordered developmental sub-phases. A curriculum advances when the loss plateaus, not after a fixed step count. AutonomousLoop adds sleep, consolidation, curiosity and self-play, and decoding treats token choice as drift-diffusion evidence accumulation. A kernel library provides fused and C++ versions of the per-timestep loops. Later lines sit beside the V11 model: the Verace hybrid language model, the CORTEX embodied agent, the LOGOS text interface, and a column language library that ports the BDH backbone, an architecture published by another group (arXiv 2509.26507).
The lab's records give a WikiText-2 validation perplexity of 54.0 after 5,000 steps for the 300M-parameter V11 model. The lab's forensic audit concerns a separate audited V11 training run and recorded several faults in it. With episodic memory on, the model leaked future tokens. Its model, stated as 125M parameters, held 17.4M. The replay comparison was invalid, and the self-healing debugger matched only regular expressions. That run trained at about 74 tok/s. The successor hybrid model was measured at 23.7k tok/s on a laptop RTX 4050. In experiment E1, at 150M tokens, it reached validation loss 3.990 against 4.014 for size-matched attention, one seed each. In experiment E3, episodic memory gave a Python loss change of -0.70 with +0.05 forgetting, against -1.47 with +0.24 for fine-tuning.
The V11 column model, its brain-systems modules, kernels and training pipeline are implemented. The lab's own audit found that the results of the audited V11 training run did not hold: leakage, a misstated model size and too little throughput to reach the token budget its scale requires. The hybrid language model is implemented, covered by contract tests and evaluated in experiments E1 to E3, each with single-seed comparisons. The CORTEX and LOGOS lines are implemented as numpy and PyTorch experiments that the lab's records report as converged. The production design for scaling beyond them exists as a specification only, and no large-scale training run is recorded.
Status
Experiments. The code is implemented and the lab recorded runs, audits and evaluations, including a forensic audit that found the results of the audited V11 training run invalid and later single-seed experiments on the hybrid model.
Simulator
A made-up signal jumps a few times. A running prediction follows it, and a gate passes the prediction error upwards only when it is large for the precision it is given.
- signal (white) and prediction (colour), synthetic data
- prediction error: passed upwards (colour) or held (faint)
- Steps passed upwards
- 26%
- Gate stays open after a jump for
- 10.3 steps
- Mean size of the error
- 0.33
- Jumps in the signal
- 4
Raise the precision and small errors pass as well. Lower the learning rate and the prediction takes longer to catch up after a jump.
This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.
Architecture
Cortical column unit
CorticalColumnis a six-layer compute unit with interneurons, working memory, oscillations and homeostasis, with layers routed byFreezeModeand a per-tokengenerate_step. Its L2/3 layer replaces attention with windowed Hebbian recall, and its L5 layer applies output prediction with synaptic depression.Brain systems layer
Modules for brainstem, thalamus, hippocampus, basal ganglia, prefrontal executive, rule engine, social cognition, mirror neurons and a global workspace surround the columns. Each module supplies signals or memory to the column stack.
Neuromodulator buses and brainstem
The brainstem computes dopamine, noradrenaline, serotonin and acetylcholine from afferent signals, with per-column receptor-density gains. Three multicast routers broadcast scalar salience signals to memory-encoding subsystems, one each for noradrenaline, acetylcholine and dopamine.
Developmental training pipeline
PrenatalDevelopmentstages training through eight sub-phases, each with its own freeze map and composite advance criteria. A curriculum builder sorts text by difficulty into per-phase token files.Autonomous lifecycle loop
AutonomousLoopandAutonomousConfiggovern sleep, circadian forcing, dreams, curiosity, consolidation, elastic weight consolidation, self-play and evaluation thresholds while the model runs.Biological decoding stack
Decoding combines confidence-gated System 1/2 choice, drift-diffusion accumulation, procedural chunks from the basal ganglia, and a self-monitoring step. The self-monitoring step can reject a token and roll back working memory.
Kernel library
Reference and fused implementations cover k-winners-take-all, parallel scans, windowed Hebbian recall, Hebbian updates and plasticity utilities. Benchmarks and tests check each fused version against its reference, and stateful loops are ported to C++.
Verace hybrid language model
VeraceLMis a small causal language model mixing gated softmax attention, Gated DeltaNet working memory and an episodic kNN store, and it trains on a laptop. It has its own trainer, command-line tools and contract tests.Column language library on BDH
This library ports the BDH-GPU backbone, an architecture published by another group (arXiv 2509.26507), and adds the lab's slot port and episodic tape on top of it. It runs a bake-off between the backbone alone and the backbone fused with the slot port.
CORTEX embodied agent
CortexAgentcouples non-collapsing columns, a shared energy and a reflexive broadcast on a pixel world. Experiment scripts cover tracking, occlusion, disorders, grounded text, multimodal input and anomaly detection.LOGOS text interface
This line puts the same column substrate behind a text chat through a frozen featurizer, with no tokenizer and no vocabulary softmax. Answers come from energy-descent retrieval over bound role-filler facts. The LOGOS records name fluent open-ended prose as the one capability the interface does not reach, which the lab attributes to scale and the price of a generative read-out rather than to the architecture.
Implementation
Mechanisms as they are implemented in the source code, with the constants the code uses.
- FreezeMode plasticity maps
- Each developmental phase carries a
ColumnFreezeSpecthat sets every layer toPLASTIC,F_FWD,F_TRACKorTRUNCATE. The spec decides which layers and which learning rules update in that phase.CriticalPeriodClosureuses these maps to close plasticity as development proceeds. - L2/3 settling with L1 re-entrance
- The column runs
n_settle_stepscycles. In each cycle, the L1 top-down signal, scaled by , is added again to the L2/3 output. L1 itself projects higher-column context, filters it with inhibition driven by top-down magnitude, then scales it by VIP firing. - Windowed Hebbian associative recall
L23_LateralAssociationreplaces attention with recall over a local causal window. The recall uses learned distance weights and Hebbian-learned association matrices, followed by k-winners-take-all and anti-Hebbian lateral weights. Structural plasticity and several analytic learning rules also live in this module.- VIP-SST-PV interneuron gating
- VIP cells inhibit SST cells, SST cells gate the apical dendrites, and PV cells veto output. Interneuron firing rates replace learned scalar gates across layers. A separate audit flags any signal whose variance across columns falls below as lockstep.
- Homeostatic plasticity
- The homeostasis module combines a BCM sliding threshold, metaplasticity with a drifting meta time constant, multiplicative synaptic scaling and a BDNF growth factor. All four are negative-feedback controls that keep the Hebbian updates from running away.
- Three-timescale working memory
- NMDA attractor slots, an activity-silent trace and a phonological loop run in parallel, each with its own decay timescale. The activity-silent trace uses a facilitation state and a depression state , with release feeding a retrieval projection.
- Theta-gamma phase-amplitude coupling
- Gamma amplitude is gated by theta, delta, alpha and beta phases through content-dependent coupling coefficients. The same module detects syntactic boundaries with a phase reset and builds a constituent buffer of bound role-filler slots.
- Multicast salience gating
- Each subscriber scales a centred bus signal by its own parameter
alpha_raw, initialised at -5. This keeps the module close to identity at initialisation. Disabled features return neutral values, either 1.0 or a no-op, so the baseline path stays bit-identical. - Bistable NMDA ignition workspace
- Each column has a workspace state with self-excitation, cross-inhibition and a steep sigmoid, which gives one low and one high fixed point. Ignition is the upward crossing of 0.5. Winning columns broadcast through read projections, and an extra meta-channel carries epistemic depth.
- Per-column metabolic pacemaker
MetabolicBudgetgives each column an ATP budget that scales its local plasticity. In the optional pacemaker, each column's gamma phase advances with , giving every column its own rhythm. Synchrony across columns is measured by .- Surprise-gated hippocampal encoding
- An episode is stored only when precision-weighted surprise, confidence and a noradrenaline-burst write gate together exceed a threshold. Stored episodes are replayed and consolidated into slow semantic memory as centroids and schemas.
semantic_memorykeeps the resulting category prototypes as a list. - Two-process sleep trigger
- Sleep fires when the homeostatic pressure plus a sinusoidal circadian drive exceeds a threshold. The circadian term prevents a homeostatic deadlock in which sleep never triggers.
- Drift-diffusion decoding
- Each candidate token's accumulator gains drift plus noise at every step until one crosses a threshold that decays as . Rows still undecided at the end take the argmax. Rows whose top-2 logit margin over noise already exceeds a threshold adapted by noradrenaline skip the loop and take the greedy token.
- Self-monitoring with rollback
- After a token is chosen, an inner comprehension step re-reads it. If the prediction-error ratio exceeds an adaptive threshold, the decoder rejects the token, restores working memory and cache, and resamples.
- TRN bimodality loss
- The thalamic reticular gate is penalised by , accumulated on every routing call. The penalty pushes gate values toward 0 or 1.
- Forward-chaining rule buffer
RuleEngineholds a fixed number of antecedent and consequent vector pairs, matched by cosine similarity. A fired consequent is fed back as the next query, up to depth 3. New rules are written by a dopamine-weighted linear interpolation.- Gated delta rule in three forms
- Gated DeltaNet writes to fast weights by error correction, with a learned decay, so a new value replaces a stale one rather than adding to it. The test suite checks that the sequential reference, the chunked PyTorch form and the Triton kernel path agree. It also checks that gradients and carried state are exact.
- Episodic kNN memory with exact forgetting
- The store keeps pairs of hidden-state keys and next-token values, searches them by cosine similarity, and mixes the result into the language model's distribution through a confidence gate. Weights never change. Entries are tagged by source, so forgetting a source deletes its entries exactly.
- Fast-weight state of the BDH port
- In the port of the BDH backbone, which is another group's published architecture, each head keeps a matrix updated as . This gives linear-attention inference with constant-size state and optional decay. The lab's slot port adds orthogonal fixed address templates with soft winner-take-all routing.
- Rotated low-bit episodic tape
- Keys are rotated by a random orthogonal matrix, then quantised to signed low-bit codes. Cosine matching is done directly in the rotated quantised space, where the scales cancel.
- NCT1 token file format
- Token shards begin with a 12-byte header: the magic string NCT1, the vocabulary size, and a reserved or count field. Little-endian int32 token IDs follow the header.
- Learning-rate drift gate
- The predictive-coding learning rate is multiplied by , where is an exponential moving average of drift in the variance estimate. The rate therefore shrinks as the drift grows.
Results
From the lab's own experiments and records. They have not been independently replicated.
Forensic audit invalidated the audited V11 run's results
The lab's audit of a V11 training run found future-token leakage whenever episodic memory was on, and a model stated as 125M parameters that held 17.4M. It also found an invalid replay comparison and a self-healing debugger that matched only regular expressions.
The audited V11 run was too slow for its scale
The audit measured the audited V11 training run at about 74 tok/s. The lab's root-cause note estimates that a 167M model needs about 3.3B tokens, which at that rate takes about 1.4 years.
Hybrid successor ran about 320 times faster
On a laptop RTX 4050, the lab measured the Verace hybrid model at 23.7k tok/s, about 320 times the 74 tok/s of the audited V11 run. A size-matched attention model reached 27.4k tok/s on the same machine.
Hybrid matched attention at 150M tokens
In experiment E1, the hybrid reached validation loss 3.990, against 4.014 for size-matched attention and 3.277 for GPT-2 124M. Each figure comes from one seed.
Delta rule beats Hebbian on overwrite
The lab's capacity benchmark recorded about 50% accuracy for Hebbian superposition on overwrite, against 100% for the delta rule. Hebbian writes did better only on uniform random keys.
Recall experiments favour exact attention plus trained hybrid
In experiment E2, attention recalled 100% at every N tested, and the trained hybrid reached 100%, and 99.9% at twice the training length. The 12k-step attention probe recorded validation accuracy 0.0532 at N=64 with 1.05M parameters.
Episodic memory learned with less forgetting than fine-tuning
In experiment E3, episodic memory gave a Python loss change of -0.70 with +0.05 forgetting, against -1.47 with +0.24 for fine-tuning. The records report improvement on 12 of 12 repositories.
CORTEX proofs and agent converged
The lab's records report convergence on 20 of 20 seeds for the proofs. The 12000-step agent kept column differentiation from 0.92 to 0.91, with grounding R2 0.970 and metacognition calibration 0.958.
Anomaly detector below the field on a standard benchmark
The 8.4M-parameter detector scored AUROC 0.95, 0.98 and 1.00 on easy injected anomalies, at 524 FPS. On the standard UCSD Ped2 benchmark it scored about 0.70, against about 0.97 to 0.99 for the best published systems.
Independent review found design issues, not leaks
An independent code review of the hybrid model found no causality leak or mathematical error. It did find experiment-design issues, which the lab records as fixed before the final numbers were produced.
Concepts
- Cortical column
- The basic repeated unit of the model: a small six-layer module, modelled on neocortical layers, that many copies of form the network.
- Local learning rules
- Weight updates computed from activity at the synapse alone, such as Hebbian, BCM and Oja rules, with no backward pass. The lab's notes estimate their cost at about 2 to 3 N D FLOPs, against 6 N D for backpropagation, with no stored backward graph.
- BCM sliding threshold
- A plasticity rule in which a neuron strengthens or weakens a synapse depending on whether activity sits above or below a threshold, and the threshold itself tracks recent activity.
- Curie collapse principle
- The lab's observation that identical columns under a symmetric rule on shared input converge to the same state. Breaking the symmetry requires an asymmetric cause.
- Two escapes from collapse
- The first escape is quenched disorder: each column gets frozen, unlearned receptive-field projections. The second is competition through soft winner-take-all, which makes the symmetric state repel. In the V11 column the same aim is served by fixed per-column noise biases and gate-initialisation noise.
- Bounded soft winner-take-all
- Competition among columns renormalised through a softmax. The lab adopted it after raw anti-Hebbian competition diverged to NaN, because the bounded form cannot blow up by construction.
- Neuromodulation
- Global scalar signals, modelled on dopamine, noradrenaline, serotonin and acetylcholine, that change gains, gates and learning rates across many modules at once.
- Developmental curriculum
- Training staged like development, from simple nursery text to advanced text. A phase advances when the loss plateaus, and each phase has its own map of which parts may learn.
- Complementary learning systems
- The design principle of pairing a fast episodic store with slow cortical weights, with replay during sleep moving knowledge from the first into the second.
- Delta rule versus Hebbian write
- A Hebbian write adds new associations on top of old ones. A delta-rule write first subtracts what the memory already predicts, so it can overwrite a stale value and suffers less crosstalk on correlated keys.
- Drift-diffusion model
- A model of decisions as noisy evidence accumulating until it crosses a bound. The package uses it to choose tokens, with the bound shaped by dopamine, precision and conflict.
- Energy-descent inference
- Inference treated as iterative minimisation of a scalar energy, such as , rather than a single forward pass. Each iteration answers one hop, so multi-hop questions take repeated descent.
- Reflexive broadcast
- A capacity-limited workspace settle whose fixed point carries one coherent content, from which report and confidence are read. A Banach fixed-point argument states that the settle operator is a contraction if and only if ; the lab's numpy scripts check this condition numerically, and no formal proof is recorded.
- Vegetative dissociation
- The lab's ablation test: with the broadcast removed, the agent still perceives but can no longer report. The lab uses it as evidence that report depends on the broadcast.
- Holographic reduced representation binding
- One fixed circular-convolution operator binds every role to its filler. Because the same operator serves all pairs, unseen role-filler combinations remain representable.
- E_loop convergence measure
- The lab's ledger sums failing proofs and failing falsifier checks into one number. A system counts as converged only at zero across random seeds.
- Multi-query associative recall
- A benchmark in which a sequence holds many key-value pairs and the model must return the value for each queried key. It measures exact in-context recall.
- Invisible-on-disable features
- An engineering rule in the package: each optional mechanism defaults off and returns neutral values when disabled, so the baseline computation stays bit-identical.
- Anti-collapse regularisation
- In representation-space prediction, targets are detached, and a standard-deviation floor plus a decorrelation penalty stop all representations from shrinking to one point.
About this page
Written from the lab's own documents and source code. Figures and results are the lab's measurements as it recorded them at the time, and have not been independently replicated.
Published under the PolyForm Noncommercial License 1.0.0: free for noncommercial use.