NeuroCortex Transformer: Complete Technical Reference
Abstract
This document is the complete technical reference for the NeuroCortex Transformer (NCT), a cortical column network that replaces transformer blocks with biologically-grounded six-layer cortical columns trained through local predictive coding and Hebbian plasticity. It contains the full annotated source code (12,272 lines of Python), mathematical derivations for every module, TikZ architecture diagrams, initialization protocols, and all hyperparameters, everything needed to reproduce the system from this document alone. The accompanying standalone file (nct_v11_standalone.py) can train NCT from scratch on any machine with PyTorch. On WikiText-2 with a 300M-parameter model trained for 5,000 steps using zero backpropagation through its column hierarchy, NCT achieves validation perplexity 54.0 (256 improvement over random baseline), with self-calibrating prediction precision (: 1.01.88) and 150 autonomous dream-phase consolidation cycles.
Status
This reference prints the full source code of the model beside its equations and diagrams. The text, the figures and the code are published together under the site licence.
Contents
20 parts- Architecture Overview
- Annotated Source Code
- Morphological Decomposition EngineNeuroscience Motivation · Formal Definition · Decomposition Algorithm · Morphophonemic Normalization · False Decomposition Guard · Architecture Diagram · and 2 more
- NCT Morphological TokenizerNeuroscience Motivation · Vocabulary Architecture · Encoding Process · Special Token Design · Comparison with BPE · Vocabulary Construction Process · and 1 more
- V11 ConfigurationDesign Philosophy · Complete Parameter Specification · Presets · Source Code
- Legacy V10.2 ConfigurationPurpose · Source Code
- Brain Embeddings (Theorems 56–58)Neuroscience Foundation · Stage 1: Base Embedding (0ms) · Stage 2: Morphological Composition (170ms): Theorem 58 · Stage 3: Hub-and-Spoke Semantic Integration (250ms): Theorem 56 · Stage 4: Sparse Distributed Activation (300ms): Theorem 57 · Source Code
- Grid Cell Position Encoding (Theorems 59, 61, 62)Neuroscience Foundation · Why Not RoPE? · Mathematical Formulation · Implementation Details · Disease Mapping · Source Code
- Brain LM Head (Theorem 63)Neuroscience Foundation · Three-Component Architecture · Weight Tying · Disease Mapping · Initialization Protocol · Source Code
- Brain Decoding (Drift-Diffusion Sampler)Neuroscience Foundation · Drift-Diffusion Sampler · Inhibition of Return · -Adaptive Temperature · BrainDecoder Orchestrator · Source Code
- Cortical Column: The Fundamental Compute UnitNeuroscience Foundation · Data Flow · Layer 4: Thalamic Input · Layer 2/3: Windowed Hebbian Association (Theorem B) · Working Memory: Three Timescales (NMDA, Silent, Phonological) · Oscillatory Dynamics: Nested PAC · and 6 more
- Subcortical SystemsNeuroscience Foundation · Thalamus + TRN · Hippocampus · Basal Ganglia · Cerebellum · Brainstem: Neuromodulation (Theorem C) · and 3 more
- Local Learning FrameworkOverview · Predictive Coding Optimizer (Theorem A) · Hebbian Optimizer (Theorem B) · Neuromodulated Plasticity (Theorem C) · Wake-Sleep Scheduler (Theorem D) · Developmental Program (Critical Periods) · and 2 more
- Full Model (CorticalColumnNetwork)Overview · V11BrainEmbedding · Forward Pass: 11 Stages · Loss Function · Self-Repair Mechanism · Key Methods · and 1 more
- Autonomous OperationNeuroscience Foundation · Always-On Learning (AlwaysOnLearning) · Imagination Engine (ImaginationEngine) · Curiosity Drive (CuriosityDrive) · Self-Play (SelfPlay) · Continual Learning Guard (ContinualLearningGuard) · and 4 more
- Scaling FrameworkThe Fundamental Insight: Local Learning Enables Modular Scaling · Operation 1: Progressive Column Growth (grow_columns) · Operation 2: Net2Net Column Splitting (split_column) · Operation 3: Overload Detection (find_overloaded_columns) · Operation 4: P Hyperparameter Transfer (extract_mu_p) · Operation 5: Scaling Cost Report (scaling_report) · and 3 more
- Production InterfaceOverview · Quantization (-Guided Precision Mapping) · Distributed Training (FSDP2) · Alignment: SFT with -Aware Weighting · Alignment: DPO with -Adaptive · Tool Use (V11ToolAdapter) · and 4 more
- Training ScriptTraining Modes · Local Output Correction · Data Loading · Training Loop · Prenatal Phase · Smoke Test Suite (12 Tests) · and 3 more
- Theorem Index
- Results and AnalysisTraining Results (5,000 Steps, 300M Parameters) · Parameter Distribution
License
PolyForm Noncommercial License 1.0.0This work is open research. Free for any noncommercial use: research, education, personal projects, evaluation, and nonprofit or public-sector use. Commercial use requires a separate license, available by contacting krrish@verace.in.