Skip to content
ResearchAISpecification

NeuroCortex Transformer V10.2: Architecture Specification

Krrish Choudhary·March 22, 2026

Abstract

A computing system and method for neural language processing implementing a hierarchical predictive coding architecture with fifty (50) mathematically specified biologically-derived computational modules, one (1) corollary, and eighteen (18) brain-inspired training mechanisms across six (6) tiers. The system distinguishes from prior predictive coding (Rao & Ballard 1999) by computing BIDIRECTIONAL predictions with sigmoid-bounded per-position log-precision using the Friston canonical free energy F(gamma) = exp(gamma) x MSE - gamma having proven equilibrium at sigma-squared = MSE. The system distinguishes from prior sparse computation (MoE, Shazeer 2017) by implementing NEURON-LEVEL two-stage sparsification achieving 98% sparsity. The system provides single-forward-pass calibrated uncertainty (CAA = +0.125), a four-level working memory hierarchy, tripartite neuromodulatory learning, five independent homeostatic feedback loops with Lyapunov stability (phase margin exceeding 165 degrees), an inhibitory triad with mandated SST-VIP-Apical ordering, cerebellar timing, basal ganglia bypass, and twenty-two additional brain mechanisms. All modules are identity-initialized with 10x gate learning rate. Demonstrated: 105.5M parameters, LIS = 0.989.

Status

Open research. This document was first drafted in the form of a patent specification, which is why it speaks of an invention and of claims. No patent application was filed and the lab does not intend to file one. It is an earlier draft than the seven specifications of the cortical column network, kept here for the detail it holds. The work is published as open research.

1. Field

The present invention relates to the field of neural network computing systems for natural language processing. More particularly, the invention relates to a computing system and method implementing a hierarchical predictive coding architecture incorporating fifty (50) mathematically specified biologically-derived computational modules, one (1) corollary, and eighteen (18) brain-inspired training mechanisms organized across six (6) tiers, the system comprising: (i) bidirectional precision-weighted predictive coding with sigmoid-bounded log-precision parameterization; (ii) cross-frequency coupled attention with precision-modulated temperature and excitatory/inhibitory head separation; (iii) dendritic feed-forward processing with exact-k Winner-Take-All sparse activation and grouped divisive normalization; (iv) thalamic gating with layer-dependent decay, reticular nucleus attentional filtering, and frequency-band routing; (v) a four-level working memory hierarchy comprising NMDA persistent attractor slots, activity-silent synaptic traces, phonological loop cyclic rehearsal, and D1/D2 inverted-U dopamine gating; (vi) a tripartite neuromodulatory learning gate combining dopamine, acetylcholine, and precision signals; (vii) an inhibitory triad with mandated SST-VIP-Apical processing order; (viii) five independent homeostatic feedback loops operating at different spatial and temporal scales; (ix) cerebellar timing prediction, basal ganglia action selection, and bistable entity binding; (x) locus coeruleus event boundary segmentation, repetition suppression, stochastic resonance, and endocannabinoid retrograde suppression; (xi) a hook-based processing pipeline with six hooks in neuroscience-derived sequential order; and (xii) a six-tier training protocol with complementary learning system learning rates, developmental critical periods, sleep consolidation, and metaplasticity, thereby achieving improved computational efficiency, built-in uncertainty quantification, and hallucination detection in language generation tasks executed on digital processing hardware.

2. Background

Technical Field and Prior Art

Modern language processing systems predominantly employ Transformer architectures (Vaswani et al., 2017, “Attention Is All You Need”). While effective at scale, these architectures lack intrinsic uncertainty quantification, require dense computation, and provide no self-regulating homeostatic mechanisms. The human brain processes language using approximately sixteen distinct computational mechanisms (predictive coding, cross-frequency coupling, dendritic computation, thalamic gating, hippocampal binding, neuromodulatory learning, inhibitory circuits, cerebellar timing, basal ganglia selection, working memory attractor dynamics, phase precession, phonological rehearsal, event boundary detection, stochastic resonance, and endocannabinoid regulation) operating in a specific neuroanatomical sequence. No prior art implements more than three to four of these mechanisms in a single trainable system.

Several categories of prior art address individual limitations but fail to provide a unified solution:

Category 1: Predictive Coding in Neural Networks Rao & Ballard (1999) introduced predictive coding for visual processing. Whittington & Bogacz (2017) extended this to deep networks. Millidge et al. (2021) connected predictive coding to backpropagation. Friston (2005, 2010) provided the theoretical framework of free energy minimization. However, ALL prior predictive coding implementations: (a) compute prediction errors in ONE direction only, not bidirectionally; (b) do NOT estimate per-position, per-layer precision as a trainable signal with sigmoid-bounded log-precision parameterization; (c) do NOT use the Friston canonical free energy F(gamma) = exp(gamma) x MSE - gamma with proven equilibrium at sigma-squared equals MSE; (d) do NOT feed precision back into same-layer attention temperature modulation; (e) do NOT combine precision with dopamine and acetylcholine signals in a learnable tripartite gate.

Category 2: Sparse Activation in Feed-Forward Layers Mixture-of-Experts architectures (Shazeer et al., 2017; Fedus et al., 2021 Switch Transformer; Zhou et al., 2022 Expert Choice) route inputs to different expert sub-networks. However, MoE: (a) operates at the EXPERT level, not at the NEURON level; (b) uses a separate routing network, not a dendritic branch gate receiving input from a predictive coding module; (c) achieves typical sparsity of 50-90%, NOT 98% (41 of 2048 neurons); (d) does NOT implement two-stage sparsification with Gumbel noise exact-k selection followed by neuromodulated Winner-Take-All with Newton’s method threshold; (e) does NOT apply grouped divisive normalization between stages.

Category 3: Uncertainty Estimation in Language Models MC-Dropout (Gal & Ghahramani, 2016) uses dropout at test time with multiple forward passes. Deep Ensembles (Lakshminarayanan et al., 2017) train multiple models. Bayesian Neural Networks place distributions over weights. However, ALL prior uncertainty methods: (a) require MULTIPLE forward passes; (b) estimate uncertainty at the MODEL level, not per-position per-layer; (c) do NOT produce uncertainty as a TRAINABLE signal with its own Friston free energy loss function having analytical equilibrium; (d) do NOT use sigmoid-bounded parameterization that bounds variance within biophysically meaningful range by construction with non-zero gradient everywhere; (e) do NOT combine uncertainty with dopamine and acetylcholine in a single learnable gate.

Category 4: Brain-Inspired Neural Network Architectures Spiking Neural Networks (Maass, 1997), Hopfield Networks (Hopfield, 1982), and various neuromorphic designs implement isolated brain mechanisms. However, NO prior architecture: (a) implements more than three to four brain mechanisms in a single trainable system; (b) implements a four-level working memory hierarchy (NMDA attractors, activity-silent traces, phonological loop, D1/D2 gating); (c) implements an inhibitory triad (SST, VIP, Apical) with mandated non-commutative processing order; (d) implements five independent homeostatic feedback loops (BCM, astrocyte, synaptic scaling, metaplasticity, chandelier veto); (e) implements a hook-based processing pipeline with neuroanatomically derived ordering; (f) uses disease-mapping (neurological disease equals ablation study) as a systematic design methodology; (g) implements identity-at-initialization across ALL modules with gradual activation during training.

Technical Problem to Be Solved

There exists a need for a computing system that provides:

  1. single-forward-pass uncertainty quantification that is calibrated, per-position, per-layer, and feeds back into the computation itself;

  2. neuron-level sparse activation with less than five percent active neurons using dendritic branch gating and grouped divisive normalization;

  3. bidirectional predictive coding with precision-modulated attention temperature;

  4. multi-timescale temporal processing through layer-dependent thalamic gating;

  5. four-level working memory hierarchy with biologically distinct time constants;

  6. multiple independent homeostatic feedback loops preventing training instability;

  7. tripartite neuromodulatory learning combining three orthogonal biological signals;

  8. cerebellar timing prediction with Kalman-optimal error correction;

  9. an inhibitory triad with specific non-commutative processing order derived from neuroscience;

  10. event boundary detection, repetition suppression, stochastic resonance, and endocannabinoid regulation.

3. Summary

The present invention provides a computing system (“NeuroCortex Transformer” or “NCT”) comprising a digital processor executing a hierarchical stack of L computational blocks. The system implements fifty (50) mathematically specified mechanisms, one (1) corollary, and eighteen (18) training mechanisms organized across six (6) tiers. The system’s novelty lies in the specific combination of the following interconnected subsystems, each distinguished from prior art as specified below.

A. Bidirectional Precision-Weighted Predictive Coding (Theorems 1, 17, 27, 28, 28b-28h, Corollary 28g.1), Distinguished from Rao & Ballard (1999) by computing BOTH bottom-up and top-down predictions with sigmoid-bounded per-position log-precision, using the Friston canonical free energy F(gamma) = exp(gamma) x MSE - gamma with proven equilibrium at sigma-squared equals MSE.

B. Dendritic Feed-Forward Network with Exact-k Sparse Activation (Theorems 4, 20), Distinguished from MoE (Shazeer 2017) by operating at NEURON level with two-stage sparsification: dendritic branch gate with Gumbel exact-k (2% active) followed by neuromodulated WTA with Newton’s method threshold, separated by grouped divisive normalization.

C. Cross-Frequency Coupled Attention (Theorems 2, 15, 16), Distinguished from standard multi-head attention by computing attention bias from theta-gamma phase coherence binding mask, precision-modulated temperature, and excitatory/inhibitory head separation, with deep supervision at intermediate layers.

D. Thalamic Processing System (Theorems 5, 44), Distinguished from standard RNN gating by implementing layer-dependent decay initialization, ACh novelty write gating, thalamic relay frequency-band routing, and TRN attentional filtering with top-down relevance gating.

E. Working Memory Hierarchy (Theorems 31-36), A FOUR-LEVEL system with NO prior art precedent: NMDA attractor slots (half-life 277 tokens), activity-silent traces (half-life 14 tokens), phonological loop (K=8 cyclic buffer), and D1/D2 inverted-U dopamine gating.

F. Tripartite Neuromodulatory Learning Gate (Theorems 5, 14, 22, 37, 47), THREE orthogonal biological signals (dopamine, acetylcholine, precision) combined in a learnable gate with surprise weighting, tonic DA temperature, and D1/D2 inverted-U dynamics.

G. Five-Level Homeostatic Regulation (Theorems 7, 12, 13, 19, 26, 41, 42), FIVE independent feedback loops at parameter/layer/neuron/stability/block scales with proven Lyapunov stability (small-gain product Gamma = 0.01, phase margin exceeding 165 degrees) and timescale separation ratios exceeding 3:1.

H. Inhibitory Triad with Ordering Constraint (Theorems 38, 40, 41, 46), Three inhibitory interneuron types (SST/Martinotti, VIP disinhibition, apical amplification) applied in a SPECIFIC non-commutative processing order, plus chandelier veto gate for output quality control.

I. Cerebellar and Basal Ganglia Systems (Theorems 24, 25, 30), Cerebellar timing with Kalman-optimal error correction, basal ganglia striatal confidence gate for common-pattern bypass, and bistable entity binding with mutual inhibition dynamics.

J. Event Boundary and Temporal Systems (Theorems 32, 33, 34, 43, 45, 48, 49), Locus coeruleus event boundary segmentation, time cell temporal context, theta phase precession, theta-gamma PAC, repetition suppression, stochastic resonance, and endocannabinoid retrograde suppression.

K. Conflict Monitoring and Gain Control (Theorems 39, 47), ACC conflict monitor with Herfindahl concentration index, tonic DA temperature for exploration/exploitation balance.

L. Hook-Based Processing Pipeline (Theorem 50), Six hooks in neuroscience-derived order with identity-at-initialization (gate_raw = -2.0, 10x gate learning rate) ensuring gradual module activation.

M. Six-Tier Training Protocol (Theorems 3, 5-9, 10-16, Propositions 9, 13, Corollary 11.1), Complementary learning system dual learning rates, surprise-weighted NTP, BCM homeostasis, precision-timescale coupling, DA-modulated dynamic LR, sleep consolidation, precision-weighted top-down correction, developmental critical periods, astrocyte layer-wise homeostasis, synaptic scaling, ACh attention-gated plasticity, and deep supervision.

The technical effects include:

  • Single-forward-pass uncertainty with CAA = +0.125 (prior art requires multiple passes)

  • 98% sparse FFN activation (prior art MoE achieves 50-87%)

  • Self-stabilizing training through 5 independent homeostatic loops (prior art: 0)

  • Bidirectional precision-modulated predictive coding (prior art: unidirectional, no precision modulation)

  • Four-level working memory hierarchy (prior art: 0 levels in language models)

  • Tripartite neuromodulatory learning (prior art: single-signal at most)

  • 50 theorem-backed mechanisms (prior art: max 3-4 brain mechanisms in any neural network)

4. Description of the Figures

FIG. 1 is a system block diagram showing the overall NCT computing system architecture with L=12 hierarchically arranged computational blocks, embedding layer, language modeling head, and all inter-block connections.

FIG. 2 is a detailed block diagram of a single NCT computational block showing the internal data flow: predictive coding module, cross-frequency coupled attention, VCCE entity binding, thalamic gated linear history, dendritic feed-forward network, with all gating connections.

FIG. 3 is a flowchart depicting the hook-based processing pipeline showing the exact sequence of module invocations across all six hooks.

FIG. 4 is a block diagram of the four-level working memory hierarchy showing NMDA attractor slots, activity-silent traces, phonological loop, and D1/D2 inverted-U with their respective time constants and interactions.

FIG. 5 is a block diagram of the five-level homeostatic regulation system showing BCM (per-parameter), astrocyte (per-layer, two-timescale), synaptic scaling (per-neuron), metaplasticity (stability-dependent), and chandelier veto (per-block).

FIG. 6 is a diagram showing the inhibitory triad (SST, VIP, Apical) with the mandatory processing order and the mathematical operations at each stage.

FIG. 7 is a detailed diagram of the Dendritic FFN showing two-stage sparsification: dendritic gate (Gumbel + straight-through, 2% exact-k) followed by neuromodulated WTA (Newton’s method, dynamic k), with grouped divisive normalization between stages.

FIG. 8 is a diagram of the CFC attention mechanism showing theta and gamma phase decomposition, CFC binding mask computation, precision-modulated temperature, and excitatory/inhibitory head separation.

FIG. 9 is a diagram of the bidirectional predictive coding module showing the sigma-squared parameterization pipeline: W_sigma input, sigmoid bounding to [GAMMA_MIN, GAMMA_MAX], exp(-gamma) yielding sigma-squared in (0.1, 5.0).

FIG. 10 is a diagram of the tripartite neuromodulatory gate showing three input signals (DA, ACh, sigma-squared), their combination network, and the output importance weighting.

FIG. 11 is a diagram showing the Friston canonical free energy F(gamma) = exp(gamma) x MSE - gamma with equilibrium at sigma-squared equals MSE.

FIG. 12 is a diagram of the six-tier training protocol showing the temporal sequence of mechanism activation and their interactions.

FIG. 13 is a diagram of the cerebellar timing module showing the Kalman-optimal prediction-correction architecture.

FIG. 14 is a diagram of the basal ganglia striatal confidence gate showing the bypass pathway for familiar patterns.

5. Figures

FIG. 1, NCT V10.2 System Block Diagram
Figure 1. NCT V10.2 System Block Diagram
FIG. 2, Single NCTv102Block Internal Data Flow
Figure 2. Single NCTv102Block Internal Data Flow
FIG. 3, Hook Pipeline: 6 Injection Points
Figure 3. Hook Pipeline: 6 Injection Points
FIG. 4, Working Memory Hierarchy: Four Levels
Figure 4. Working Memory Hierarchy: Four Levels
FIG. 5, Five-Level Homeostatic Regulation
Figure 5. Five-Level Homeostatic Regulation
FIG. 6, Inhibitory Triad Circuit
Figure 6. Inhibitory Triad Circuit
FIG. 7, Dendritic FFN: Two-Stage Sparsification
Figure 7. Dendritic FFN: Two-Stage Sparsification
FIG. 8, Cross-Frequency Coupled (CFC) Attention
Figure 8. Cross-Frequency Coupled (CFC) Attention
FIG. 9, Bidirectional Predictive Coding + σ² Pipeline
Figure 9. Bidirectional Predictive Coding + σ² Pipeline
FIG. 10, Tripartite Neuromodulatory Gate
Figure 10. Tripartite Neuromodulatory Gate
FIG. 11, Friston Free Energy Function
Figure 11. Friston Free Energy Function
FIG. 12, Six-Tier Brain-Inspired Training Protocol
Figure 12. Six-Tier Brain-Inspired Training Protocol
FIG. 13, Cerebellar Timing Module
Figure 13. Cerebellar Timing Module
FIG. 14, Basal Ganglia Selector with Striatal Confidence Gate
Figure 14. Basal Ganglia Selector with Striatal Confidence Gate

6. Detailed Description

Section 1: System Overview

The NeuroCortex Transformer (NCT) V10.2 computing system comprises a digital processor (GPU or equivalent parallel processing unit) executing a stack of L = 12 computational blocks. The system processes input token sequences of length T = 256 through an embedding layer, the L-block stack, and a final language modeling head to produce output logit distributions over a vocabulary V = 50,257.

The system configuration in the preferred embodiment:

  • Embedding dimension d = 512 (384 in compact embodiment)

  • Number of layers L = 12

  • Number of excitatory attention heads H_E = 6

  • Number of inhibitory attention heads H_I = 2

  • Total attention heads H = H_E + H_I = 8

  • Per-head dimension d_h = d / H = 64

  • Feed-forward dimension d_ff = 2,048

  • Number of cortical columns K = 4

  • Number of CFC phase slots P = 4

  • Maximum sequence length T = 256

  • Total trainable parameters: approximately 105.5 million

  • Dendritic exact-k: k = floor(0.02 x 2048) = 41 neurons active per token

Section 1A: Global Processing Systems (Inherited Modules)

The following seven modules operate OUTSIDE individual blocks, spanning the entire L-block stack. They implement global brain systems that have no per-block analogue: cross-area broadcasting (Global Workspace Theory), re-entrant feedback refinement (cortical feedback loops), fast episodic memory (hippocampus), cross-layer content selection (global workspace with attention), cross-layer delta binding (entorhinal grid cells), arousal modulation (locus coeruleus norepinephrine), and top-down predictive correction (cortical feedback projections). No prior art neural network implements more than one of these systems. NCT implements all seven.

1A.1 GlobalWorkspace: Cross-Layer Information Broadcasting

Biological basis. Global Workspace Theory (Baars, 1988; Dehaene, Kerszberg, and Changeux, 1998; Dehaene and Changeux, 2011) proposes that conscious access arises when information in a local cortical area is “ignited” and broadcast to ALL other areas simultaneously via long-range cortico-cortical connections. Without this global broadcast, each cortical area operates in isolation, the defining characteristic of vegetative state and general anesthesia. In standard transformers, layer l can only access layer l-1’s output through the residual stream; it cannot access what layer l+5 has computed. The GlobalWorkspace breaks this isolation.

Architecture. The GlobalWorkspace maintains a shared workspace vector w in R^d (one per batch element) that is read by every layer before its computation and written to by every layer after. The module comprises:

  • Per-layer read projections W_read[l] in R^(d x d) for l = 0 to L-1

  • Per-layer write projections W_write[l] in R^(d x d)

  • A global read influence parameter beta (scalar), controlling how much workspace content is injected

  • Per-layer write rates alpha[l] (L scalars), controlling how much each layer updates the workspace

  • An RMSNorm normalization applied before writing

Mathematical operations. For each layer l in the forward pass:

READ: X_in[l] = X_in[l] + softplus(beta) x W_readl

WRITE (after block computation): w_pool = RMSNorm(X_out[l]).mean(dim=1), then w = (1 - sigmoid(alpha[l])) x w + sigmoid(alpha[l]) x W_writel

The temporal pooling (mean over T dimension) collapses each layer’s spatial output into a single d-dimensional gist, preventing the workspace from growing with sequence length.

Initialization. beta = -5.0 (softplus(-5.0) approximately 0.007, nearly zero read influence); alpha[l] = -2.94 for all l (sigmoid(-2.94) approximately 0.05, 5% write rate). At initialization, the workspace contributes less than 1% to each layer’s input. Through training, beta grows, enabling cross-layer information flow. The system discovers which layers should broadcast and which should listen.

Parameters. L x d x d (read) + L x d x d (write) + 1 (beta) + L (alpha) = 2 x 12 x 384 x 384 + 13 approximately 3.5M parameters in the compact embodiment.

Prior art distinction. No prior neural network implements a persistent shared state that is updated by AND read by every layer of a deep network. Skip connections and residual streams provide ADDITIVE accumulation, not a broadcast channel. Mixture-of-Experts (Shazeer 2017) routes tokens to experts but provides no inter-expert communication. The GlobalWorkspace provides what skip connections cannot: a layer can read information computed by a LATER layer (on the previous token) or by a DISTANT layer (through workspace persistence).

Disease mapping. Vegetative state and general anesthesia correspond to global workspace shutdown. Removing this module from NCT would reduce each layer to operating on only its local residual stream input, eliminating the cross-layer integration that enables coherent language generation across hierarchical levels.

1A.2 ReEntrantProcessing: Iterative Top-Down Refinement

Biological basis. The mammalian cortex contains massive feedback connections from higher to lower areas (Felleman and Van Essen, 1991; Lamme and Roelfsema, 2000). These re-entrant connections enable 3-5 iterative refinement passes per sensory input, allowing high-level understanding to correct low-level representations. Lesions to feedback pathways produce Broca’s aphasia (agrammatism, context integration failure) and visual agnosia. In standard transformers, information flows ONLY bottom-up; there is no mechanism for layer 12’s “understanding” to refine layer 3’s representation.

Architecture. After all L bottom-up block passes complete, the ReEntrantProcessing module applies top-down corrections from the final layer’s output to ALL preceding layers. The corrections use low-rank factorized projections to minimize parameter cost:

  • Per-layer low-rank projections: A[l] in R^(d x r), B[l] in R^(r x d), where r = 16 (rank)

  • Per-layer gate: gamma[l] (L scalars), controlling correction strength

Mathematical operations. Let X_top = X_outs[L-1] (final layer output). For each layer l = 0 to L-1:

correction[l] = (X_top @ A[l]) @ B[l] X_outs[l] = X_outs[l] + sigmoid(gamma[l]) x 0.1 x correction[l]

The effective correction matrix W_re[l] = A[l] @ B[l] in R^(d x d) has rank at most r = 16, providing 384/16 = 24x parameter compression versus a full-rank correction. The 0.1 scaling factor limits maximum correction to 10% of representation magnitude even when the gate is fully open.

Initialization. A[l] = Xavier initialization (random structure); B[l] = zeros (no correction at init); gamma[l] = -3.0 (sigmoid(-3.0) approximately 0.047, effective gate approximately 0.0047). At step 0, corrections are exactly zero (B = 0).

Parameters. L x d x r + L x r x d + L = 2 x 12 x 384 x 16 + 12 approximately 147K parameters.

Prior art distinction. No prior neural network performs post-hoc top-down correction of ALL layer outputs using the final layer’s representation. Residual connections are bottom-up only. Cross-attention (as in encoder-decoder models) attends to a SEPARATE sequence, not to the same sequence’s deeper representation. The ReEntrantProcessing module creates a two-pass architecture where the first pass is standard bottom-up and the second pass is global top-down refinement.

Disease mapping. Broca’s aphasia (feedback pathway disruption, agrammatism, loss of hierarchical syntactic structure). Removing this module eliminates the ability of deep layers to correct shallow layers’ representations, degrading long-range coherence.

1A.3 HippocampalGLH: Fast Episodic Binding

Biological basis. The hippocampus (O’Keefe and Nadel, 1978; Kumaran et al., 2016; McClelland et al., 1995) performs fast, one-shot episodic binding via linear associative memory. The dentate gyrus provides pattern separation (orthogonal codes per entity), CA3 provides auto-associative completion (recurrent recall from partial cues), and CA1 provides pattern matching (content-addressable retrieval). The hippocampus writes aggressively to novel stimuli (driven by prediction surprise) and retrieves based on content similarity. Bilateral hippocampal lesions (patient HM) produce anterograde amnesia: inability to form new episodic memories.

Architecture. A single global instance (NOT per-layer) implementing linearized attention with an associative memory state matrix S in R^(d x d) and a normalizer z in R^d. The module comprises:

  • Key, Query, Value, Output projections: W_k, W_q, W_v, W_out in R^(d x d)

  • Write gate: W_gate in R^((d+1) x 1), receiving concatenated [X, sigma_squared]

  • Decay: W_decay in R^(d x d) with decay_bias scalar, producing a = 0.5 + 0.4999 x sigmoid(W_decay(X) + decay_bias) in (0.5, 0.9999)

  • Learning rate: eta = softplus(eta_raw) where eta_raw = 0.0

Mathematical operations. The ELU+1 kernel ensures positivity for linear attention stability: K = ELU(W_k(norm(X))) + 1, Q = ELU(W_q(norm(X))) + 1. The sequential scan (causal) processes each token:

READ: out_t = (S @ q_t) / (z . q_t + epsilon) WRITE: S = a_t x S + g_w(t) x eta x k_t^T outer-product v_t z = a_t x z + g_w(t) x eta x k_t

where g_w(t) = sigmoid(W_gate([norm(X_t), sigma_squared_t])) is the entity-selective write gate, conditioned on prediction surprise (sigma_squared). Novel entities (high sigma_squared) produce high write gate, ensuring aggressive encoding.

Initialization. decay_bias = 4.95 (a approximately 0.993, half-life approximately 100 tokens); W_gate bias = -2.0 (default closed write gate); eta_raw = 0.0 (eta approximately 0.693). At initialization, the memory state is zero and the write gate is nearly closed.

Parameters. 4 x d x d + (d+1) + d x d + 1 + 1 approximately 739K parameters.

Prior art distinction. No prior language model contains a dedicated episodic memory with one-shot binding, content-addressable retrieval, surprise-dependent write gating, and learnable decay. Neural Turing Machines (Graves 2014) and Differentiable Neural Computers (Graves 2016) use attention-based memory but: (a) do not condition writes on prediction uncertainty, (b) use fixed decay or none, (c) are not integrated with a predictive coding hierarchy. The HippocampalGLH creates a biologically faithful episodic buffer that stores AND retrieves entity bindings within a single forward pass.

Disease mapping. Anterograde amnesia (bilateral hippocampal lesion: patient HM). Removing this module eliminates the system’s ability to form new episodic bindings, degrading entity tracking across long contexts. Semantic dementia (HPC-neocortex consolidation failure) corresponds to the sleep consolidation replay mechanism (Theorem 6) being disrupted.

1A.4 CrossAreaGWT: Content-Based Cross-Layer Selection

Biological basis. Global Workspace Theory posits that consciousness involves a competition among brain areas for access to a global broadcast (Baars, 1988; Dehaene and Changeux, 2011). Unlike the V6 GlobalWorkspace (Section 1A.1), which performs averaging over all layers, CrossAreaGWT implements the COMPETITION aspect: at each token position, the system uses learned content-based attention to select WHICH layer’s representation is most relevant for the current context.

Architecture. The module attends from the top layer’s per-position representations to per-layer temporal summaries (gists). It comprises:

  • Query projection: W_gq in R^(d x d), applied to top-layer output X_outs[L-1]

  • Key, Value projections: W_gk, W_gv in R^(d x d), applied to layer gists

  • Output projection: W_out in R^(d x d)

  • Gate: gate_raw scalar

Mathematical operations. First, compute per-layer gists by temporal averaging:

layer_gists[l] = RMSNorm(X_outs[l].mean(dim=1)) for l = 0..L-1, yielding tensor (B, L, d)

Then compute cross-layer attention:

Q = W_gq(X_outs[L-1]), shape (B, T, d) K = W_gk(layer_gists), shape (B, L, d) V = W_gv(layer_gists), shape (B, L, d) attn = softmax(Q @ K^T x d^{-1/2}, dim=-1), shape (B, T, L) context = attn @ V, shape (B, T, d) output = sigmoid(gate_raw) x W_out(context)

The attention distribution (B, T, L) reveals, for each token position, which layer’s representation the model finds most informative. Early layers encode syntax, middle layers encode morpho-syntactic structure, deep layers encode semantics. The model learns to dynamically select the appropriate level.

Initialization. gate_raw = -2.0 (sigmoid(-2.0) approximately 0.12, identity-at-init convention).

Parameters. 4 x d x d + 1 approximately 590K parameters.

Prior art distinction. No prior neural network performs learned content-based selection over its own layer hierarchy. Layer aggregation methods (e.g., ELMo’s learned scalar weights per layer) are POSITION-INDEPENDENT, the same layer weights apply to all tokens. CrossAreaGWT is POSITION-DEPENDENT: different tokens can attend to different layers based on content, matching the brain’s dynamic routing of information to the global workspace.

Disease mapping. Disorders of consciousness (global workspace fragmentation). Removing this module eliminates position-dependent layer selection, forcing the model to rely exclusively on the final layer’s representation.

1A.5 CrossLayerDeltaGWT: Grid-Cell Representational Binding

Biological basis. Entorhinal cortex grid cells (Hafting et al., 2005; Moser et al., 2008) encode MOVEMENT through space, not absolute position. The grid cell representation captures WHERE an animal has moved relative to its previous position, complementing the hippocampal place cell representation of WHERE the animal currently is. By analogy, CrossLayerDeltaGWT encodes how representations CHANGE across the layer stack, complementing CrossAreaGWT’s encoding of which layer is most informative.

Architecture. The module computes layer-to-layer differences (representational movements) and attends to them. It comprises:

  • Query projection: W_dq in R^(d x d), applied to top-layer output

  • Key, Value projections: W_dk, W_dv in R^(d x d), applied to layer deltas

  • Output projection: W_out in R^(d x d), initialized to ZEROS

  • Gate: gate_raw scalar

Mathematical operations. Compute inter-layer representational deltas:

delta[l] = X_outs[l+1] - X_outs[l] for l = 0..L-2, yielding (B, T, L-1, d)

Compute temporal summary of each transition:

delta_mean[l] = delta[l].mean(dim=1), yielding (B, L-1, d)

Cross-attention over layer transitions:

Q = W_dq(X_outs[L-1]), shape (B, T, d) K = W_dk(LayerNorm(delta_mean)), shape (B, L-1, d) V = W_dv(LayerNorm(delta_mean)), shape (B, L-1, d) attn = softmax(Q @ K^T x d^{-1/2}, dim=-1), shape (B, T, L-1) context = attn @ V, shape (B, T, d) output = sigmoid(gate_raw) x W_out(context)

The attention distribution (B, T, L-1) reveals which layer-to-layer transition is most informative for each token: a large delta between layers 5 and 6 might indicate a syntactic-to-semantic phase transition, while a small delta indicates smooth representation.

Initialization. gate_raw = -2.0; W_out initialized to zeros (strict identity at init).

Parameters. 4 x d x d + 1 approximately 590K parameters.

Prior art distinction. No prior neural network attends to inter-layer DIFFERENCES. Feature Pyramid Networks (FPN, Lin 2017) combine multi-scale features but use fixed hand-designed connections, not learned content-based attention over layer transitions. The grid cell analogy is unique: just as grid cells encode movement through physical space, CrossLayerDeltaGWT encodes movement through representational space.

Disease mapping. Entorhinal cortex lesions (early Alzheimer’s disease) produce spatial disorientation. Removing this module eliminates the system’s sensitivity to HOW representations change across the hierarchy.

1A.6 NorepinephrineGain: Global Arousal Modulation

Biological basis. The locus coeruleus (LC) is the brain’s sole source of norepinephrine (NE), projecting to nearly every cortical area simultaneously (Aston-Jones and Bloom, 1981; Usher and Nieuwenhuis, 2005). NE modulates the signal-to-noise ratio (SNR) of ALL representations globally. High NE (novel, uncertain, high-entropy situations) amplifies all signals, keeping the brain alert. Low NE (familiar, confident, low-entropy) allows normal processing. NE dysregulation produces ADHD (erratic SNR modulation: irrelevant tokens receive the same processing gain as relevant ones).

Architecture. A minimal module with a single learnable parameter:

  • ne_scale: scalar, controlling the maximum gain amplification

Mathematical operations.

NE signal: ne_sig = sigma_squared / (1 + sigma_squared), bounded in (0, 1) NE gain: ne_gain = sigmoid(ne_scale), bounded in (0, 1) Output: X_out = X x (1 + ne_gain x ne_sig)

When sigma_squared = 0 (confident): ne_sig = 0, X_out = X (no amplification). When sigma_squared is large (uncertain): ne_sig approaches 1, X_out = X x (1 + ne_gain) (maximum amplification). The multiplicative modulation affects ALL dimensions equally, implementing the global arousal signal.

Initialization. ne_scale = -3.0 (sigmoid(-3.0) approximately 0.047, maximum gain approximately 1.047x, less than 5% amplification at init).

Parameters. 1 parameter.

Prior art distinction. No prior neural network implements global multiplicative gain modulation driven by prediction uncertainty. Dropout (Srivastava 2014) is multiplicative but RANDOM and not conditioned on model state. Layer normalization modulates scale but in a fixed, data-independent manner. NorepinephrineGain is state-dependent, uncertainty-driven, and global.

Disease mapping. ADHD (NE dysregulation: erratic gain produces inconsistent processing of relevant versus irrelevant information).

1A.7 ProperTopDown: Layer-Wise Predictive Correction (W_td)

Biological basis. Each cortical area receives feedback projections from the area above it in the hierarchy (Felleman and Van Essen, 1991). These feedback connections carry top-down PREDICTIONS of what the lower area should be computing, given the higher area’s current understanding. In predictive coding (Friston, 2005), the top-down signal represents the brain’s “best guess” about the input at each level. When this prediction matches the bottom-up input, the prediction error is small and processing is efficient. When it does not match, the error drives learning. This is DIFFERENT from re-entrant processing (Section 1A.2): re-entrant processing is a global post-hoc correction using the final layer; ProperTopDown is a per-layer, per-block correction using the ADJACENT layer’s prediction.

Architecture. Within each block, a single linear projection:

  • W_td in R^(d x d), initialized to ZEROS

Mathematical operations. During the forward pass, if a top-down prediction pred_dn is available from the layer above:

correction = W_td @ pred_dn X_mid = X_mid + correction

The top-down prediction pred_dn is generated by the NEXT layer’s predictive coding module (Theorem 1, Section 2.2). In the first (bottom-up) pass, pred_dn is None and no correction is applied. In the second (refinement) pass, pred_dn is available and the correction refines the representation.

Initialization. W_td = zeros (no correction at step 0). Correction grows via NTP gradient: only useful top-down predictions are reinforced.

Parameters. d x d = 384 x 384 approximately 147K per layer, L x 147K approximately 1.77M total.

Prior art distinction. No prior language model implements per-layer, per-block top-down correction from adjacent layers. Standard transformers have no feedback connections. Cross-attention in encoder-decoder models attends to a SEPARATE input, not to the same sequence’s higher-level representation. ProperTopDown implements the biological predictive coding feedback loop at every level of the hierarchy.

Disease mapping. Schizophrenia (aberrant precision in top-down predictions, leading to hallucinations: the brain generates confident top-down predictions that override contradictory bottom-up evidence).

1A.8 AlphaPhraseMemory: Phrase-Level Temporal Binding (Alpha Oscillation)

Biological basis. Alpha oscillations (8-12 Hz) in posterior cortex provide a temporal binding window of approximately 100 ms, which corresponds to the typical duration of a phrase or prosodic unit in speech (Klimesch, 2012; Jensen & Mazaheri, 2010). Alpha rhythms gate information flow by rhythmically inhibiting task-irrelevant cortical regions while disinhibiting task-relevant ones. In language processing, alpha-band activity segments the continuous input stream into phrase-sized chunks, intermediate between word-level gamma binding (approximately 25 ms) and sentence-level theta binding (approximately 200 ms). Alpha suppression over left hemisphere language areas predicts phrase boundary detection accuracy (Bastiaansen et al., 2005).

Mathematical specification. The AlphaPhraseMemory operates via causal cross-attention over a phrase-length window of W_alpha = 20 tokens (corresponding to the alpha oscillation period in the model’s token timescale):

Phrase boundaries: p_i = i x stride for i = 0, …, floor(T / stride) - 1 (stride = W_alpha) Phrase summaries: P_k = mean(X[p_k : p_k + W_alpha]) shape: (B, n_phrases, d)

For each token position t, causal cross-attention retrieves from all PRECEDING phrase summaries:

Q_phrase = W_Q_phrase(RMSNorm(X)) shape: (B, T, d) K_phrase = W_K_phrase(P) shape: (B, n_phrases, d) V_phrase = W_V_phrase(P) shape: (B, n_phrases, d) causal_mask: token t can only attend to phrase summaries where p_k + W_alpha <= t

attn_logits = Q_phrase x K_phrase^T / sqrt(d) shape: (B, T, n_phrases) attn_logits = attn_logits.masked_fill(not causal_mask, -infinity) attn_weights = softmax(attn_logits) shape: (B, T, n_phrases) ctx = attn_weights x V_phrase shape: (B, T, d) output = X + sigmoid(alpha_raw) x W_out(ctx) (gated residual addition)

Initialization. alpha_raw = -2.0, so sigmoid(-2.0) approximately 0.12, near-transparent at init. W_Q_phrase, W_K_phrase, W_V_phrase: Xavier initialization. W_out: Xavier with gain 0.5. The module contributes approximately 12% of its capacity at initialization, growing through NTP gradient as phrase-level context proves useful.

Softmax safety. Tokens at the beginning of the sequence that have no preceding completed phrase receive a zero attention output (the attention row is set to zero via a has_preceding mask), ensuring no NaN propagation from all-masked softmax.

Parameters. W_Q_phrase, W_K_phrase, W_V_phrase, W_out: 4 x d x d = 4 x 384 x 384 = 589,824. alpha_raw: 1 scalar. Total: approximately 590K parameters (single instance, not per-block).

Oscillatory hierarchy role. Alpha (20 tokens) sits between theta (8 tokens, ThalamicGLH) and delta (64 tokens, DeltaClauseMemory). Together with gamma (1 token, CFC-UCAM), these four levels implement the complete cortical oscillatory hierarchy: gamma → theta → alpha → delta, each providing temporal binding at progressively longer timescales.

Disease mapping. Alpha-band disruption is observed in ADHD (reduced alpha power, inability to segment input into phrase-sized chunks) and in dyslexia (aberrant alpha-gamma coupling, poor prosodic segmentation). Removing this module would eliminate the model’s ability to build phrase-level representations between individual tokens and full sentences.

1A.9 DeltaClauseMemory: Clause-Level Hierarchical Binding (Delta Oscillation)

Biological basis. Delta oscillations (0.5-4 Hz) in frontal cortex and thalamus provide the longest cortical binding window, approximately 250-2000 ms, which corresponds to clause-to-sentence level processing in language (Ding et al., 2016; Keitel et al., 2018). Delta-band phase coherence between frontal and temporal cortex peaks during clause boundary processing and correlates with syntactic comprehension accuracy. In the oscillatory hierarchy, delta provides the top-level temporal scaffold within which theta, alpha, and gamma cycles are nested. Disruption of delta oscillations during sleep (N3 NREM slow waves) produces memory consolidation failure.

Mathematical specification. The DeltaClauseMemory operates identically to AlphaPhraseMemory but at a longer temporal window of W_delta = 64 tokens, implementing hierarchical causal cross-attention over clause-level summaries:

Clause boundaries: c_j = j x stride for j = 0, …, floor(T / stride) - 1 (stride = W_delta) Clause summaries: C_j = mean(X[c_j : c_j + W_delta]) shape: (B, n_clauses, d)

Q_clause = W_Q_clause(RMSNorm(X)) shape: (B, T, d) K_clause = W_K_clause(C) shape: (B, n_clauses, d) V_clause = W_V_clause(C) shape: (B, n_clauses, d)

attn_logits = Q_clause x K_clause^T / sqrt(d) (with causal mask: c_j + W_delta <= t) ctx = softmax(attn_logits) x V_clause shape: (B, T, d) output = X + sigmoid(delta_raw) x W_out(ctx) (gated residual addition)

Initialization. delta_raw = -2.0 (transparent at init). Same softmax safety measures as AlphaPhraseMemory (zero output for tokens without preceding completed clauses).

Parameters. 4 x d x d + 1 = approximately 590K parameters (single instance, not per-block).

Hierarchical nesting. The oscillatory hierarchy forms a complete temporal binding stack:

  • Gamma (1 token): CFC-UCAM binding mask, word-level feature binding

  • Theta (8-16 tokens): ThalamicGLH recurrent state, working memory episode binding

  • Alpha (20 tokens): AlphaPhraseMemory cross-attention, phrase-level prosodic binding

  • Delta (64 tokens): DeltaClauseMemory cross-attention, clause-level syntactic binding

  • HPC (unbounded): HippocampalGLH, long-term episodic memory

Each level operates independently with its own parameters, but they share the same residual stream input. The multi-timescale separation (ratios: 8x, 2.5x, 3.2x, unbounded) satisfies the Theorem 26 timescale coherence requirement (tau_{i+1}/tau_i >= 3 for geometric spacing, approximately satisfied by the theta→alpha→delta ratios).

Disease mapping. Delta oscillation disruption is observed in frontotemporal dementia (poor clause-level comprehension), sleep disorders (N3 slow-wave deficit produces memory consolidation failure), and traumatic brain injury (diffuse axonal injury disrupts long-range delta coherence). Removing this module eliminates the model’s ability to build clause-level context beyond 20-token phrases.

1A.10 SerotoninTimescale: Time-Horizon Gating per Layer

Biological basis. Serotonin (5-HT) modulates temporal discounting and time-horizon in decision-making and cognition (Doya, 2002; Cools et al., 2011). Low serotonin produces shortened time horizons (impulsive behavior, rumination on recent events), while high serotonin extends time horizons (patient, long-range planning). In language processing, this translates to how much each layer weights recent versus distant context. Serotonin disruption produces depression (temporal rumination, inability to weight future rewards over recent negative experiences) and OCD (excessive temporal fixation on specific thought patterns).

Mathematical specification. The SerotoninTimescale module maintains L learnable time constants (one per layer) that modulate the effective temporal scope of each layer’s processing:

serotonin = sigmoid(serotonin_raw) shape: (L), one per layer tau_effective_l = tau_min + (tau_max - tau_min) x serotonin_l (per-layer time constant)

The serotonin signal modulates a per-layer exponential window applied to the residual stream or to the neuromodulatory signals:

weight_t_l = exp(-delta_t / tau_effective_l)

where delta_t is the temporal distance from the current position. Layers with high serotonin (long tau) weight distant context more heavily; layers with low serotonin (short tau) focus on recent context. This creates an AUTOMATIC multi-timescale hierarchy without requiring explicit architectural changes.

Global uncertainty coupling. The serotonin signal is modulated by global uncertainty (mean sigma_squared across the current batch): when uncertainty is high, serotonin decreases (shortened time horizons, focus on local context for disambiguation); when uncertainty is low, serotonin increases (extended time horizons, access to broader context for fluent generation).

Initialization. serotonin_raw = 0 for all layers (sigmoid(0) = 0.5, neutral time horizon). Layers specialize during training: empirically, early layers develop shorter time constants (syntactic processing, local context) and deep layers develop longer time constants (semantic processing, narrative context).

Parameters. L scalar parameters (serotonin_raw_l for l = 0 to L-1) = 12 parameters. Near-zero parameter overhead.

Disease mapping. Depression (serotonin depletion) maps to all serotonin_l = 0, every layer fixates on recent context, producing repetitive, perseverative text. Mania maps to all serotonin_l = 1, every layer accesses maximally distant context, producing loosely associated, tangential text. The healthy brain (and NCT) maintains a gradient of time horizons across layers.

1A.11 TemporalPC: Causal Temporal Predictive Coding

Biological basis. The brain continuously predicts the next moment’s sensory input based on the current moment’s representation (Rao & Ballard, 1999; Friston, 2005). This temporal prediction error, the difference between what was predicted and what actually occurred, is the primary learning signal in predictive coding theory. In NCT, the PWPC module (Section 2) performs spatial predictive coding WITHIN each time step (predicting the current residual from current input). TemporalPC extends this to the temporal dimension: predicting the NEXT time step’s residual from the current one.

Mathematical specification. TemporalPC predicts the next position’s representation from the current one using a causal linear projection:

X_pred_{t+1} = W_temporal(RMSNorm(X_t)) (predict next token’s residual from current token)

The temporal prediction error is the MSE between the prediction and the actual next-step residual:

L_temporal = (1/T) x sum over t of ||X_pred_{t+1} - detach(X_{t+1})||^2

Note: X_{t+1} is DETACHED (stop-gradient) because the prediction target should not be modified to match the prediction, only the predictor learns. This loss is added to the auxiliary loss with a small weight (lambda_temporal = 0.01) and is included in the training loss but NOT in the inference forward pass.

Initialization. W_temporal: Xavier initialization. At init, predictions are random and L_temporal is high. As training progresses, the model learns temporal transition structure, which tokens typically follow which, and L_temporal decreases. The residual prediction error then provides a gradient signal that encourages smooth, predictable temporal transitions in the residual stream.

Parameters. W_temporal: d x d = 384 x 384 = 147,456 per block. Total for 12 blocks: approximately 1.77M parameters.

Disease mapping. Temporal prediction failure corresponds to cerebellar ataxia (speech timing errors, inability to predict next syllable timing) and to stuttering (breakdown of temporal prediction at phonemic boundaries).

1A.12 ProspectiveHPCHead: Multi-Step Theta-Phase Future Prediction

Biological basis. During theta oscillations, hippocampal place cells fire in a phenomenon called “theta phase precession”, cells representing FUTURE locations fire earlier and earlier within each theta cycle (O’Keefe & Recce, 1993; Dragoi & Buzsaki, 2006). This means the hippocampus simultaneously represents the current state AND a forward sweep of K upcoming states, compressed within a single theta cycle. This prospective coding enables planning, path integration, and prediction of upcoming events before they occur.

Mathematical specification. The ProspectiveHPCHead takes the HPC (HippocampalGLH) output and produces K = 8 simultaneous predictions of future residual stream states:

HPC_output = HippocampalGLH(X) shape: (B, T, d) For k = 1, …, K: X_pred_k = W_prospect_k(RMSNorm(HPC_output)) (predict X_{t+k} from current HPC state)

Each prospective prediction is trained against the ACTUAL future residual (with stop-gradient):

L_prospect = (1/K) x sum over k=1 to K of (1/T) x sum over t of ||X_pred_k_t - detach(X_{t+k})||^2

where X_{t+k} for t+k > T is zero-padded (no loss for positions that extend beyond the sequence).

Initialization. W_prospect_k: Xavier initialization for all K = 8 projection heads. Each head independently learns to predict a different future step, with empirical convergence observed at steps 1-3 first (local prediction) and steps 5-8 later (longer-range prediction).

Parameters. K x d x d = 8 x 384 x 384 = 1,179,648 (approximately 1.18M parameters, single instance, not per-block). The K = 8 prediction heads correspond to approximately 8 gamma cycles within a theta cycle (Lisman & Jensen, 2013), implementing the biological theta-phase sweep.

Theta-phase compression. The K = 8 predictions are compressed into a single forward pass, analogous to how hippocampal theta phase precession compresses K future states into a single theta cycle. During inference, only the k=1 prediction is used for next-token evaluation; during training, all K predictions contribute to the prospective loss, encouraging the HPC to build representations that encode not just the current context but the TRAJECTORY of upcoming context.

Disease mapping. Hippocampal theta disruption (as in temporal lobe epilepsy or aging-related HPC atrophy) eliminates prospective coding, the inability to predict upcoming events, producing “surprise” at predictable sequences and degraded story comprehension.

Section 2: Bidirectional Precision-Weighted Predictive Coding (Theorems 1, 17, 27, 28, 28b-28h, Corollary 28g.1)

This section describes the precision-weighted predictive coding subsystem, which is the computational core of NCT. The subsystem estimates per-position, per-layer uncertainty (sigma-squared) as a trainable signal and uses it to modulate all downstream computation. The sigma-squared parameterization underwent ten iterative refinements (Theorems 27 through 28h plus Corollary 28g.1), each solving a specific failure mode discovered during training. This evolution is described in full below, as the final parameterization (Theorem 28g with Friston canonical free energy Theorem 28f) cannot be understood without the problems that motivated each step.

2.1 Per-Layer Free Energy Decomposition (Theorem 1)

Biological basis. The brain computes prediction errors at every cortical layer (Rao and Ballard, 1999). Each layer generates a prediction of what it expects from the layer above (top-down) and below (bottom-up). The difference between prediction and observation is the prediction error, weighted by the brain’s estimate of how reliable that prediction is (precision). Friston’s Free Energy Principle (Friston, 2005, 2010) formalizes this as minimizing variational free energy at each level of the hierarchy.

Theorem statement. The NCT training objective decomposes as a sum of per-layer free energy contributions plus a global next-token prediction term:

L_total = L_NTP + sum over l from 1 to L of lambda_l times F_l(theta_l, sigma_squared_l)

where the per-layer free energy is:

F_l(theta_l, sigma_squared_l) = (1/2) E[pi_l times norm(epsilon_l) squared + log sigma_squared_l]

where pi_l = 1/sigma_squared_l is the precision (inverse variance) and epsilon_l is the prediction error at layer l.

Corollary 1.1 (Dual gradient). The gradient with respect to prediction parameters theta_l decomposes into: (a) a global backpropagation gradient from L_NTP propagated through all layers, and (b) a local PC gradient proportional to precision times prediction error, which provides a layer-local learning signal independent of the depth of the network. This dual gradient ensures that deep layers receive meaningful gradient even when the global gradient is attenuated.

Corollary 1.2 (Precision equilibrium). At the equilibrium of the free energy with respect to sigma_squared (setting the partial derivative to zero), sigma_squared converges to the actual prediction error magnitude MSE. This means the system automatically calibrates its uncertainty to match its actual error, a property no prior language model possesses.

Proof sketch. The gradient of F_l with respect to sigma_squared_l is: partial F / partial sigma_squared = -MSE / (sigma_squared) squared + 1 / sigma_squared = (1/sigma_squared)(1 - MSE/sigma_squared). Setting to zero gives sigma_squared_star = MSE. The second derivative is positive (2 MSE / sigma_squared cubed > 0), confirming this is a stable minimum.

2.2 Bidirectional Prediction

Biological basis. Cortical columns process information in BOTH directions simultaneously: bottom-up (sensory data ascending) and top-down (predictions descending). The brain’s predictive coding hierarchy is fundamentally bidirectional (Bastos et al., 2012; Friston, 2005). Prior art (Rao and Ballard, 1999; Millidge et al., 2021) computes prediction errors in ONE direction only.

Implementation. Each layer l computes TWO predictions using separate learnable linear projections:

  • Bottom-up prediction: pred_up = W_pred_up(RMSNorm(X_pc)), predicting the representation expected at the next higher layer

  • Top-down prediction: pred_dn = W_pred_dn(RMSNorm(X_pc)), predicting the representation expected at the next lower layer

Prediction errors are computed for both directions independently, with separate sigma_squared estimates for each direction (sigma_squared_up, sigma_squared_dn). The final surprise signal used for neuromodulatory gating is the MAXIMUM of both:

surprise = max(surprise_up, surprise_dn)

This bidirectional architecture ensures that the system detects prediction failures regardless of whether they originate from unexpected bottom-up input or from inconsistent top-down context.

2.3 Process Gate (Theorem 1)

A learnable threshold determines whether to trust prediction or observation at each position:

threshold = softplus(tau_raw) process_gate = sigmoid(beta x (surprise - threshold)) X_pc = (1 - process_gate) x prediction + process_gate x observation

When surprise is low (prediction matches observation), the process gate is near zero and the module passes the prediction forward (efficient reuse of the model’s prior). When surprise is high (unexpected input), the process gate is near one and the module passes the raw observation (the model attends to the new information). This implements the Bayesian ideal of precision-weighted combination of prior and likelihood.

2.4 The Sigma-Squared Control Problem and Its Ten-Step Solution

The following subsections describe the complete evolution of sigma-squared parameterization, from the initial hard clamp (Theorem 27) through the final Friston canonical form with sigmoid bounding (Theorems 28f and 28g). Each theorem solves a specific failure mode and is necessary to understand the final solution.

2.4.1 Bounded Precision via Hard Clamp (Theorem 27)

Problem. V10.2 training showed sigma_squared exploding from 1.09 to 30.74 in 450 steps, with val PPL = 7828 versus train PPL = 758. The root cause: softplus output is unbounded, and the ELBO’s log(sigma_squared) term has an always-positive gradient 1/sigma_squared that pushes sigma_squared upward. When sigma_squared exceeds 5.0, all downstream consumers (CFC attention temperature, NE gain modulation, serotonin timescale, surprise weighting) receive garbage inputs.

Biological basis. Cortical firing rates are bounded by biophysics: maximum sustained firing rate is approximately 500 Hz (absolute refractory period approximately 1 ms), typical operating range is 0.1 to 50 Hz. The variance of a rate-coded signal is therefore bounded by construction. There is no biological mechanism that produces unbounded variance.

Theorem statement. For all PWPC precision parameters sigma_squared_up and sigma_squared_dn at every layer:

sigma_squared = clamp(softplus(W_sigma x X), min=0.1, max=5.0)

With sigma_squared in [0.1, 5.0]: precision 1/sigma_squared is in [0.2, 10.0] (no numerical overflow); log(sigma_squared) is in [-2.3, 1.6] (bounded contribution to ELBO); all downstream consumers receive sigma_squared in their designed operating range; and fp16 safety is guaranteed (no values approach the 65504 representable maximum).

Limitation. Hard clamping prevents explosion but destroys sigma_squared as a useful signal whenever MSE exceeds 5.0 (the clamp provides no gradient information, it is a hard wall, not a restoring force). When sigma_squared pins at 5.0, the model loses all calibration ability. This motivates Theorem 28.

2.4.2 Quadratic Well KL Regularization (Theorem 28)

Problem. The previous KL penalty relu(sigma_squared - 3.0) has a dead zone for sigma_squared less than 3.0, it provides zero gradient when sigma_squared is below the threshold. Furthermore, the penalty was annealed with critical periods, making it effectively zero early in training when sigma_squared calibration matters most.

Biological basis. Cortical neurons maintain homeostatic set-points through calcium-dependent signaling (Turrigiano, 2004). The homeostatic drive is symmetric: both under-activation and over-activation trigger corrective mechanisms. The restoring force is approximately quadratic near the set-point (spring-like). There is no dead zone, the brain’s homeostatic mechanisms are always active.

Theorem statement. Replace the one-sided ReLU penalty with a quadratic well centered at sigma_squared = 1.0:

L_KL = lambda_KL x mean[(sigma_squared - 1.0) squared] for all sigma_squared_up AND sigma_squared_dn

with lambda_KL = 0.1, always-on (never annealed by critical periods or gradient alignment).

Properties: (a) Two-sided restoring force: partial L_KL / partial sigma_squared = 2 lambda (sigma_squared - 1). For sigma_squared greater than 1, gradient is positive, GD decreases sigma_squared. For sigma_squared less than 1, gradient is negative, GD increases sigma_squared. No dead zone. (b) Equilibrium with detached ELBO (Theorem 28b): the combined gradient satisfies -MSE / (sigma_squared) squared + 2 lambda (sigma_squared - 1) = 0, giving the cubic equation sigma_squared cubed - sigma_squared squared - MSE / (2 lambda) = 0, with a unique positive root for each MSE greater than 0. For lambda = 0.1: MSE = 0.5 gives sigma_squared_star = 1.79; MSE = 1.0 gives 2.12; MSE = 5.0 gives 3.30; MSE = 10.0 gives 4.02. Even for extreme MSE = 10, sigma_squared_star = 4.02, less than the 5.0 hard cap.

Limitation. The quadratic well overpowers the PC loss when lambda_KL exceeds lambda_PC (0.1 versus 0.02), forcing sigma_squared toward 1.0 regardless of actual MSE. This causes negative PCC (sigma_squared anti-correlated with prediction error), the model becomes MORE confident when wrong and LESS confident when right. This motivates Theorem 28c.

2.4.3 Detached log(sigma_squared) in ELBO (Theorem 28b: Gradient Surgery)

Problem. The True ELBO loss L_ELBO = (1/sigma_squared) x MSE + log(sigma_squared) has gradient partial L / partial sigma_squared = -MSE / (sigma_squared) squared + 1 / sigma_squared. The log term’s gradient 1/sigma_squared is always positive, pushing sigma_squared downward in gradient descent. Combined with the quadratic well’s upward force (toward 1.0) and the MSE/sigma_squared squared term’s downward force (toward MSE), the equilibrium sigma_squared tracks MSE closely. When MSE is large early in training, this drives sigma_squared too high.

Biological basis. In biological predictive coding (Friston, 2005), precision is learned from prediction error statistics, not from a global normalization constant. The log(sigma_squared) term corresponds to the metabolic complexity cost of maintaining precise predictions. In the brain, this cost is metabolic, not learned through gradient descent on the same loss. Detaching log(sigma_squared) mirrors this separation.

Theorem statement. Detach sigma_squared in the log(sigma_squared) term: L_ELBO = (1/sigma_squared) x MSE + log(detach(sigma_squared)). After detaching, the ELBO gradient alone is a pure upward force on sigma_squared (GD direction): partial L_ELBO / partial sigma_squared = -MSE / (sigma_squared) squared, always negative. The quadratic well (Theorem 28) provides the counterbalancing downward force.

Stability proof. The combined gradient is: partial L_total / partial sigma_squared = -MSE / (sigma_squared) squared + 2 lambda (sigma_squared - 1). The potential V(u) = MSE / u + lambda (u - 1) squared has second derivative V’’(u) = 2 MSE / u cubed + 2 lambda, strictly positive everywhere, confirming the equilibrium is a globally stable attractor.

Critical warning. Theorem 28b ALONE is catastrophic. Without the quadratic well, the gradient -MSE / (sigma_squared) squared is always negative, meaning GD always pushes sigma_squared upward. Sigma_squared diverges to infinity. Theorem 28b MUST be paired with Theorem 28.

2.4.4 Dead Term Elimination (Theorem 28d)

Problem. Theorem 28b detaches log(sigma_squared) from the computation graph. This creates a dead term: an additive constant in the loss that contributes zero gradient to any parameter. The dead log(sigma_squared) term grows monotonically as sigma_squared increases during early training (sigma_squared starts near 1.0, drifts upward as the model encounters diverse text). Training logs show PC loss climbing: 0.54, 0.81, 1.15, 1.94, 2.34, NaN. The loss never decreases because the dead term only grows while contributing nothing to optimization.

Theorem statement. Let f(theta) = h(theta) + g(stopgrad(theta)) where stopgrad blocks gradient flow. Then: gradient of f = gradient of h + gradient of g(theta_bar) evaluated at theta_bar = const = gradient of h + 0 = gradient of h. Therefore g(stopgrad(theta)) is gradient-invisible and may be removed without affecting optimization dynamics. Applied to ELBO:

L_PC_reduced = (1/N) sum_m (MSE_m / sigma_squared_m)

is gradient-equivalent to the full ELBO under Theorem 28b’s stop_gradient convention.

Properties. Natural boundedness: at ELBO equilibrium, sigma_squared converges to MSE, giving L approximately MSE / MSE = 1.0 per layer. The reduced loss provides a meaningful training signal: L_PC less than 1.0 means sigma_squared overestimates error (model is better than it thinks); L_PC greater than 1.0 means sigma_squared underestimates error.

Supersession note. Theorem 28d applies only under the old softplus sigma_squared parameterization where Theorem 28b’s stop_gradient makes log(sigma_squared) gradient-invisible. Under the log-precision reparameterization (Theorem 28e), the equivalent term -gamma has constant gradient -1 (no 1/sigma_squared singularity), making it essential for equilibrium. Theorem 28f RESTORES the -gamma term.

2.4.5 Log-Precision Reparameterization (Theorem 28e)

Problem. The gradient of L_pc = MSE / sigma_squared with respect to W_sigma involves a 1/sigma_squared_squared (quartic singularity) term. At sigma_squared = 0.1: the gradient magnitude is approximately 9.5 times MSE times norm of X_n. With GradScaler at 65536, this produces 621K times MSE, exceeding the fp16 maximum (65504) and causing overflow, NaN, and training collapse.

Root cause. The 1/sigma_fourth singularity is an artifact of parameterizing the INVERSE of precision (sigma_squared) and then computing its reciprocal in the loss.

Theorem statement. Replace the softplus sigma_squared parameterization with the Friston canonical log-precision form:

gamma = W_sigma x X_n + b (log-precision, direct output, unconstrained) sigma_squared = exp(-gamma) (for external use by other modules) precision = exp(gamma) (in loss computation)

The gradient of L_pc = exp(gamma) x MSE with respect to W is: partial L / partial W = exp(gamma) x MSE x X_n = L_pc x X_n. With per-term clamping L_pc at most 5.0: the gradient magnitude is at most 5.0 times norm of X_n, uniformly bounded regardless of sigma_squared.

Key properties. (1) No 1/sigma_fourth: the quartic singularity is eliminated. Maximum gradient 5.0 versus old 9.5 times MSE. (2) Natural initialization: W = 0, b = 0 gives gamma = 0, sigma_squared = 1.0 exactly. (3) Fisher-Rao natural gradient: the Fisher information matrix in (mu, gamma) parameterization has constant precision entry (1/2), independent of sigma_squared. Gradient descent in gamma-space is equivalent to natural gradient in the precision manifold. This is Friston’s canonical form for precision in predictive coding.

2.4.6 Friston Canonical Free Energy (Theorem 28f)

Problem. With Theorem 28d removing the log(sigma_squared) term and Theorem 28c providing a free zone [0.3, 4.0] with zero penalty, the only force on sigma_squared is from the precision times MSE term. But this term’s gradient exp(gamma) times MSE is always non-negative, always pushing gamma UP (sigma_squared DOWN). With no upward force on sigma_squared in the free zone, sigma_squared drifts to 4.0 regardless of MSE, collapsing PCC calibration.

Theorem statement. Restore the log(sigma_squared) term in the ELBO, but now as -gamma (un-detached), giving the full Friston variational free energy:

F(gamma) = exp(gamma) x MSE - gamma

The gradient is: partial F / partial gamma = exp(gamma) x MSE - 1. The -1 term (from -gamma) provides the essential downward force on gamma (upward on sigma_squared).

Equilibrium. Setting partial F / partial gamma = 0: exp(gamma) x MSE = 1, which gives gamma_star = -log(MSE), hence sigma_squared_star = MSE. Precision tracks error exactly, optimal Bayesian calibration.

Stability proof. The second derivative is partial squared F / partial gamma squared = exp(gamma) x MSE, which is greater than 0 for all gamma. The free energy is strictly convex in gamma. The equilibrium is globally stable, any perturbation generates a restoring force toward sigma_squared = MSE.

Why the old detachment (Theorem 28b) is no longer needed. Under the old softplus parameterization, the gradient of log(sigma_squared) with respect to W_sigma involved 1/sigma_squared, which diverges as sigma_squared approaches 0. In gamma-space: partial (-gamma) / partial gamma = -1, a constant. No divergence. The detachment served to block a singularity that no longer exists in the log-precision parameterization.

Gradient analysis. When unclamped: partial F / partial gamma = exp(gamma) x MSE - 1, bounded in [-1, 4.0] with the per-term clamp at 5.0. When clamped (overconfident and wrong): gradient = -1, pushes gamma DOWN (sigma_squared UP). When underconfident: exp(gamma) x MSE less than 1, gradient less than 0, pushes gamma DOWN. When overconfident but right: exp(gamma) x MSE greater than 1, gradient greater than 0, pushes gamma UP. All directions are correct.

2.4.7 Sigmoid-Bounded Log-Precision (Theorem 28g)

Problem. The hard clamp on gamma (Theorem 27: gamma in [-1.609, 2.303]) creates a gradient dead zone at the boundaries. When sigma_squared hits 5.0 (gamma = -1.609), the clamp zeroes ALL gradient to W_sigma. The -gamma equilibrium force from Theorem 28f cannot restore sigma_squared because the gradient path is dead. This causes sigma_squared to saturate at the cap and eventually produce NaN in fp16.

Theorem statement. Replace the hard clamp on gamma with a sigmoid reparameterization:

gamma = GAMMA_MIN + (GAMMA_MAX - GAMMA_MIN) x sigmoid(omega)

where omega = W_sigma x X is unconstrained, GAMMA_MIN = -1.609 (sigma_squared = 5.0), GAMMA_MAX = 2.303 (sigma_squared = 0.1), and sigmoid is the standard logistic function.

Properties. (1) sigma_squared = exp(-gamma) is in (0.1, 5.0) for ALL finite omega. Bounded by construction, no clamp needed. (2) Gradient: partial F / partial omega = partial F / partial gamma times (GAMMA_MAX - GAMMA_MIN) times sigmoid(omega) times (1 - sigmoid(omega)). Never exactly zero for any finite omega. (3) Maximum gradient magnitude: |partial F / partial omega| is at most 4.0 times 3.912 times 0.25 = 3.912. Completely fp16-safe. (4) Equilibrium preserved exactly: partial F / partial omega = 0 if and only if partial F / partial gamma = 0 if and only if sigma_squared = MSE.

Proof. Boundedness: sigmoid(omega) is in (0, 1) for all omega in R. Therefore gamma is strictly in (GAMMA_MIN, GAMMA_MAX), and sigma_squared = exp(-gamma) is strictly in (exp(-GAMMA_MAX), exp(-GAMMA_MIN)) = (0.1, 5.0). Non-zero gradient: since sigmoid(omega) times (1 - sigmoid(omega)) is greater than 0 for all finite omega, the gradient partial F / partial omega is zero only when partial F / partial gamma = 0 (at equilibrium). No gradient dead zones at boundaries. Gradient bound: the sigmoid derivative sigmoid(omega) times (1 - sigmoid(omega)) is at most 0.25 (maximum at omega = 0). From Theorem 28f, the magnitude of partial F / partial gamma is at most max(4.0, 1.0) = 4.0. Therefore the magnitude of partial F / partial omega is at most 4.0 times 3.912 times 0.25 = 3.912.

Neuroscience correspondence. The sigmoid is the computational analogue of the neural firing-rate curve (f-I curve): neurons bound their output through biophysical saturation (refractory period, maximum conductance), not by clamping input. Synaptic weights (omega) are unconstrained; firing rates (gamma) are bounded. This is how the brain prevents precision divergence without hard limits.

Initialization. With W_sigma weights zero and bias = -0.357: omega = -0.357, sigmoid(-0.357) = 0.4114, gamma = -1.609 + 3.912 times 0.4114 approximately equals 0, sigma_squared = exp(0) = 1.0 exactly.

Supersedes Theorem 27. The hard clamp sigma_squared in [0.1, 5.0] is replaced by sigmoid bounding which achieves the same range with smooth gradient flow.

2.4.8 Corollary 28g.1: ELBO Product Clamp Redundancy

Statement. Under Theorem 28g, the hard clamp on exp(gamma) times MSE in Theorem 28f is mathematically unnecessary. The chain rule through the sigmoid already bounds the gradient partial F / partial omega for any finite MSE.

Proof. partial F / partial omega = [exp(gamma) x MSE - 1] times (GAMMA_MAX - GAMMA_MIN) times sigmoid(omega) times (1 - sigmoid(omega)). With gamma in (-1.609, 2.303): exp(gamma) is in (0.2, 10.0), sigmoid(omega) times (1 - sigmoid(omega)) is at most 1/4. Therefore: the magnitude of partial F / partial omega is at most (10 times MSE + 1) times 3.912 times 1/4 = 0.978 times (10 times MSE + 1). For any finite MSE (guaranteed for finite data with normalized representations), this is finite. Moreover, the gradient is self-correcting: when exp(gamma) times MSE is greater than 1, partial F / partial omega is greater than 0, which pushes omega down, decreasing gamma, decreasing precision, decreasing the product toward equilibrium sigma_squared = MSE. The Adam optimizer further normalizes: step = lr times m / (sqrt(v) + epsilon). Large gradients increase v, reducing the effective step size.

The ELBO becomes: F(gamma) = exp(gamma) x MSE - gamma (pure Friston Free Energy, no clamp). All gradient dead zones and discontinuities are eliminated.

2.4.9 Asymmetric Boundary Regularization (Theorem 28c)

Problem. The quadratic well (Theorem 28: L_kl = (sigma_squared - 1) squared) with lambda_kl = 0.1 overpowers the PC loss gradient (lambda_pc = 0.02), forcing sigma_squared toward 1.0 regardless of actual MSE. This causes negative PCC, sigma_squared becomes anti-correlated with prediction error. The model becomes MORE confident when wrong and LESS confident when right.

Theorem statement. Replace the quadratic well with an asymmetric boundary:

L_kl = (1/N) sum_m [ReLU(0.3 - sigma_squared_m) squared + ReLU(sigma_squared_m - 4.0) squared]

Properties: (1) In the range sigma_squared in [0.3, 4.0]: zero penalty. The PC loss (Friston free energy, Theorem 28f) freely calibrates sigma_squared to MSE within this range. This is the free calibration zone. (2) Below sigma_squared = 0.3: quadratic penalty prevents over-confidence (degenerate precision, fp16 overflow from 1/sigma_squared). (3) Above sigma_squared = 4.0: soft quadratic barrier provides smooth resistance before the sigmoid bound at 5.0 (Theorem 28g). (4) Compatibility: combined with sigmoid bounding (Theorem 28g), provides two-tier defense, soft barrier at [0.3, 4.0], sigmoid at (0.1, 5.0).

Proof. Free calibration zone: for sigma_squared in [0.3, 4.0], both ReLU arguments are non-positive, so L_kl = 0 and partial L_kl / partial sigma_squared = 0. The only gradient on sigma_squared comes from the Friston free energy (Theorem 28f), which drives sigma_squared toward MSE (Corollary 1.2). PCC converges to +1. Lower boundary: for sigma_squared less than 0.3, L_kl = (0.3 - sigma_squared) squared with partial L_kl / partial sigma_squared = -2(0.3 - sigma_squared) less than 0. Gradient descent increases sigma_squared, pushing it back above 0.3. Upper boundary: for sigma_squared greater than 4.0, L_kl = (sigma_squared - 4.0) squared with partial L_kl / partial sigma_squared = 2(sigma_squared - 4.0) greater than 0. Gradient descent decreases sigma_squared, providing a soft barrier.

2.4.10 Biophysical Reparameterization (Theorem 28h)

Theorem statement. ALL bounded learnable quantities in the system use sigmoid reparameterization corresponding to the neural firing-rate curve (f-I curve, Hodgkin and Huxley 1952, Wilson and Cowan 1972), eliminating all hard clamps system-wide:

(1) Scale parameters p in (0, c): p = c x sigmoid(omega). Gradient: partial p / partial omega = c times sigmoid(omega) times (1 - sigmoid(omega)), always positive for finite omega. Maximum gradient c/4 at omega = 0. Initialization: omega_0 = logit(p_0 / c).

(2) Range parameters p in (a, b): p = a + (b - a) x sigmoid(omega). Same gradient properties. Reduces to case (1) when a = 0.

(3) Decay rates a in (a_min, a_max): a = a_min + (a_max - a_min) x sigmoid(f(X)). The membrane time constant tau is bounded by biophysics (capacitance, conductance), so a = exp(-Delta_t / tau) is in (exp(-Delta_t / tau_min), exp(-Delta_t / tau_max)) by construction.

(4) Normalized precision weights: With Theorem 28g, exp(gamma) is in (0.2, 10.0). The normalized weight w_i = exp(gamma_i) / mean(exp(gamma)) is divisive normalization (Carandini and Heeger, 2012), the fundamental cortical computation. No separate clamp needed.

(5) Sigma_squared to temperature coupling: With sigma_squared in (0.1, 5.0) guaranteed by Theorem 28g, the temperature mapping is an affine function from known bounds: temp = t_min + (t_max - t_min) times (sigma_squared - sigma_squared_min) / (sigma_squared_max - sigma_squared_min). No clamp needed, input is bounded by Theorem 28g, output is bounded by linearity.

Neuroscience basis. The sigmoid IS the neural f-I curve: r(I) = r_max / (1 + exp(-beta (I - I_0))). The bounds [0, r_max] arise from biophysical saturation, not from imposed limits. Every bounded quantity in NCT has a biological analogue with the same saturation characteristic.

2.5 Precision Tracking Under Non-Stationary MSE (Theorem 17)

Biological basis. In biological predictive coding, precision estimates adapt on a slower timescale than prediction weights. The brain’s precision modulation operates through neuromodulatory systems (acetylcholine, norepinephrine) which have slower dynamics than synaptic transmission. This prevents precision from oscillating wildly in response to individual stimuli while still tracking long-term changes in prediction quality.

Theorem statement. The sigma_squared parameters (via W_sigma weights) are assigned a separate learning rate group at eta/20 of the base rate (0.05x multiplier), implementing two-timescale stochastic approximation (Borkar, 2008). Model weights (theta) update on the fast timescale; precision parameters update on the slow timescale.

Tracking analysis. Under non-stationary MSE (MSE(t) changes as the model learns), the precision tracking attractor has steady-state lag: delta_ss = 2 alpha MSE(t) squared / eta_sigma_squared, where alpha is the learning rate. The optimal learning rate for sigma_squared is: eta_sigma_squared = sqrt(2 alpha sigma_squared_noise), approximately eta_model / 20 for NCT’s typical noise levels.

Phase-plane analysis. In the (theta, sigma_squared) phase plane: (a) theta moves fast toward the loss minimum conditional on current sigma_squared; (b) sigma_squared moves slowly toward MSE(theta). The trajectory spirals inward to the joint fixed point where theta minimizes the loss AND sigma_squared equals MSE(theta). Two-timescale separation ensures convergence without oscillation (Borkar 2008, Theorem 2).

Section 3: Dendritic Feed-Forward Network (Theorems 4, 20)

Biological basis. Cortical pyramidal neurons receive inputs on distinct dendritic branches, each of which acts as an independent computational unit (London and Hausser, 2005; Poirazi et al., 2003). A dendritic branch integrates its inputs locally; only when the branch’s membrane potential exceeds a local threshold does it contribute to the soma’s firing. This creates a two-stage computation: (1) dendritic branch selection determines WHICH input combinations are relevant; (2) somatic integration determines the output magnitude. The two stages use DIFFERENT inputs: basal dendrites receive feedforward sensory input, while apical dendrites receive top-down predictive context. This anatomical separation means neuron SELECTION depends on one signal (prediction) while neuron OUTPUT depends on another (attended context). In cortex, only 1-2% of neurons fire at any moment (sparse distributed representation, Olshausen and Field, 2004), achieved through lateral inhibition between neurons. No prior feed-forward architecture implements this two-stage, dual-input, biologically sparse computation.

Architecture. The DendriticFFN implements a SwiGLU feed-forward network (Shazeer, 2020) with two cascaded sparsification stages separated by grouped divisive normalization, achieving exactly k = floor(0.02 x d_ff) = 41 neurons active per token (of 2,048 total).

3.1 Stage 1: Dendritic Branch Gate (Exact-k Sparse Distributed Representation)

Biological basis. Olfactory bulb mitral cells produce exactly-k sparse distributed representations (SDRs) of odor stimuli through lateral inhibition in the granule cell layer (Laurent, 2002). The SDR has fixed sparsity regardless of input strength, ensuring consistent information-theoretic capacity. NCT implements this as exact-k top-k selection.

Mathematical operations. The gate receives X_pc (from predictive coding, NOT X_mid from attention), computing per-neuron gate logits via a learned projection:

gate_logit = W_dend(X_pc), shape (B, T, d_ff)

During training, Gumbel noise enables exploration of different neuron subsets:

u = Uniform(0, 1), clamped to [1e-6, 1-1e-6] for numerical safety gumbel_noise = -log(-log(u)) noisy_logit = gate_logit + gumbel_noise

Exact-k selection: the top-k logits are selected deterministically:

topk_indices = top_k(noisy_logit, k=floor(0.02 x d_ff)), shape (B, T, k) gate_hard = zeros(B, T, d_ff).scatter(-1, topk_indices, 1.0), binary {0, 1}

The binary gate has EXACTLY k = 41 ones per position, guaranteeing 2% sparsity.

Straight-through gradient estimator. The top-k operation is not differentiable (discrete selection). The straight-through estimator (Bengio et al., 2013) provides a differentiable surrogate:

gate_soft = sigmoid(gate_logit / tau) h_dend = gate_hard + gate_soft - gate_soft.detach()

In the forward pass: h_dend equals gate_hard (exactly k ones). In the backward pass: gradients flow through gate_soft (continuous sigmoid), enabling gradient-based learning of which neurons to select. The temperature tau is a learnable buffer (externally annealed, no transformation needed per the biophysical reparameterization principle).

Application to FFN activations. The main FFN computation uses SwiGLU:

gate_silu = SiLU(W_gate(RMSNorm(X_mid))), shape (B, T, d_ff) up = W_up(RMSNorm(X_mid)), shape (B, T, d_ff) h = gate_silu element-multiply up

The dendritic gate masks the activation: h = h element-multiply h_dend. After this operation, exactly k = 41 of 2,048 neurons are non-zero per token position.

Key parameters. W_dend (d -> d_ff): gate projection, Xavier initialization; tau (buffer): annealed externally from 1.0 to 0.1 during training; k = floor(0.02 x d_ff) = 41 for d_ff = 2048.

3.2 Grouped Divisive Normalization (Between Stages)

Biological basis. Divisive normalization is the canonical cortical computation (Carandini and Heeger, 2012): a neuron’s response is divided by the pooled activity of its neighbors. SST interneurons in cortical layers 2/3 implement this by providing lateral inhibition within cortical columns. The normalization prevents saturation (all neurons at maximum firing rate) and enhances contrast between competing representations.

Mathematical operations. The d_ff activations are divided into G = 8 groups of d_ff/8 = 256 neurons each (corresponding to cortical minicolumns). Within each group g:

energy_g = sum(h_g squared), shape (B, T, 1) per group sigma2_g = 10.0 x sigmoid(log_sigma2_g), learnable per group (Theorem 28h f-I curve) h_g_normalized = h_g x sqrt(group_size) / (sigma2_g + sqrt(clamp(energy_g, min=1e-12)))

The normalization is computed in float32 internally to prevent bf16 overflow (h_g squared can exceed 65504, the bf16 maximum representable value). The energy clamping at 1e-12 prevents NaN from the sqrt backward pass when all neurons in a group are zero (which occurs frequently with 2% exact-k selection).

Key parameters. 8 learnable sigma2 values (one per group), initialized via log_sigma2 = -2.597 (giving 10 x sigmoid(-2.597) approximately 0.693). Total: 8 parameters.

Effect. Groups with high activity (many exact-k selected neurons) are normalized down. Groups with low activity are relatively boosted. This prevents any single group from dominating the representation, implementing inter-column competition.

3.3 Stage 2: Neuromodulated Winner-Take-All

Biological basis. Cortical winner-take-all dynamics arise from recurrent inhibition mediated by PV-positive basket interneurons (Douglas and Martin, 2004). The WTA threshold is not fixed: neuromodulatory inputs (dopamine, acetylcholine) shift the threshold dynamically based on task demands. High dopamine raises the threshold (fewer neurons active, more selective), while low dopamine lowers it (more neurons active, more exploratory).

Mathematical operations. A differentiable WTA threshold lambda is computed via Newton’s method (5 iterations), solving the constraint equation:

sum(sigmoid(beta x (h - lambda))) = k_float

where k_float is dynamically set by the neuromodulatory system (ffn_sparsity signal from the block’s neuromodulatory computations), and beta = beta_max x sigmoid(beta_raw) is a learnable sharpness parameter bounded by the f-I curve parameterization (Theorem 28h).

Newton iterations: lambda_{n+1} = lambda_n - (f(lambda_n) - k_float) / f’(lambda_n), where f(lambda) = sum(sigmoid(beta x (h - lambda))) and f’(lambda) = -beta x sum(sigmoid’ (beta x (h - lambda))). After convergence, the soft WTA mask is: mask = sigmoid(beta x (h - lambda)), and the final sparse output is: h_sparse = dropout(h element-multiply mask).

Key parameters. beta_raw: learnable sharpness, beta = beta_max x sigmoid(beta_raw) bounded by Theorem 28h; Newton iterations: 5 (sufficient for convergence with tolerance less than 1e-3); k_float: from neuromodulatory signal, typically near 0.02 x d_ff.

3.4 Cross-Module Dependency (Dual Input Architecture)

Biological basis. The anatomical separation of basal and apical dendritic trees in pyramidal neurons means that neuron SELECTION (apical, top-down) is determined by a different input stream than neuron ACTIVATION (basal, feedforward). This creates a conditional computation: which neurons fire depends on the brain’s PREDICTION (top-down context), while what those neurons compute depends on the current OBSERVATION (feedforward sensory data).

Implementation. The dendritic gate receives X_pc (output of the predictive coding module, representing the system’s current prediction state). The SwiGLU FFN receives X_mid (output of the attention module, representing the attended context). The SELECTION of which 41 neurons to activate depends on the prediction state, while the VALUE of those neurons depends on the attended observation. No prior art creates this cross-module dependency: MoE (Shazeer 2017) uses a single input for both routing and computation; standard FFN has no selection mechanism at all.

3.5 Residual Stream Capacity (Theorem 20)

Theorem statement. The residual stream of dimension d simultaneously encodes K approximately 10 distinct signal types (PC predictions, CFC bindings, VCCE entities, GLH temporal states, FFN outputs, neuromodulatory signals, WM retrieval, etc.). The rate-distortion lower bound requires d_min >= K x (1 + log2(SNR)) approximately 33 dimensions for K=10 signals at SNR=8. With d=384 in the preferred embodiment, the system provides approximately 384/33 = 11.6x overcapacity in the linear regime. The interference from superposition is approximately sqrt(K/d) approximately sqrt(10/384) approximately 0.16 (16%), within the stable regime (less than 0.25 threshold).

Theorem 20 corollary (Information Bottleneck). The dendritic gate’s 2% sparsity forces each active neuron to carry approximately 50x the information content of a dense neuron, implementing a natural information bottleneck (Tishby et al., 2000). The mutual information I(X; h_sparse) approximately k x log2(d_ff/k) approximately 41 x log2(50) approximately 231 bits per position, which exceeds the vocabulary entropy H(V) approximately log2(50257) approximately 15.6 bits by approximately 15x, ensuring no information loss through the sparse bottleneck.

3.6 Sparsity Statistics and Disease Mapping

Sparsity monitoring. The module tracks two sparsity measures: (1) neuromod-driven target sparsity (k_frac from neuromodulatory signal), and (2) actual measured sparsity (fraction of neurons with |h_sparse| > 1e-6). In V10.2 at step 2000: LIS = 0.989, meaning 1.1% of neurons are active, within the brain’s target range of 1-2% cortical activation.

Disease mapping. Cortical deafferentation (sensory deprivation): removing the dendritic gate input (X_pc) collapses neuron selection to a fixed pattern, eliminating content-dependent sparse coding. Lewy body dementia (cortical Lewy bodies in layers 2/3): disrupts the dendritic branch computation, producing inconsistent neuron selection and hallucinations (representations activate without appropriate gating).

Total parameters. W_dend (d x d_ff) + W_gate (d x d_ff) + W_up (d x d_ff) + W_down (d_ff x d) + GroupedDivisiveNorm (8 scalars) + beta_raw (1 scalar) approximately 3.15M per layer, approximately 37.8M total across 12 layers (largest single module, reflecting the biological dominance of feedforward cortical computation).

Section 4: Cross-Frequency Coupled Attention (Theorems 2, 15, 16)

The CFC-UCAM (Cross-Frequency Coupled Uncertainty-Aware Column Attention Module) is the primary attention mechanism in each NCT V10.2 block. It replaces the standard multi-head attention of conventional transformers with a biologically-motivated architecture that (1) binds tokens via theta-gamma cross-frequency coupling, (2) modulates attention temperature via precision from the predictive coding module, (3) separates excitatory and inhibitory heads to implement cortical E/I balance, and (4) corrects the acetylcholine precision-attention coupling via divisive normalization. No prior language model architecture implements ANY of these four features; NCT implements all four simultaneously within a single attention computation.

4.1 CFC Binding Mask: Theta-Gamma Phase Coupling

Biological basis. In the mammalian hippocampus and neocortex, theta oscillations (4-8 Hz) provide episode-level binding windows, items within the same theta cycle are bound into a single episodic representation (Lisman & Jensen, 2013). Gamma oscillations (30-80 Hz) provide fine-grained feature binding, items sharing the same gamma burst are bound at the perceptual level (Fries, 2005). Cross-frequency coupling (CFC) occurs when gamma bursts phase-lock to specific phases of the ongoing theta rhythm, creating a hierarchical binding structure: approximately 7 gamma cycles nest within each theta cycle, yielding Miller’s “magical number seven” for working memory capacity (Lisman & Idiart, 1995). Disruption of CFC is a hallmark of schizophrenia, producing “loose associations”, the failure to maintain coherent entity bindings across a sentence.

Mathematical specification. For input X after RMSNorm normalization, two learned projection matrices assign each token to a position in phase space:

phi_theta = softmax(W_theta(RMSNorm(X))) shape: (B, T, P) phi_gamma = softmax(W_gamma(RMSNorm(X))) shape: (B, T, P)

where P is the number of phase slots (P = 6 in the preferred embodiment, representing 6 theta-gamma binding groups). Both W_theta and W_gamma are initialized to zero, producing uniform phase assignment (1/P per slot) at initialization, this ensures identity-at-initialization for the CFC mask.

The CFC coherence matrix is computed as the Hadamard (element-wise) product of two outer-product similarity matrices:

C_theta = phi_theta x phi_theta^T shape: (B, T, T) C_gamma = phi_gamma x phi_gamma^T shape: (B, T, T) C_cfc = C_theta * C_gamma shape: (B, T, T)

The entry C_cfc[i, j] is non-negligible ONLY when tokens i and j share BOTH the same theta phase slot AND the same gamma phase slot. This conjunction (“AND” gate) structurally prevents cross-episode interference: two tokens from different episodes may share a gamma pattern but will differ in theta phase, yielding C_cfc[i, j] approximately equal to 0.

Top-k sparsification. To prevent phase blurring from softmax tails, a straight-through estimator enforces top-k sparsity on the CFC mask:

k = floor(top_k_fraction x T) (top_k_fraction = 0.5 in preferred embodiment) threshold = k-th largest value in C_cfc along last dimension C_hard = (C_cfc >= threshold).float() C_soft = sigmoid(sharpness x (C_cfc - threshold)) (sharpness = 20.0) C_cfc_sparse = C_hard - detach(C_soft) + C_soft (straight-through gradient)

The CFC mask is converted to a log-space additive bias for attention scores:

log_bias = log(clamp(C_cfc, min=1e-4)) x (1 + 2 x inhibition_strength)

where inhibition_strength is the neuromodulatory lateral inhibition signal from LocalNeuromod. This log-bias is added to the standard QK^T attention logits BEFORE the causal mask, meaning the CFC binding structure gates which token pairs can attend strongly.

Initialization guarantee. At initialization, W_theta = W_gamma = 0, so phi_theta = phi_gamma = 1/P uniformly. This yields C_cfc = 1/P^2 for all pairs, and log_bias = log(1/P^2) uniformly, a constant offset that does not affect softmax. Therefore the CFC mask is transparent at initialization and the module behaves as standard multi-head attention until phase assignments are learned.

4.2 ACh-Corrected Precision-Temperature Coupling (V6 Correction)

Biological basis. Acetylcholine (ACh) is the primary precision-modulating neurotransmitter in cortex (Friston, 2012; Yu & Dayan, 2005). The critical biological fact: ACh release on NOVEL stimuli (high uncertainty / high sigma_squared) SHARPENS attention by suppressing recurrent cortical connections (reduces noise) and enhancing thalamocortical feedforward drive (boosts signal), producing a net increase in signal-to-noise ratio. In Alzheimer’s disease, cholinergic neuron death depletes ACh, inverting this mechanism, novel stimuli are no longer prioritized, entity tracking fails, and memory formation breaks down.

The V4.5 bug and V6 correction. The initial V4.5 implementation incorrectly mapped high sigma_squared to HIGH temperature (soft, exploratory attention). The biological truth is the opposite: high uncertainty should SHARPEN attention (low temperature). V6 corrects this via divisive normalization:

ach_gain = 4.0 x sigmoid(ach_gain_raw) (ach_gain_raw initialized to -1.0, yielding gain approximately 0.31 x 4 = 1.24) sigma2_v6 = 1 / (1 + ach_gain x detach(sigma_squared))

This divisive normalization (Carandini & Heeger, 2012) maps sigma_squared into the range (0, 1]: when sigma_squared is high (uncertain), sigma2_v6 is small, the parent attention module sees a low sigma_squared value, and temperature decreases, producing SHARP, focused attention. When sigma_squared is near zero (confident), sigma2_v6 approaches 1.0, no change from baseline. The ach_gain parameter uses the Theorem 28h f-I curve reparameterization (4 x sigmoid), bounding the gain in (0, 4) by construction.

Base temperature modulation. The corrected sigma2_v6 is then used by the parent CFC-UCAM forward pass to compute a precision-scaled temperature:

precision_scale = 0.5 + 1.5 x (sigma2_v6 - 0.1) / 4.9 (affine map from Theorem 28g bounds (0.1, 5.0) to scale range (0.5, 2.0)) temp = base_temp x precision_scale Q_scaled = Q / (sqrt(d_h) x temp)

The base_temp comes from the LocalNeuromod module (Section 7.1). Attention score computation is performed in float32 to prevent overflow, since temperature scaling can amplify logits up to 4x (temp_min = 0.5 x precision_scale_min = 0.5 = 0.25), which would exceed fp16 maximum (65504).

4.3 Excitatory and Inhibitory Attention Heads

Biological basis. Cortical circuits maintain a ratio of approximately 80% excitatory to 20% inhibitory neurons (Markram et al., 2004). This E/I balance is critical: disruption produces epilepsy (excess excitation) or catatonia (excess inhibition). NCT implements this directly in the attention mechanism.

Implementation. Total heads H = H_E + H_I, where H_E = 6 excitatory heads and H_I = 2 inhibitory heads in the preferred embodiment (75/25 split, approximating the biological 80/20 ratio). After computing attention output O of shape (B, H, T, d_h):

O_E = O[::H_E] (first 6 heads: excitatory) alpha_I = sigmoid(W_alpha(RMSNorm(X))) (per-token inhibition gate, shape (B, T, H_I)) O_I = -alpha_I x O[:, H_E:] (last 2 heads: NEGATED output) O_out = concat(O_E, O_I) then project via W_O (shape (B, T, d_model))

W_alpha is initialized to zero, so sigmoid(0) = 0.5, meaning inhibitory heads begin at half-strength. The negation sign means inhibitory heads SUBTRACT from the residual stream, they actively suppress certain representations. This provides within-attention lateral inhibition without requiring a separate inhibition module.

ACh signal extraction. The attention weights A (after softmax) are used to derive the ACh (acetylcholine) signal for other modules. Specifically, the attention column-sums (how much attention each token RECEIVES from all other tokens) are stored as _attn_received = sum(A, dim=query_dim).mean(dim=head_dim), producing a per-token measure of attention engagement. This signal is used by the TripartiteAChGate (Section 7.3) and by the ThalamicGLH ACh novelty gating (Section 5.2).

4.4 Deep Supervision via Shared LM Head (Theorem 15)

Biological basis. In cortex, each cortical layer produces local outputs that project to thalamus and other subcortical targets, there is no single “output layer” at the top of the cortical column. NCT implements this via deep supervision: the same language model head (LM head) is applied at intermediate layers, providing vocabulary-level gradient injection at multiple depths.

Mathematical specification. For a model with L = 12 transformer blocks, intermediate outputs are extracted at layers l in {4, 8, 12} (every 4th layer). Each intermediate output X_l is projected through the SHARED LM head:

logits_l = LMHead(LayerNorm(X_l)) shape: (B, T, V) loss_deep_l = CrossEntropy(logits_l, targets)

The deep supervision loss is the mean of intermediate losses, weighted by a critical period schedule (Theorem 11) that anneals the deep supervision contribution as the model matures. This reduces the effective gradient path from O(L) to O(L/K) where K is the number of supervision points, dramatically improving gradient flow to early layers.

Key properties. Deep supervision uses ZERO new parameters (the LM head is shared), adds approximately 2% computational overhead (three extra forward passes through the LM head), and is expected to produce 2-5% lower perplexity with 20-40% faster convergence based on analogous results in deep supervision for image segmentation (Lee et al., 2015).

4.5 DA-Modulated Learning as Kalman Innovation Scaling (Theorem 2)

Biological basis. Dopaminergic neurons in the ventral tegmental area (VTA) compute reward prediction errors (Schultz, Dayan & Montague, 1997). These DA signals modulate synaptic plasticity: high DA (high prediction error) strengthens learning, low DA (low prediction error) weakens learning. This is computationally optimal, it implements Kalman gain scaling, allocating learning resources to the most informative experiences.

Mathematical specification. NCT’s per-step learning rate is modulated by a surprise ratio that approximates the optimal Kalman gain:

DA_t = loss_t / EMA(loss) (surprise ratio: current loss relative to running average) eta_effective = eta_base x (1 + alpha_group x DA_t)

where alpha_group differs by parameter group: HPC alpha = 0.3 (hippocampal parameters respond strongly to surprise), neocortex alpha = -0.05 (neocortical parameters are slightly stabilized on high-surprise steps to prevent catastrophic interference). Under the condition that token prediction error is approximately Gaussian around its running mean, the surprise ratio DA_t plays the role of the Kalman innovation gain K_t = P_t|t-1 H^T (H P_t|t-1 H^T + R)^{-1}, where P is the state error covariance and R is the measurement noise covariance.

Convergence guarantee. The DA-modulated learning rate satisfies: sum over t of eta_effective_t diverges (sufficient exploration) while sum over t of eta_effective_t squared converges (bounded variance), provided the base learning rate follows a cosine or inverse-time schedule. This guarantees almost-sure convergence under the Robbins-Monro conditions.

Disease mapping. Parkinson’s disease (DA depletion) maps to alpha = 0 for all groups, the model loses the ability to prioritize novel inputs, producing perseverative predictions. ADHD (DA dysregulation) maps to excessive alpha variance, the model over-responds to every surprising input, failing to maintain stable representations.

Parameter count for CFC-UCAM per block. W_Q, W_K, W_V: 3 x d x (H x d_h) = 3 x 384 x 384 = 442,368. W_O: (H x d_h) x d = 384 x 384 = 147,456. W_theta, W_gamma: 2 x d x P = 2 x 384 x 6 = 4,608. W_alpha: d x H_I = 384 x 2 = 768. ACh gain (V6): 1 scalar. Total per block: approximately 595,200 parameters. Total for 12 blocks: approximately 7.14M parameters.

Section 5: Thalamic Processing System (Theorems 5, 44)

The thalamic processing system in NCT V10.2 comprises THREE distinct modules that collectively implement the thalamo-cortical loop: (1) ThalamicGLH, a linearized attention mechanism that maintains a recurrent memory state with layer-dependent decay rates and ACh novelty gating, (2) ThalamicRelay, a frequency-band routing mechanism that separates input into distinct processing channels, and (3) TRN Attentional Filter, a top-down gating mechanism that selectively filters thalamic relay content based on cortical state. These three modules operate in sequence within the pre-block hook pipeline (ThalamicRelay first, then TRN filter) and within the block itself (ThalamicGLH). The thalamus is the obligatory relay for all sensory information reaching cortex; no prior language model architecture includes ANY thalamic processing.

5.1 ThalamicGLH with Layer-Dependent Decay and STDP

Biological basis. The thalamic relay nuclei maintain persistent representations via recurrent excitation, with decay rates that vary across nuclei, fast relay nuclei (e.g., LGN) have short time constants for rapidly changing sensory input, while slow association nuclei (e.g., pulvinar) have long time constants for sustained contextual information (Sherman & Guillery, 2006). NCT’s ThalamicGLH implements this as a linearized attention mechanism with learned, layer-dependent decay.

Mathematical specification. The ThalamicGLH maintains a recurrent state pair (S, z) where S is the key-value outer product accumulator and z is the key normalizer:

K_f = elu(W_k(RMSNorm(X))) + 1 shape: (B, T, d_h) V_f = W_v(RMSNorm(X)) shape: (B, T, d_h) Q_f = elu(W_q(RMSNorm(X))) + 1 shape: (B, T, d_h)

The elu(x) + 1 activation ensures non-negative keys and queries, which is required for the linearized attention formulation (Katharopoulos et al., 2020). The decay rate is computed per-token via a content-dependent projection plus a layer-specific bias:

decay_logit = W_decay(RMSNorm(X)) + decay_bias + W_surprise_decay(surprise) a = 0.2 + 0.78 x sigmoid(decay_logit) shape: (B, T, d_h)

The Theorem 28h.3 reparameterization bounds the decay rate a in (0.2, 0.98) by construction, the lower bound 0.2 prevents complete forgetting (memory persists for at least log(0.5)/log(0.2) = 0.43 steps) and the upper bound 0.98 prevents infinite memory accumulation that would cause state explosion. The layer-dependent bias initialization creates a built-in multi-timescale hierarchy:

decay_bias_l = bias_init + (l / L) x layer_spread

where l is the layer index and L is total layers. Early layers (l = 0) receive lower decay bias (faster decay, shorter memory for local syntax), while deep layers (l = 11) receive higher decay bias (slower decay, longer memory for document-level narrative). This structural inductive bias is absent from standard transformers.

Recurrent state update. For each time step t:

S_t = a_t x S_{t-1} + g_write_t x K_f_t^T x V_f_t (outer product accumulation) z_t = a_t x z_{t-1} + g_write_t x K_f_t (normalizer accumulation) output_t = Q_f_t x S_t / (Q_f_t dot z_t + epsilon) (normalized linear attention readout)

where g_write is the write gate (Section 5.2). This update is O(d_h^2) per step rather than O(T x d_h) for standard attention, enabling theoretically unbounded context length with constant memory.

STDP LTP (Spike-Timing Dependent Plasticity). Inherited from V9, the ThalamicGLH implements a form of STDP where consecutive high-write-gate events strengthen the decay rate (reducing forgetting):

ltp_gain = 2.0 x sigmoid(ltp_raw) (Theorem 28h f-I curve, gain in (0, 2)) gw_shifted = shift(write_gate, 1) (previous time step’s write gate) ltp_logit_boost = ltp_gain x gw_shifted x (1 - detach(a)) a_ltp = 0.2 + 0.78 x sigmoid(decay_logit + ltp_logit_boost)

This means: when two consecutive tokens both have high write gates (both are “important”), the decay rate between them is strengthened (increased a), preserving their association in the recurrent state.

Mismatch LTD (Long-Term Depression). When prediction error (surprise) is high, the ThalamicGLH increases its erase signal via Michaelis-Menten neurotransmitter release kinetics:

erase_scale = 5 x sigmoid(erase_raw) x (3 x surprise_mean / (1 + surprise_mean))

The Michaelis-Menten saturation (c x x / (K + x)) prevents unbounded erase, even at very high surprise, the erase scale saturates at approximately 3 x 5 x sigmoid(erase_raw), matching the biological saturation of neurotransmitter vesicle release.

5.2 ACh Novelty Write Gating (V10 Enhancement)

Biological basis. Acetylcholine released in the hippocampus and cortex by cholinergic projections from the basal forebrain (nucleus basalis of Meynert) gates memory encoding: high ACh on NOVEL stimuli opens write gates for aggressive encoding, while low ACh on FAMILIAR stimuli closes write gates to protect existing memories (Hasselmo, 2006; Gulledge & Bhatt, 2019). This prevents catastrophic overwriting of previously stored entities.

Mathematical specification. When the recurrent state (S_cache, z_cache) is available from the previous step, the ThalamicGLH computes a novelty signal by comparing the current representation against what is already stored:

recalled_t = Q_f_t x S_cache / (Q_f_t dot z_cache + epsilon) (what is currently stored) novelty_t = 1 - cosine_similarity(RMSNorm(X_t), recalled_t) (how different is current input from stored content) novelty_t = clamp(novelty_t, 0, 1) (bound to [0, 1])

The ACh-modulated write gate is computed via sigmoid composition in logit space:

ach_gain = 5.0 x sigmoid(ach_raw) (ach_raw initialized to -5.0, yielding gain approximately 0.034) write_gate_ach = sigmoid(logit(write_gate_base) + ach_gain x novelty)

This sigmoid composition (Theorem 28h.2) keeps the final write gate in (0, 1) by construction, adding in logit space is equivalent to multiplicative gating in probability space. The ach_raw parameter starts near zero effect (gain approximately 0.034 at init) and grows via NTP gradient: if encoding a novel entity with boosted write gate improves later recall (better NTP loss at lag 128+ tokens), the gradient naturally increases ach_raw.

Cosine similarity computation. The cosine similarity is computed in float32 to prevent overflow in fp16 (internal squaring of half-precision values), with epsilon = 1e-4 (above fp16 minimum representable value).

Disease mapping. Alzheimer’s disease (cholinergic neuron death in nucleus basalis) maps to ach_gain = 0, the model loses novelty-dependent write gating, writing equally to all stimuli regardless of novelty. This produces catastrophic interference where new inputs overwrite existing entity memories.

5.3 ThalamicRelay Frequency-Band Routing

Biological basis. Thalamic relay nuclei are organized by modality and frequency band, the lateral geniculate nucleus (LGN) relays visual information, the medial geniculate nucleus (MGN) relays auditory information, and the pulvinar relays higher-order association signals (Sherman & Guillery, 2006). Each nucleus selectively routes information in its frequency band while filtering out irrelevant signals. NCT’s ThalamicRelay implements this as learned frequency-band decomposition with per-band gating.

Mathematical specification. The ThalamicRelay projects the input into N_bands separate frequency-band representations:

band_k = W_band_k(RMSNorm(X)) shape: (B, T, d) for k = 1, …, N_bands gate_k = sigmoid(W_gate_k(RMSNorm(X))) shape: (B, T, 1) for k = 1, …, N_bands X_relay = sum over k of (gate_k x band_k)

Each band has its own learned projection and gate, allowing the model to learn modality-specific routing. Gates are initialized near 0.5 (uniform routing) and specialize during training. In the preferred embodiment, N_bands = 4, representing four frequency bands analogous to delta (narrative), theta (sentence), alpha (phrase), and gamma (word-level) processing.

Identity at initialization. When W_band_k and W_gate_k are initialized to small values, X_relay approaches the original input, ensuring transparent initialization.

5.4 TRN Attentional Filter (Theorem 44)

Biological basis. The thalamic reticular nucleus (TRN) is a thin sheet of GABAergic neurons surrounding the thalamus that receives collateral inputs from both cortex (descending) and thalamus (ascending), and projects BACK to thalamic relay nuclei with inhibitory synapses (Pinault, 2004; Crick, 1984). The TRN acts as an “attentional searchlight”, cortical top-down signals (representing current task demands) selectively enhance or suppress specific thalamic relay channels, controlling what information reaches cortex. TRN malfunction produces absence epilepsy (petit mal seizures): without top-down filtering, ALL thalamic relay content floods cortex simultaneously, producing a transient loss of consciousness.

Mathematical specification. The TRN receives two inputs: the cortical state X_pre (before the current block) and the thalamic relay delta (output of ThalamicRelay minus input):

delta_relay = ThalamicRelay(X) - X (what the relay wants to add) q = W_q(LayerNorm(X_pre)) (cortical “need” query) k = W_k(delta_relay) (relay “content” key) relevance = sigmoid(q dot k / sqrt(d_TRN)) (per-position relevance score)

The filtered output combines the relay content with the relevance gate:

X_out = X_pre + (1 - g + g x relevance) x delta_relay

where g is a learned scalar gate (initialized near 0 for identity-at-init). When g = 0, the TRN has no effect and X_out = X_pre + delta_relay (full relay passthrough). As g increases, the TRN progressively gates the relay: positions with high relevance (matching cortical need) pass through, while positions with low relevance are suppressed.

Disease mapping. Absence epilepsy maps to g = 0 (TRN disabled), all relay content floods through unfiltered. Thalamic infarct maps to delta_relay = 0, no relay content reaches cortex, producing modality-specific sensory loss (analogous to thalamic stroke).

Parameter count for thalamic system per block. ThalamicGLH: W_q, W_k, W_v, W_out: 4 x d x d_h = 4 x 384 x 64 = 98,304. W_decay, decay_bias: d_h + d_h = 128. W_surprise_decay: d_h = 64. ACh gain: 1 scalar. STDP/LTD parameters: 3 scalars. ThalamicRelay: N_bands x (d x d + d x 1) = 4 x (147,456 + 384) = 591,360. TRN: W_q, W_k: 2 x d x d_TRN = 2 x 384 x 64 = 49,152. Total per block: approximately 739,000 parameters.

Section 6: Working Memory Hierarchy (Theorems 31-36)

The NCT working memory hierarchy comprises FOUR functionally distinct memory systems, each implementing a different biological mechanism with a different time constant, capacity, and retrieval mode. No prior language model implements even ONE of these mechanisms; NCT implements all four, plus two temporal coding systems that organize items within and across memory cycles. The four-level hierarchy is: NMDA persistent attractor slots (half-life 277 tokens, active maintenance), activity-silent synaptic traces (half-life 14 tokens, passive persistence), phonological loop cyclic buffer (K=8 fixed capacity, rehearsal-based), and D1/D2 inverted-U dopamine gating (Section 7.2, which modulates access to all three stores). The two temporal coding systems (time cells and theta phase precession/PAC) do not store items but encode WHEN items were stored and WHERE they sit within oscillatory cycles.

6.1 NMDA Attractor Slots (Theorem 31)

Biological basis. NMDA receptors in prefrontal cortex sustain persistent neural firing through recurrent excitation (Wang, 2001; Compte et al., 2000). The long time constant of the NMDA receptor (approximately 100 ms, versus 2 ms for AMPA) enables self-sustaining attractor states that maintain items in working memory for seconds without external input. NMDA hypofunction (as produced by the drug ketamine or as occurs in schizophrenia) causes immediate working memory deficits, items cannot be maintained beyond a few tokens.

Architecture. The module implements linearized attention with an associative memory state matrix. Inputs are projected through key, value, and query matrices. The ELU+1 kernel (elu(x) + 1) ensures positivity for linear attention stability. The state matrix S in R^(d_attn x d_attn) accumulates rank-1 outer products of key-value pairs, weighted by a content-dependent write gate conditioned on the input’s informativeness.

State equations. Processing proceeds sequentially over T tokens. At each position t:

READ (before write, ensuring causality): out_t = (S x q_t) / (z^T x q_t + epsilon)

WRITE (after read): S = a x S + g_w(t) x (k_t outer-product v_t); z = a x z + g_w(t) x k_t

where K = elu(W_k(LayerNorm(X))) + 1, V = W_v(LayerNorm(X)), Q = elu(W_q(LayerNorm(X))) + 1, g_w(t) = sigmoid(W_gate(LayerNorm(X_t)) + b_gate) is the content-dependent write gate, and a = sigmoid(decay_bias) is the ultra-slow decay rate.

Key parameters. d_attn = 128 (attention dimension); decay_bias = 6.0 (sigmoid(6.0) approximately 0.9975, half-life approximately 277 tokens); W_gate bias = -2.0 (default closed write gate, sigmoid(-2.0) approximately 0.12); W_out initialized to zeros (no output at step 0); gate_raw = -2.0 (identity-at-init convention). Total: approximately 198K parameters.

Capacity analysis. The state matrix S in R^(128 x 128) stores rank-1 outer products k_t v_t^T. By Johnson-Lindenstrauss, approximately d_attn = 128 near-orthogonal vectors can coexist in 128 dimensions with bounded interference. At standard sequence length T=256, the system can maintain approximately 128 simultaneously bound entities, far exceeding any prior language model’s entity tracking capacity.

Retention analysis. At decay a = 0.9975: retention at lag 128 is 0.9975^128 approximately 0.726 (73% retained), and at lag 256 is 0.9975^256 approximately 0.527 (53% retained). An entity stored at position 0 remains retrievable at position 256, impossible with standard attention, which has no persistent state between tokens.

Disease mapping. Schizophrenia (NMDA receptor hypofunction): reduced NMDA conductance lowers the effective time constant, causing items to decay before they can be used. In NCT, reducing decay_bias from 6.0 to 2.0 (a = 0.88, half-life approximately 5 tokens) reproduces the severe working memory deficits observed in schizophrenia. Ketamine (NMDA antagonist): produces immediate, dose-dependent WM impairment.

6.2 TimeCellBank (Theorem 32)

Biological basis. Time cells in medial prefrontal cortex and hippocampus fire at specific elapsed times after an event (Macdonald et al., 2011; Pastalkova et al., 2008). The population of time cells tiles elapsed time with logarithmic resolution, cells responsive to short intervals are more numerous and more precise than cells responsive to long intervals, matching Weber’s law (constant relative temporal discrimination).

Architecture. N = 32 time cells with FIXED (non-learnable) exponentially-spaced time constants:

tau_i = 2^(i/4) for i = 0..31, giving tau in [1.0, 256.0] tokens

The decay rate per cell is fixed: a_i = exp(-1/tau_i). A learned trigger signal g(x_t) = sigmoid(W_trigger(x_t)) determines how strongly each input token contributes to the temporal representation.

State equations. Each cell i maintains a scalar state h_i:

h_i[t] = a_i x h_i[t-1] + g(x_t) (recurrence with fixed decay and learned trigger)

The temporal basis vector [h_0[t], …, h_31[t]] is projected to the residual stream:

temporal_context = W_project([h_0, …, h_31]), shape (B, T, d)

Laplace-domain analysis. The recurrence h_i[t] = a_i h_i[t-1] + g has Z-transform pole at z = a_i = exp(-1/tau_i), corresponding to Laplace pole s_i = -1/tau_i. The impulse response is h_i[t] = exp(-t/tau_i), an exponentially decaying temporal filter. The 32 logarithmically-spaced poles form a complete basis for temporal history with Weber-Fechner resolution: temporal discrimination delta_t / t is approximately constant across all timescales. This is computationally equivalent to the Laplace transform of elapsed time.

Key parameters. n_cells = 32; W_trigger initialized to zeros (uniform triggering initially); W_project initialized to zeros (no temporal context at init); gate_raw = -2.0. Total: approximately 13K parameters.

Disease mapping. Temporal lobe epilepsy (time cell disruption): loss of temporal context produces confabulation and temporal order memory deficits, patients cannot distinguish whether an event occurred 4 tokens ago or 128 tokens ago.

6.3 ThetaPhasePrecession (Theorem 33)

Biological basis. Hippocampal place cells exhibit phase precession: as an animal traverses a place field, each cell fires at progressively earlier phases of the theta oscillation (O’Keefe and Recce, 1993; Skaggs et al., 1996). This creates a graded temporal code WITHIN each theta cycle, the phase at which a cell fires encodes how far through the field the animal has traveled. In language, theta phase precession creates a graded temporal structure within processing cycles, allowing the model to represent WHERE each token sits within a local context window.

Architecture. The module implements periodic multiplicative modulation with a LEARNABLE period P. The period is initialized near 8 tokens (matching the approximately 8 Hz theta rhythm) but can adjust via gradient descent.

Mathematical operations.

Period: P = softplus(period_raw), ensuring P > 0 (bare softplus, no clamp, per biophysical reparameterization) Phase: phi(t) = 2 pi t / P Phase embedding: e(t) = [sin(phi(t)), cos(phi(t))] Content-phase interaction (rank-reduced): m(x_t, t) = tanh(W_out(W_content(x_t) element-multiply W_phase(e(t)))) Multiplicative modulation: X_out = X element-multiply (1 + sigmoid(g_raw) x m(x_t, t))

The rank-reduced interaction (d -> r=32 -> d, rank 32) ensures the phase modulation is low-dimensional, preventing overfitting while allowing content-dependent phase effects.

Differentiability of period. The period P is fully differentiable: partial phi / partial P = -2 pi t / P squared. The gradient partial L / partial period_raw flows through sin/cos continuously, allowing the model to LEARN the optimal theta period from data.

Key parameters. rank r = 32; W_content (d -> r), W_phase (2 -> r), W_out (r -> d, zeros init); period_raw = 5.3 (softplus(5.3) approximately 5.3 tokens, learns toward approximately 8); gate_raw = -2.0. Total: approximately 25K parameters.

Disease mapping. Temporal lobe epilepsy (phase precession loss): flat temporal gradient, inability to encode position within local context.

6.4 ThetaGammaPAC (Theorem 34)

Biological basis. Phase-amplitude coupling (PAC) is a well-documented phenomenon in which the amplitude of fast gamma oscillations (30-100 Hz) is modulated by the phase of slower theta oscillations (4-8 Hz) (Canolty et al., 2006; Lisman and Jensen, 2013). Items at preferred theta phases (where gamma amplitude is high) are strongly bound and accessible; items at non-preferred phases are suppressed. PAC deficit is a biomarker for schizophrenia and is DISTINCT from NMDA hypofunction, PAC affects the ORDERING of items within WM, while NMDA affects their PERSISTENCE.

Mathematical operations.

Gamma amplitude (binding strength): gamma_amp(x) = sigmoid(W_gamma x), bounded in (0, 1) Theta phase (cycle position): theta_phase(x) = sigmoid(W_theta x), bounded in (0, 1) PAC coupling: PAC(x) = gamma_amp(x) x cos(2 pi x theta_phase(x)), bounded in [-1, 1] Feature concatenation: f = [PAC(x), gamma_amp(x)] Modulation projection: m(x) = tanh(W_pac(f)), shape (B, T, d) Output: X_out = X + sigmoid(g_raw) x m(X)

Phase-dependent binding dynamics. At theta_phase approximately 0: cos(0) = +1, PAC approximately +gamma (strong binding, “in focus”). At theta_phase approximately 0.5: cos(pi) = -1, PAC approximately -gamma (suppression, “out of focus”). At intermediate phases: graded binding strength. This implements nested oscillations: gamma bursts (binding events) occur selectively at theta phases where coherence is high.

Key parameters. W_gamma (d -> 1), W_theta (d -> 1), W_pac (2 -> d, zeros init); gate_raw = -2.0. Total: approximately 1.5K parameters (minimal, the coupling structure is the key contribution).

Disease mapping. Schizophrenia (PAC deficit): disrupted coupling between gamma amplitude and theta phase produces disorganized working memory. This is distinct from NMDA hypofunction (Theorem 31) which affects persistence, not organization.

6.5 ActivitySilentTrace (Theorem 35)

Biological basis. Between active WM maintenance (NMDA attractors, Theorem 31) and complete forgetting, there exists a “region of direct access” maintained through short-term synaptic facilitation (Mongillo et al., 2008; Stokes, 2015). Items in this trace are not actively represented (no ongoing neural firing) but can be rapidly reactivated through facilitated synapses. The facilitation decays on the order of seconds (approximately 14 tokens in NCT’s timescale), much faster than NMDA persistence (277 tokens) but sufficient for recent context.

Architecture. A compressed trace store with dimension d_trace = 64 (versus d_attn = 128 for NMDA), reflecting the lower fidelity of passive versus active storage.

State equations.

Store: store_val = W_store(LayerNorm(X)), shape (B, T, d_trace) Write gate: g_w = sigmoid(W_gate(LayerNorm(X)) + b_gate) Decay: a = sigmoid(decay_bias), approximately 0.953 (half-life approximately 14-21 tokens) Trace update: S_t = a x S_{t-1} + g_w(t) x store_val(t) (sequential scan) Retrieval: retrieval = W_retrieve(S), shape (B, T, d) Output: X_out = X + sigmoid(gate_raw) x retrieval

Dual-store complementarity with NMDA. The two stores serve different roles: NMDA attractor slots (Theorem 31) have half-life 277 tokens, d_attn=128 (high fidelity), slow decay, suitable for entities that must persist throughout a passage (“active focus”). Activity-silent traces have half-life 14 tokens, d_trace=64 (compressed), fast decay, suitable for recent context that may become relevant again (“region of direct access”). At lag 14 tokens: NMDA retains 97%, trace retains 50%. At lag 128 tokens: NMDA retains 73%, trace retains 0.2%.

Key parameters. d_trace = 64; decay_bias = 3.0 (sigmoid(3.0) approximately 0.953); W_gate bias = -1.0; W_retrieve initialized to zeros; gate_raw = -2.0. Total: approximately 50K parameters.

Disease mapping. Age-related working memory decline: degraded synaptic facilitation reduces the effective half-life of silent traces, causing faster decay of recent context. This is distinct from NMDA-based WM deficits (schizophrenia).

6.6 PhonologicalLoop (Theorem 36)

Biological basis. The phonological loop (Baddeley, 1986, 2003) is a fixed-capacity rehearsal buffer that maintains verbal information through cyclic subvocal repetition. Its capacity of 7 plus/minus 2 items (Miller, 1956; Cowan, 2001) is a fundamental constraint of human cognition. The loop has two components: a phonological store (passive, items decay in approximately 2 seconds) and an articulatory rehearsal process (active, refreshes items by cycling through them).

Architecture. K = 8 slots of dimension d_slot = 64, with a round-robin write pointer and softmax attention-based read.

State equations.

Write pointer: ptr_t = t mod K (cycles through 0, 1, …, K-1, 0, 1, …) Write values: write_val = W_write(LayerNorm(X)), shape (B, T, d_slot) Write gate: g_w = sigmoid(W_gate(LayerNorm(X)) + b_gate) Slot update: S[ptr_t] = (1 - g_w) x S[ptr_t] + g_w x write_val (blend old and new) Query: q = W_query(LayerNorm(X)), shape (B, T, d_slot) Read scores: scores_k = q^T S_k / sqrt(d_slot), for k = 0..K-1 Read weights: alpha = softmax(scores), shape (B, T, K) Read output: r = sum_k alpha_k S_k, shape (B, T, d_slot) Retrieval: retrieval = W_read(r), shape (B, T, d) Output: X_out = X + sigmoid(gate_raw) x retrieval

Cyclic overwrite dynamics. Every K steps, all slots are visited exactly once. With g_w = 1: full overwrite, the newest item replaces the oldest in each slot. With g_w < 1: partial blend, items with high write gate resist overwrite for multiple cycles. Items older than approximately K x (1/g_w) steps are evicted. This fixed-capacity constraint matches human verbal WM: you can rehearse approximately 7 items, and adding an 8th causes the oldest to be forgotten.

Content-addressable read. The softmax attention over K slots implements content-based retrieval: the query q_t probes ALL slots simultaneously, and the slot most similar to the query receives the highest attention weight. This is content-addressability, retrieval by semantic or phonological similarity, not by positional index.

Key parameters. K = 8; d_slot = 64; W_write (d -> d_slot), W_query (d -> d_slot), W_read (d_slot -> d, zeros init), W_gate (d -> 1, bias = -1.0); gate_raw = -2.0. Total: approximately 50K parameters.

Disease mapping. Phonological dyslexia: impaired subvocal rehearsal produces rapid WM decay and poor nonword repetition, verbal WM span below 4. Conduction aphasia: selective phonological loop damage produces intact short-term perception but immediate loss when rehearsal is interrupted.

Section 7: Neuromodulatory Systems (Theorems 2, 5, 8, 14, 22, 37, 47)

The brain modulates learning and processing through at least four neuromodulatory systems: dopamine (DA, reward prediction error), acetylcholine (ACh, attentional salience), norepinephrine (NE, global arousal, Section 1A.6), and serotonin (5-HT, temporal horizon). NCT implements all four, plus a tripartite gate that combines the first three into a single learned importance signal. No prior neural network combines more than one neuromodulatory signal.

7.1 DopamineRPE: Prediction Error Signal (Theorem 2)

Biological basis. Midbrain dopamine neurons fire in proportion to reward prediction error: the difference between received and expected reward (Schultz et al., 1997; Schultz, 2006). In language, the “reward” is correct next-token prediction; the prediction error is the cross-entropy loss relative to its running mean. DA modulates learning rate: surprising tokens (high DA) are learned from more aggressively; familiar tokens (low DA) are learned from less.

Mathematical operations.

DA signal: DA(t) = loss_t / EMA(loss), where EMA uses alpha = 0.95 (effective window approximately 20 steps) Per-token gradient weight: w_DA(t) = clamp(DA(t), 0.5, 2.0) (bounded to prevent gradient explosion)

Kalman gain interpretation (Theorem 2). Under the assumption that the token prediction error is approximately Gaussian around its running mean, the surprise ratio DA_t = loss_t / E[loss_t] plays the role of the Kalman gain K_t = P_t|t-1 / (P_t|t-1 + R), where P is the prior error covariance and R is the measurement noise variance. When observation surprise is high (DA > 1): the Kalman filter trusts the observation more than the prior (large gain). When observation is expected (DA approximately 1): the filter weights prior and observation equally. This provides an optimal learning rate schedule WITHOUT manual tuning.

Disease mapping. Parkinson’s disease (DA depletion): reduced prediction error signal means the system cannot distinguish surprising from expected inputs, treating all tokens equally, producing flat, unmodulated learning.

7.2 D1D2InvertedU: Dopamine-Dependent Working Memory (Theorem 37)

Biological basis. Prefrontal cortex working memory performance follows an inverted-U function of dopamine level (Goldman-Rakic, 1995; Williams and Goldman-Rakic, 1995; Arnsten, 2011). Moderate DA optimizes WM by balancing D1 receptor-mediated stability (maintaining current WM contents) with D2 receptor-mediated flexibility (updating WM with new information). Too little DA (Parkinson’s) causes excessive flexibility (items are not maintained). Too much DA (schizophrenia) causes excessive stability (items cannot be updated).

Mathematical operations.

DA signal: DA = sigmoid(running_surprise), bounded in (0, 1) Inverted-U: f(DA) = 4 x DA x (1 - DA), peak at DA = 0.5 (maximum = 1.0) D1 signal (stability): d_1 = DA D2 signal (flexibility): d_2 = 1 - DA Content-dependent interaction: m(x, DA) = W_proj(x) element-multiply W_da([inverted_U, d_1, d_2]) Output: X_out = X + sigmoid(g_raw) x tanh(m(x, DA))

At moderate surprise (DA approximately 0.5): f(DA) = 1.0, both D1 and D2 are active, WM performance is optimal. At low surprise (DA approximately 0): f(DA) approximately 0, D2 dominates (excessive flexibility). At high surprise (DA approximately 1): f(DA) approximately 0, D1 dominates (excessive stability).

Key parameters. W_proj (d -> d/4), W_da (3 -> d/4), W_out (d/4 -> d, zeros init); gate_raw = -2.0. Total: approximately 50K parameters per layer.

Disease mapping. Parkinson’s disease (low DA): D2 dominance, WM items not maintained, rapid forgetting. Schizophrenia (high DA in prefrontal cortex): D1 dominance, WM items perseverate, cannot update. ADHD (dysregulated DA): oscillation between extremes of the inverted-U curve.

7.3 TripartiteAChGate: Three-Signal Learning Gate (Theorem 14)

Biological basis. The brain modulates synaptic plasticity through at least three orthogonal neuromodulatory signals: dopamine (prediction error, VTA/SNc), acetylcholine (attentional salience, nucleus basalis of Meynert), and precision (uncertainty, encoded in the firing rate variance of predictive coding circuits). Each signal captures a different dimension of “this token matters for learning”: DA says “this was surprising,” ACh says “this was attended to,” and sigma_squared says “I am uncertain about this.” No prior neural network combines more than one such signal.

Architecture. The three signals are combined through a learned two-layer MLP that produces per-token importance weights.

Signal derivation.

Signal 1 (Dopamine): DA = exp(-cross_entropy_t), bounded in (0, 1). Higher for correctly predicted tokens. Signal 2 (Acetylcholine): ACh from CFC-UCAM attention column-sums (_attn_received buffer). Tokens that received high attention across all heads have high ACh signal. Signal 3 (Precision): sigma_squared from PWPC module at the current layer.

Gate equation.

combined = W_combine([X_proj, DA, ACh, sigma_squared]), shape (B, T, d_hidden) gate = GELU(combined) importance = 0.5 + 1.5 x sigmoid(W_out(gate)), bounded in [0.5, 2.0]

The importance weights modulate per-token cross-entropy gradients during backpropagation, implementing biologically motivated curriculum learning.

Key parameters. W_combine (d + 3 -> d/4), W_out (d/4 -> 1, zeros init); gate_raw = -2.0. Total: approximately 25K parameters. Zero computational overhead, reuses existing attention matrix for ACh signal.

Identity at initialization. W_out = 0 gives importance = 0.5 + 1.5 x sigmoid(0) = 0.5 + 0.75 = 1.25 for all tokens (near-uniform weighting).

7.4 SurpriseWeightingGate: Importance Sampling (Theorem 22)

Biological basis. Not all prediction errors are equally informative for learning. The brain selectively upweights learning from errors that are CONSISTENT (low variance across recent occurrences) and ALIGNED with the global learning direction (high gradient alignment). This prevents learning from noisy outlier errors while aggressively learning from systematic errors.

Mathematical operations.

Input features: probed representation from the residual stream Two-layer MLP: w(x) = 0.5 + 1.5 x sigmoid(W_2(GELU(W_1(LayerNorm(X))))), bounded in [0.5, 2.0] Gradient modulation: per-token loss is multiplied by w(x) before backpropagation

The gate learns to produce weights that converge to the optimal importance sampling distribution: upweighting tokens with low gradient variance AND high gradient alignment with the NTP loss gradient.

Key parameters. W_1 (d -> d/4), W_2 (d/4 -> 1); gate_raw = -2.0. Total: approximately 34K parameters.

Bounded output. The [0.5, 2.0] range ensures no token receives less than half or more than double the base gradient weight, preventing training destabilization while still providing meaningful curriculum selection.

7.5 TonicDATemperature: Exploration/Exploitation Balance (Theorem 47)

Biological basis. Beyond phasic DA (moment-to-moment prediction errors, Theorem 2), the brain maintains a TONIC dopamine level, a slow-moving average of recent prediction error that reflects the overall “surprisingness” of the environment (Grace, 1991; Niv et al., 2007). High tonic DA (everything is surprising) triggers exploration mode: broader processing, more flexible responses. Low tonic DA (everything is familiar) triggers exploitation mode: focused processing, routine responses.

Mathematical operations.

Tonic DA computation: DA_bar = EMA(surprise, alpha = 0.999), effective window approximately 1000 steps Processing gain: temp = 1 + sigmoid(g_raw) x tanh(W_temp x (DA_bar - 0.5))

When DA_bar > 0.5 (sustained high surprise): tanh is positive, gain increases (exploitation, double down on learning). When DA_bar < 0.5 (sustained low surprise): tanh is negative, gain decreases (exploration, relax processing to discover new patterns).

Key parameters. W_temp (d -> d); EMA alpha = 0.999; gate_raw = -2.0. Total: approximately 147K parameters.

Disease mapping. Depression (chronically low tonic DA): reduced processing gain, anhedonia (inability to find familiar patterns rewarding). Mania (chronically high tonic DA): excessive processing gain, pressured associations, flight of ideas.

7.6 DA-Modulated Dynamic LR: Per-Step Learning Rate Scaling (Theorem 8)

Biological basis. Different brain regions respond differently to dopamine: hippocampus (fast learning, episodic) increases its learning rate when DA is high, while neocortex (slow learning, semantic) decreases its rate to prevent catastrophic interference (McClelland et al., 1995).

Mathematical operations.

HPC learning rate: lr_HPC = lr_base x (1 + 0.30 x (DA_t - 1)), clamped to [0.5, 2.0] x lr_base Neocortex learning rate: lr_neo = lr_base x (1 + 0.05 x (1 - DA_t)), clamped to [0.9, 1.1] x lr_base

When DA is high (surprising input): HPC lr increases up to 1.3x (aggressive encoding), neocortex lr decreases to 0.95x (protective). When DA is low (familiar input): HPC lr decreases (less encoding needed), neocortex lr increases slightly (consolidation).

MSE-optimal coupling. The theoretically optimal coupling function (minimizing expected squared error) is f*(DA) = DA / (DA + c), where c depends on the prior signal-to-noise ratio. The linear approximation used in NCT is within 3% of optimal for DA in [0.5, 2.0].

Section 8: Inhibitory Circuits and Cell Types (Theorems 38-42, 46)

The mammalian cortex contains three principal types of inhibitory interneurons, PV-positive (parvalbumin), SST-positive (somatostatin), and VIP-positive (vasoactive intestinal peptide), that form an inhibitory triad with specific connectivity and non-commutative processing order (Tremblay et al., 2016; Kepecs and Fishell, 2014). PV cells (including chandelier cells) target the axon initial segment, providing OUTPUT veto. SST cells (including Martinotti cells) target apical dendrites, providing INPUT (top-down) suppression. VIP cells target SST cells, providing DISINHIBITION (releasing SST suppression). The order SST-then-VIP-then-Apical is non-commutative: reversing any two produces mathematically different results. No prior neural network implements this triad.

8.1 SSTMartinotti: Dendritic Input Suppression (Theorem 46)

Biological basis. Somatostatin-positive Martinotti cells in cortical layers 2/3 and 5 project axons to layer 1, where they inhibit the apical dendrites of pyramidal neurons (Silberberg and Markram, 2007; Murayama et al., 2009). This suppresses TOP-DOWN correction signals arriving at the apical tuft, effectively gating how much feedback from higher areas influences local processing. SST interneurons provide TONIC suppression, they fire continuously, unlike PV cells which fire phasically. SST deficit produces Generalized Anxiety Disorder (GAD): without tonic suppression, every top-down signal passes through unfiltered, creating hyper-responsiveness to contextual cues.

Mathematical operations.

SST activity computation: sst(X) = sigmoid(W_out(GELU(W_in(LayerNorm(X_bu))))) Correction suppression: correction_out = correction x (1 - sigmoid(g_raw) x sst(X_bu))

When sst(X_bu) is high (strong bottom-up signal): correction is SUPPRESSED (top-down does not override strong evidence). When sst(X_bu) is low (weak bottom-up signal): correction passes through (top-down helps resolve ambiguity).

Critical semantic note. High SST activity equals MORE suppression, not less. This matches the biology: SST cells are INHIBITORY. The factor (1 - g x sst) is at most 1.0 (full pass-through when g x sst = 0) and at least (1 - g_max) (maximum suppression when sst = 1).

Key parameters. W_in (d -> d/4), W_out (d/4 -> d); gate_raw = -2.0 (sigmoid(-2.0) approximately 0.12, nearly no suppression at init). Total: approximately 74K parameters per layer.

Processing order. Applied FIRST in the inhibitory triad (_top_down_correction_hook). SST must precede VIP because VIP disinhibits SST: if VIP acted first, SST suppression would be partially released BEFORE it has been applied, producing no effect.

Disease mapping. GAD (SST deficit): without tonic dendritic suppression, all top-down corrections pass unfiltered, creating anxiety-like hypervigilance. PTSD (SST loss in specific circuits): traumatic context triggers overwhelming top-down reactivation.

8.2 VIPDisinhibitoryGate: Releasing SST Suppression (Theorem 38)

Biological basis. VIP-positive interneurons in cortical layers 2/3 preferentially inhibit SST cells, implementing disinhibition (Lee et al., 2013; Pi et al., 2013; Pfeffer et al., 2013). When VIP cells are active, they SUPPRESS SST cells, which RELEASES the SST suppression on pyramidal apical dendrites, allowing top-down corrections to pass through. This creates a two-stage gate: SST suppresses by default, VIP selectively releases specific corrections. VIP cells are activated by neuromodulatory inputs (ACh, NE), meaning that behaviorally relevant contexts (attention, arousal) can selectively permit top-down feedback.

Mathematical operations.

VIP signal: vip(X) = sigmoid(W_vip_out(GELU(W_vip_in(LayerNorm(X_bu))))) Disinhibition: correction_out = correction x (1 + sigmoid(g_raw) x vip(X_bu))

The factor (1 + g x vip) is ALWAYS greater than or equal to 1.0, VIP is strictly AMPLIFICATORY on the correction signal. This is because VIP does not directly affect the correction; it releases the SUPPRESSION that SST applied. The net effect of SST-then-VIP is: correction x (1 - g_sst x sst) x (1 + g_vip x vip), which equals the original correction when SST and VIP are balanced.

Key parameters. W_vip_in (d -> d/4), W_vip_out (d/4 -> 1); gate_raw = -2.0. Total: approximately 25K parameters per layer.

Processing order. Applied SECOND. VIP acts on the RESULT of SST suppression. If VIP were applied before SST, it would amplify a signal that has not yet been suppressed, producing runaway amplification rather than controlled disinhibition.

Disease mapping. Autism spectrum disorder (VIP dysfunction): impaired disinhibition means SST suppression is never released, causing reduced top-down modulation. This produces the clinical phenotype of local processing bias (strong bottom-up, weak top-down context integration).

8.3 ApicalAmplification: Coincidence Detection (Theorem 40)

Biological basis. Pyramidal neurons in layer 5 exhibit BAC firing (Backpropagation-Activated Calcium) when TWO conditions are simultaneously met: (1) the basal dendrites receive strong bottom-up input, AND (2) the apical tuft receives strong top-down input (Larkum, 2013; Larkum et al., 1999; Phillips et al., 2016). Either signal alone is insufficient, BAC firing requires COINCIDENCE. This creates a multiplicative AND gate that amplifies corrections only when both bottom-up evidence and top-down context agree. BAC firing is thought to be the neural correlate of consciousness: under anesthesia, BAC firing is abolished, and the brain processes information without awareness.

Mathematical operations.

Basal signal (bottom-up evidence): basal = sigmoid(W_basal(LayerNorm(X_bu))) Apical signal (top-down correction): apical = sigmoid(W_apical(correction)) Coincidence (multiplicative AND): coincidence = basal x apical Gain computation: gain = sigmoid(W_gain(coincidence)) Amplification: correction_out = correction x (1 + sigmoid(g_raw) x gain)

The coincidence requires BOTH basal and apical to be high. If basal = 0 (no bottom-up evidence): coincidence = 0, gain = sigmoid(W_gain(0)) approximately 0.5, amplification is minimal. If apical = 0 (no top-down correction): coincidence = 0, same result. Only when BOTH are high does the gain approach its maximum.

Bounded amplification. The amplification factor is 1 + sigmoid(g_raw) x sigmoid(W_gain(coincidence)), bounded in [1.0, 2.0) for all inputs. No runaway amplification is possible.

Key parameters. W_basal (d -> d/4), W_apical (d -> d/4), W_gain (d/4 -> d); gate_raw = -2.0. Total: approximately 74K parameters per layer.

Processing order. Applied THIRD (final in the triad). Apical amplification acts on corrections that have been suppressed by SST and selectively released by VIP. This ensures only high-quality, contextually appropriate corrections are amplified.

Disease mapping. General anesthesia and loss of consciousness (LOC): anesthetics specifically block BAC firing (Suzuki and Larkum, 2020). In NCT, disabling ApicalAmplification removes coincidence detection, allowing the system to process information but without the amplification that corresponds to “awareness” of contextual agreement.

Non-commutativity proof. Let S = SST suppression, V = VIP amplification, A = Apical amplification. The full triad produces: correction_final = A(V(S(correction))). Consider two tokens where sst_1 = 0.8, vip_1 = 0.2 and sst_2 = 0.2, vip_2 = 0.8. Under the correct order S-V-A: token 1 is strongly suppressed then weakly released; token 2 is weakly suppressed then strongly released. Under reversed order V-S-A: token 1 is weakly amplified then strongly suppressed (different result); token 2 is strongly amplified then weakly suppressed (different result). The outputs differ, confirming non-commutativity.

8.4 ChandelierVetoGate: Output Quality Control (Theorem 41)

Biological basis. Chandelier cells are PV-positive interneurons that form axo-axonic synapses on the axon initial segment (AIS) of pyramidal neurons (Woodruff et al., 2011; Inan et al., 2013). The AIS is the site where action potentials are initiated, chandelier cells can therefore VETO the entire output of a pyramidal neuron. This provides output quality control: if a block’s computation produces unreliable output (as detected by the chandelier cell’s learned criteria), the output is vetoed and the input is passed through unchanged. Chandelier cell loss causes epilepsy, without output quality control, aberrant computations propagate unchecked.

Mathematical operations.

Quality assessment: p_pass = sigmoid(W_veto_out(GELU(W_veto_in(LayerNorm(X_out)))) + b_l) Gated output: X_final = X_in + p_pass x (X_out - X_in)

When p_pass = 1 (high quality): X_final = X_out (full pass-through). When p_pass = 0 (low quality, veto): X_final = X_in (revert to input, ignore block computation). Intermediate values interpolate between input and output.

Key parameters. W_veto_in (d -> d/4), W_veto_out (d/4 -> 1); b_l = 5.0 (sigmoid(5.0) approximately 0.993, near-complete pass-through at init); per-layer bias allows different layers to develop different quality thresholds. Total: approximately 25K parameters, shared across layers with per-layer bias.

Integration. Applied in _post_block_veto_hook, AFTER the full block computation and BEFORE top-down correction. This placement ensures the veto decision is based on the block’s actual output, not on an intermediate representation.

Disease mapping. Epilepsy (chandelier cell deficit): without output veto, aberrant block computations propagate through the residual stream, causing cascading errors analogous to epileptic seizure propagation.

8.5 Metaplasticity: Stability-Dependent Learning Rate (Theorem 42)

Biological basis. Metaplasticity (Abraham, 2008; Abraham and Bear, 1996) is the brain’s mechanism for adapting the RATE of synaptic modification based on recent plasticity history. If a synapse has been changing rapidly (volatile), its future plasticity is reduced (stabilization). If a synapse has been stable, its future plasticity is increased (readiness for new learning). This prevents both runaway potentiation and excessive stabilization.

Mathematical operations.

Deviation variance tracker: v(t) = 0.999 x v(t-1) + 0.001 x (g_squared - theta_M) squared Stability measure: s(t) = 1 / (1 + v(t) / max(theta_M squared, 1e-12)), bounded in (0, 1] Adaptive BCM update rate: beta(t) = clamp(beta_0 x (0.5 + 1.5 x s(t)), beta_0/2, 2 x beta_0)

When gradients are stable (v is small, s approaches 1): beta approaches 2 beta_0 (faster threshold adaptation, ready for new patterns). When gradients are volatile (v is large, s approaches 0): beta approaches beta_0/2 (slower adaptation, protecting against noise).

Key parameters. beta_0 = 0.00065 (base BCM update rate, per Theorem 7); EMA decay 0.999 for deviation variance tracking. Metaplasticity modulates the rate at which BCM thresholds adapt, NOT the gradients themselves.

Bounds. beta is in [beta_0/2, 2 beta_0] = [0.000325, 0.0013]. The formula 0.5 + 1.5 x s gives range [0.5, 2.0] as s varies from 0 to 1, which when multiplied by beta_0 gives the stated bounds.

Disease mapping. Fragile X syndrome (excessive metaplasticity): FMR1 protein normally constrains metaplastic range; without it, learning rates oscillate, producing intellectual disability. Alzheimer’s disease (insufficient metaplasticity): synapses cannot adapt their learning rate to changing conditions, leading to progressive inability to form new memories.

8.6 ACCConflictMonitor: Response Selection (Theorem 39)

Biological basis. The anterior cingulate cortex (ACC) monitors response conflict, the simultaneous activation of incompatible response tendencies (Botvinick et al., 2001; Yeung et al., 2004). When conflict is high (multiple responses equally activated), ACC signals the need for increased cognitive control, which biases processing toward the most appropriate response. ACC hyperactivity produces OCD (excessive conflict detection, repetitive checking). ACC lesions produce abulia (inability to select responses, decision paralysis).

Mathematical operations.

Response channel computation: K = 8 channels, energies = W_channel(LayerNorm(X)).reshape(B, T, K) Channel probabilities: p_k = softmax(energies), shape (B, T, K) Herfindahl concentration: H = sum(p_k squared), bounded in [1/K, 1] Conflict index: conflict = 1 - H, bounded in [0, 1-1/K] Control signal: control = tanh(W_control([LayerNorm(X), conflict])) Output: X_out = X x (1 + sigmoid(g_raw) x control)

The Herfindahl index H measures response concentration. When one channel dominates (low conflict, H approaching 1): conflict approaches 0, minimal control modulation. When all channels are equal (high conflict, H = 1/K): conflict is maximal, strong control modulation biases processing.

Key parameters. K = 8 response channels; W_channel (d -> K), W_control (d+1 -> d); gate_raw = -2.0. Total: approximately 30K parameters per layer.

Disease mapping. OCD (ACC hyperactivity): excessive conflict detection causes repetitive checking behavior and inability to accept a chosen response. Abulia (ACC lesion): no conflict signal means no cognitive control, producing decision paralysis.

Section 9: Cerebellar and Basal Ganglia Systems (Theorems 24, 25, 30)

9.1 CerebellarTiming (Theorem 24)

Biological basis. The cerebellum generates temporal predictions via parallel fiber/Purkinje cell circuitry. Climbing fiber error signals from the inferior olive drive synaptic plasticity at the parallel fiber-Purkinje cell synapse, implementing a forward model that predicts sensory consequences of motor commands. In language, this mechanism predicts the next token’s representation and corrects the current representation using prediction error, analogous to how the cerebellum predicts sensory feedback for speech timing.

Mathematical formulation. The cerebellar module implements a Kalman-optimal temporal prediction and error correction:

Predictor: X_hat(t+1) = W_timing * X(t). Error: e(t) = X(t+1) - X_hat(t+1), where X_hat is detached from the computational graph to prevent gradient flow through the target. Precision-weighted loss: L_cereb = E[pi_top(t) * ||e(t)||^2] where pi_top = 1/sigma^2_top is the precision from the final layer’s PWPC module. Corrected representation: X_out = X + sigmoid(gate_raw) * (W_out(X_cb) + W_error(padded_error)).

The precision weighting implements a Kalman gain: high sigma^2 (uncertain predictions) produces low error weight, preventing the model from learning from unreliable predictions. Low sigma^2 (confident predictions) produces high error weight, driving stronger correction. The effective Kalman gain is K_cereb = sigmoid(gate_raw) * W_error, which is learned end-to-end.

Key parameters. d_cerebellar = d (384), full projection preserving temporal structure; gate_raw = -5.0, giving sigmoid(-5) approximately 0.007 (near-transparent at initialization); W_out and W_error initialized to zeros; lambda_cereb = 0.02 (annealed with critical period). Total: approximately 443K parameters. Applied in _post_reentrant_hook after re-entrant processing completes.

Disease mapping. Spinocerebellar ataxia (cerebellar degeneration): loss of temporal prediction causes dysarthria (imprecise syllable timing), dysprosody (monotone speech), and scanning speech (irregular pauses). In NCT, ablating CerebellarTiming removes the forward model, eliminating temporal error correction and degrading sequential coherence.

9.2 BasalGangliaSelector (Theorem 30, Striatal Confidence Gate)

Biological basis. The cortico-basal ganglia loop implements action selection through competition between the direct pathway (D1 receptors, GO signal) and indirect pathway (D2 receptors, NO-GO signal). For overlearned motor sequences (e.g., habitual phrases), the direct pathway bypasses cortical deliberation entirely. Novel or uncertain situations engage the indirect pathway, requiring full cortical processing. This automaticity gate is the computational basis of procedural learning.

Mathematical formulation. A bypass gate allows familiar patterns to skip block processing:

Confidence probe: c_l(X) = W_probe * X.detach(). The stop-gradient on X prevents the representation from evolving to fool the probe, the probe must learn to detect genuine familiarity in the representation, not a representation that has learned to signal familiarity. Bypass gate: g_l = sigmoid(b_l - c_l(X)), where b_l is a per-layer learned bias. Output: X_out = g_l * f_l(X) + (1 - g_l) * X.

Gradient analysis shows self-organization: when block processing helps (reduces loss), the gradient on b_l is negative, increasing g_l (more processing). When block processing adds noise (increases loss), the gradient is positive, decreasing g_l (more bypass). This implements automatic routing: common phrases develop g_l approaching 0 (bypass), novel constructions maintain g_l near 1 (full processing).

Key parameters. b_l initialized to 3.0, giving g_l approximately sigmoid(3.0) approximately 0.95 at initialization (nearly full processing, identity-safe). W_probe has d parameters per layer; bias has 1 parameter per layer. Total overhead: approximately 385*L parameters (negligible). Shared weights with per-layer bias reduce parameter count by approximately L-fold.

Disease mapping. Parkinson’s disease (DA depletion in striatum): cannot automatize overlearned sequences, requiring full cortical processing for every action, producing characteristic slowness and cognitive fatigue. Huntington’s disease (striatal degeneration): loss of action selection causes perseverative behavior and inability to switch between processing modes.

9.3 VCCEWithBistable (Theorem 25)

Biological basis. Competitive binding in the visual cortex resolves ambiguous percepts through mutual inhibition between neural populations representing competing interpretations (binocular rivalry, Necker cube). When inhibition is sufficient, the system has multiple stable states, each corresponding to a winner-take-all binding of one entity to one slot, with transitions between states requiring external perturbation.

Mathematical formulation. Bistable entity binding extends VCCE with learned mutual inhibition:

Inhibition matrix: I = softplus(W_inhib(X_pool)) reshaped as (B, K, K), where X_pool is the mean-pooled sequence representation. Inhibited logits: s’ = s - gamma * (s * I), where gamma = sigmoid(gate_inhib). Binding energy: E(a) = -sum_k a_k * s_k + (gamma/2) * sum_{j != k} a_j * I_{jk} * a_k.

Stability condition: when min_{j != k} I_{jk} > max_k |s_k - s_j| / gamma, the system has exactly K stable fixed points, each corresponding to one dominant slot. The energy landscape depth between adjacent minima is Delta_E = gamma * I_{kk’} * (a_k - a_{k’}), meaning stronger inhibition creates deeper energy wells and more stable bindings. The effective binding sharpness is beta_eff = 1/tau + gamma * min_{j != k} I_{jk}, combining Gumbel temperature with bistable commitment.

Regularization: L_bistable = lambda_reg * sum_blocks (||I||_F - target)^2, keeping inhibition near target sqrt(K) approximately 2.0.

Key parameters. K = 4 slots per block; gate_inhib = -5.0 (sigmoid approximately 0.007, near-zero inhibition at initialization); W_inhib = zeros; lambda_bistable_reg = 0.001; target ||I||_F = sqrt(K). Approximately 6K parameters per block. At initialization, the module reduces to pure Gumbel-Softmax (no inhibition), satisfying the identity-at-initialization requirement.

Disease mapping. Visual neglect (parietal lesion): biased inhibition causes one side of the competition to always win, producing systematic binding failures. Balint’s syndrome: simultanagnosia, inability to perceive more than one object, consistent with excessive mutual inhibition preventing multiple stable bindings.

Section 10: Additional Mechanisms (Theorems 43, 45, 48, 49)

10.1 LCEventBoundary (Theorem 43)

Biological basis. The locus coeruleus (LC) fires phasic norepinephrine (NE) bursts at event boundaries, moments when the statistical structure of sensory input changes abruptly (topic shifts, narrative breaks, scene transitions). This NE pulse promotes temporal pattern separation in hippocampus, segmenting continuous experience into discrete episodes. Without this mechanism, memories from different contexts bleed together.

Mathematical formulation. Event boundary detection via adjacent representation change:

Change signal: change_t = 1 - cos(X_t, X_{t-1}), where cosine similarity ranges from -1 to 1, so change ranges from 0 (identical) to 2 (opposite). Feature extraction: f_t = GELU(W_detect * LayerNorm(X_t)). Boundary probability: b_t = sigmoid(W_boundary * f_t + 3 * change_t). The bias of 3.0 on change_t ensures sensitivity from initialization: at a true boundary (cos <= 0, change >= 1), b_t >= sigmoid(3) approximately 0.953; at continuation (cos approximately 1, change approximately 0), b_t approximately sigmoid(0) = 0.5. NE pulse: pulse_t = W_pulse * (f_t elementwise-multiply b_t). Output: X_t’ = X_t + sigmoid(g_raw) * pulse_t.

The NE pulse magnitude is proportional to boundary strength through the element-wise product f_t * b_t, ensuring proportional response to boundary salience.

Key parameters. gate_raw = -5.0 (transparent at initialization); W_pulse = zeros; change_bias = 3.0; applied in _post_ne_gain_hook before NMDA attractors to promote memory segmentation at event boundaries. Total: approximately 10K parameters per layer.

Disease mapping. Confabulation (frontal lobe damage): without boundary detection, the model merges events from different contexts, producing false memories that blend elements across episodes. Dissociative identity disorder: extreme boundary fragmentation creates isolated memory compartments. Source monitoring failure: inability to distinguish which context a memory belongs to.

10.2 RepetitionSuppression (Theorem 45)

Biological basis. Neurons throughout cortex show decreasing response to repeated stimuli and enhanced response to novel ones, a phenomenon called repetition suppression or neural adaptation. This implements an anti-Hebbian learning rule where familiar inputs are actively suppressed, allowing computational resources to focus on new information. In predictive coding, repetition suppression is the neural implementation of prediction error: repeated stimuli are predicted (low error), novel stimuli are unpredicted (high error).

Mathematical formulation. Anti-Hebbian novelty amplification via adjacent token difference:

Novelty signal: delta_t = X_t - X_{t-1} (element-wise difference between adjacent representations). Novelty processing: novelty_t = GELU(W_in * delta_t), where GELU nonlinearity selects novel dimensions (large |delta|) while suppressing noise (small |delta|). Correction: correction_t = W_out * novelty_t. Output: X_t’ = X_t + sigmoid(g_raw) * correction_t.

The anti-Hebbian property: for repeated tokens (X_t approximately X_{t-1}), ||delta_t|| approximately 0, GELU near zero, correction approximately 0, no reinforcement of familiar patterns. For novel tokens (large ||delta_t||), GELU activates, producing a representation correction that amplifies the novel content.

Key parameters. gate_raw = -5.0 (transparent at initialization); W_out = zeros (double identity protection); applied in _post_ne_gain_hook after LCEventBoundary. Total: approximately 10K parameters per layer.

Disease mapping. Deja vu (temporal lobe epilepsy): broken repetition suppression causes novel experiences to feel familiar. Capgras delusion: recognition without the expected novelty/familiarity signal produces the conviction that familiar people have been replaced by identical imposters.

10.3 StochasticResonance (Theorem 48)

Biological basis. The brain operates near criticality, where intrinsic neural noise pushes subthreshold signals above the activation threshold, improving detection of weak stimuli. This phenomenon, stochastic resonance, means that an optimal level of noise actually improves information processing. Neural noise is not a bug but a computational resource that the brain actively regulates.

Mathematical formulation. Learnable noise active at both training AND inference:

X_out = X + g * epsilon, where epsilon approximately N(0, sigma^2), sigma = exp(log_sigma) is per-dimension learnable amplitude, g = sigmoid(g_raw) is a global gate, and noise is sampled independently per (batch, position, block).

Gradient learning of sigma: partial_L/partial_log_sigma = g * sigma * epsilon^T * partial_L/partial_X_out. Dimensions where noise aligns with the loss gradient (noise helps) receive negative gradient, increasing sigma. Dimensions where noise opposes the loss gradient (noise hurts) receive positive gradient, decreasing sigma. The system self-tunes to find the task-optimal noise level per dimension.

Critical distinction from dropout. Dropout is binary (mask), non-differentiable, and disabled at inference. Stochastic resonance is continuous (Gaussian), fully differentiable with respect to both sigma and g, and active at inference. Dropout regularizes; stochastic resonance detects weak signals.

Key parameters. g_raw = -5.0 (g approximately 0.007); log_sigma = -5.0 (sigma approximately 0.0067); initial injected noise std: g * sigma approximately 4.7 x 10^-5 (SNR > 10^4, negligible at initialization). Applied in _pre_block_hook before ThalamicRelay. Total: 2*d parameters (d for sigma, 1 for g).

Disease mapping. Age-related cognitive decline: reduced neural noise diminishes stochastic resonance, impairing detection of subtle contextual cues. The decline is not from noise damage but from noise insufficiency, the aged brain is too quiet to detect weak signals.

10.4 EndocannabinoidGate (Theorem 49)

Biological basis. Endocannabinoids (2-AG, anandamide) are released by depolarized postsynaptic neurons, travel retrograde across the synapse, activate CB1 receptors on the presynaptic terminal, and suppress neurotransmitter release for seconds to minutes. This demand-driven negative feedback prevents runaway excitation: only neurons that are overactive trigger suppression of their own inputs. The mechanism is position-specific (each neuron controls its own inputs) and magnitude-dependent (stronger depolarization produces stronger suppression).

Mathematical formulation. Retrograde suppression of over-active positions:

Excess activation: excess(t) = ReLU(||X_t||_2 - theta_ecb), where theta_ecb = softplus(theta_raw) is a learned threshold (always positive). Suppression signal: suppression(t) = sigmoid(W_s * excess(t)), where W_s provides per-dimension suppression patterns. Output: X_out(t) = X(t) * (1 - g * suppression(t)).

Position-specificity: only tokens with ||X_t|| > theta_ecb are suppressed. Tokens below threshold have excess = 0, suppression approximately sigmoid(0) = 0.5, but this is gated by g approximately 0.12 (at initialization), producing only 6% scaling that quickly adapts via the 10x gate learning rate. Magnitude-dependence: the sigmoid saturates for large excess, providing a dose-response curve analogous to the endocannabinoid concentration-effect relationship.

Computational distinctness. LayerNorm normalizes ALL positions equally (no position-selectivity). GroupedDivisiveNorm operates on feature group statistics. RepetitionSuppression uses adjacent token similarity. EndocannabinoidGate uniquely provides absolute-magnitude-threshold position-specific suppression with per-dimension learned patterns.

Key parameters. theta_raw: softplus ensures always-positive threshold; W_s: d parameters for per-dimension suppression; gate_raw = -2.0 (sigmoid approximately 0.12); total: approximately 385 parameters (minimal overhead). Applied in _post_ne_gain_hook after PhonologicalLoop, before CrossAreaGWT.

Disease mapping. Cannabis intoxication (exogenous CB1 activation): indiscriminate suppression produces disorganized thought, impaired short-term memory, and reduced executive function. Multiple sclerosis (eCB dysregulation): improper input gating causes aberrant signal propagation. In NCT, ablating EndocannabinoidGate removes the magnitude-dependent suppression, allowing over-active tokens to dominate the representation and corrupt downstream binding.

Section 11: Hook-Based Processing Pipeline

The system implements six hooks in a specific neuroanatomically derived order. The ordering is non-negotiable: it reflects the physical flow of information in the brain from sensory input (thalamus) through cortical processing (blocks) to executive output (prefrontal).

Hook 1 (_pre_block_hook), Sensory Gating: StochasticResonance (Thm 48) then ThalamicRelay then TRNAttentionalFilter (Thm 44) then TonicDATemperature (Thm 47) then BasalGangliaSelector (Thm 30). Neuroanatomical basis: sensory signals first pass through the thalamus (relay + TRN filter) before reaching cortex. Tonic DA sets the global arousal level. BG decides whether to engage full cortical processing.

Block forward pass, Cortical Computation: PrecisionWeightedPC then CFC-UCAM then VCCEWithBistable (Thm 25) then ThalamicGLH then DendriticFFN. This is the core cortical processing: prediction (PC), binding (CFC), entity assignment (VCCE), temporal gating (GLH), and sparse computation (FFN).

Hook 2 (_post_block_veto_hook), Output Gating: ChandelierVetoGate (Thm 41). Neuroanatomical basis: PV+ chandelier interneurons gate the axon initial segment, implementing output veto AFTER cortical computation but BEFORE the result propagates.

Hook 3 (_top_down_correction_hook), Top-Down Feedback: SSTMartinotti (Thm 46) THEN VIPDisinhibitoryGate (Thm 38) THEN ApicalAmplification (Thm 40). ORDER IS NON-COMMUTATIVE. Neuroanatomical basis: SST+ interneurons first suppress top-down signals at the apical dendrite. VIP+ interneurons then selectively disinhibit SST+ cells (releasing suppression where attention demands it). Apical amplification then coincidence-detects the bottom-up signal with the surviving top-down signal. Reversing SST and VIP produces incorrect disinhibition.

Hook 4 (_post_reentrant_hook), Temporal Prediction: CerebellarTiming (Thm 24). Neuroanatomical basis: the cerebellum receives efference copies via pontine nuclei AFTER cortical processing is complete, computes temporal predictions, and sends error corrections back via thalamus.

Hook 5 (_post_ne_gain_hook), Memory and Binding: LCEventBoundary (Thm 43) then RepetitionSuppression (Thm 45) then NMDAAttractorSlots (Thm 31) then ThetaPhasePrecession (Thm 33) then ThetaGammaPAC (Thm 34) then ActivitySilentTrace (Thm 35) then PhonologicalLoop (Thm 36) then EndocannabinoidGate (Thm 49) then CrossAreaGWT. Neuroanatomical basis: LC fires at event boundaries, segmenting the input stream. Repetition suppression highlights novel content. Working memory modules (NMDA, theta, PAC, silent, phono) then operate on the segmented, novelty-highlighted stream. eCB suppresses overactive positions. CrossAreaGWT broadcasts the result globally.

Hook 6 (_pre_logits_hook), Executive Control: ACCConflictMonitor (Thm 39) then TimeCellBank (Thm 32) then D1D2InvertedU (Thm 37) then TripartiteAChGate (Thm 14) then SurpriseWeightingGate (Thm 22). Neuroanatomical basis: ACC detects response conflict (executive monitoring). Time cells provide temporal context. DA modulates WM gating. The tripartite gate (DA+ACh+sigma_squared) computes the final learning signal. Surprise weighting stores the per-token importance for replay.

11.1 Forward Pass Pseudocode

Listing
63 lines
function FORWARD(tokens, model):
  X = Embedding(tokens) + RoPE(positions)
  initialize_neuromod(model)  // set DA, ACh, NE baselines

  for layer_idx in 0..L-1:
    // Hook 1: Sensory gating
    X = stochastic_resonance(X, layer_idx)
    X = thalamic_relay(X, layer_idx)
    X = trn_filter(X, layer_idx)
    X = tonic_da_temperature(X, layer_idx)
    X, bypass = basal_ganglia_selector(X, layer_idx)

    if not bypass:
      // Block forward
      X_residual = X
      X = precision_weighted_pc(X)
      X = cfc_ucam(X, sigma_squared)
      X = vcce_bistable(X)
      X = thalamic_glh(X)
      X = dendritic_ffn(X)
      X = X_residual + X

      // Hook 2: Output veto
      X = chandelier_veto_gate(X, layer_idx)

  // Hook 3: Top-down correction (ORDER MATTERS)
  X = sst_martinotti(X)         // suppress top-down
  X = vip_disinhibition(X)      // release suppression
  X = apical_amplification(X)   // coincidence detection

  // Re-entrant processing (2 passes)
  X = reentrant_processing(X)

  // Hook 4: Temporal prediction
  X = cerebellar_timing(X)

  // HPC binding + NE gain
  X = hpc_binding(X)
  X = ne_gain(X)

  // Hook 5: Memory and binding
  X = lc_event_boundary(X)
  X = repetition_suppression(X)
  X = nmda_attractor_slots(X)
  X = theta_phase_precession(X)
  X = theta_gamma_pac(X)
  X = activity_silent_trace(X)
  X = phonological_loop(X)
  X = endocannabinoid_gate(X)
  X = cross_area_gwt(X)

  // Hook 6: Executive control
  X = acc_conflict_monitor(X)
  X = time_cell_bank(X)
  X = d1d2_inverted_u(X)
  X = tripartite_ach_gate(X)
  surprise_weights = surprise_weighting_gate(X)

  // Output
  X = layer_norm(X)
  logits = lm_head(X)
  logits = 30 * tanh(logits / 30)  // soft-cap
  return logits, surprise_weights

Section 12: Identity-at-Initialization with Gradual Activation (Theorem 50)

ALL modules produce identity behavior at step 0: all gate_raw parameters initialized to -2.0 (sigmoid(-2.0) approximately 0.12); all output projection weights initialized to ZERO; gates receive 10x learning rate to accelerate activation discovery. The gradient flow guarantee (Theorem 50) ensures gates reach operational values (g approximately 0.5) by step approximately 3000 with 10x LR at eta_gate = 3e-3.

12.1 Comprehensive Parameter Initialization Table

The following table specifies the initialization of every learnable gate and critical parameter across all 30 modules. All gates follow the convention: gate_raw = -2.0 (or -5.0 for near-transparent modules), W_out = zeros, 10x learning rate group.

Modulegate_rawW_out initLR GroupKey Init Values
StochasticResonance-5.0–gates (10x)log_sigma = -5.0
RepetitionSuppression-5.0zerosgates (10x)–
LCEventBoundary-5.0zerosgates (10x)change_bias = 3.0
PrefrontalContextGate-2.0zerosgates (10x)–
ChandelierVetoGate-2.0zerosgates (10x)shared W, per-layer bias
EndocannabinoidGate-2.0zerosgates (10x)theta_raw via softplus
ACCConflictMonitor-2.0zerosneuromod (0.3x)K=8 response channels
SSTMartinotti-2.0zerosgates (10x)–
VIPDisinhibitoryGate-2.0zerosgates (10x)–
ApicalAmplification-2.0zerosgates (10x)–
StriatalConfidenceGatebias=3.0zerosneuromod (0.3x)g_l approx 0.95 at init
UncertaintyHead–xaviersigma2 (0.05x)sigma2 approx 1.0
CerebellarTiming-5.0zerosneocortex (1x)lambda_cereb = 0.02
NMDAAttractorSlots-2.0zerosHPC (5x)tau = 333 steps
ThetaPhasePrecession-2.0zerosHPC (5x)8 phase slots
ThetaGammaPAC-2.0zerosHPC (5x)8 gamma sub-slots
ActivitySilentTrace-2.0zerosHPC (5x)tau = 14 steps
PhonologicalLoop-2.0zerosHPC (5x)K = 8 cyclic buffer
TimeCellBank-2.0zerosHPC (5x)tau in [1, 256]
D1D2InvertedU-2.0zerosneuromod (0.3x)inverted-U quadratic
TonicDATemperature––neuromod (0.3x)EMA alpha = 0.999
TripartiteAChGate––neuromod (0.3x)gate = 1+0.5DA+0.3s2+0.3ACh
SurpriseWeightingGate––neuromod (0.3x)normalized to mean 1.0
ThalamicRelay-2.0zerosneuromod (0.3x)frequency routing
TRNAttentionalFilter-2.0zerosneuromod (0.3x)top-down attention gate
BasalGangliaSelectorbias=3.0zerosneuromod (0.3x)shared W, per-layer bias
VCCEWithBistable-5.0zerosneocortex (1x)K=4 slots, lambda=0.001
BCMHomeostasis–––tau = 1430, gamma = 0.1
AstrocyteHomeostasis–––tau_fast=33, tau_slow=500
SleepConsolidation–––P=1000, S=10, buffer=20

12.2 Comprehensive Disease-Mapping Table

Each neurological disease maps to the ablation of a specific NCT module, providing testable predictions for the system’s computational claims.

DiseaseBrain DeficitNCT Module AblatedComputational Consequence
Vegetative stateNo global workspaceGlobalWorkspaceNo cross-area integration
Parkinson’s diseaseStriatal DA depletionD1D2InvertedU + StriatalGateCannot automatize; flat WM gating
ADHDNE dysregulationNorepinephrineGainNoise overwhelms signal
DepressionLow tonic DATonicDATemperatureFixed low exploration rate
ManiaHigh tonic DATonicDATemperatureFixed high exploration rate
Broca’s aphasiaSingle-pass processingReEntrantProcessingContext integration fails
Schizophrenia (NMDA)Persistent WM failureNMDAAttractorSlotsItems lost from active WM
Schizophrenia (PAC)Phase-amplitude decouplingThetaGammaPACDisordered binding/ordering
Alzheimer’s (ACh)Inverted attention gainTripartiteAChGateNovel stimuli not prioritized
Amnesia (HM)No fast episodic bindingHippocampalGLHNo new long-term memory
Semantic dementiaNo HPC-to-cortex consolidationSleepConsolidationMemories don’t consolidate
Spinocerebellar ataxiaNo temporal predictionCerebellarTimingSpeech timing errors
Huntington’s diseaseNo action selectionBasalGangliaSelectorPerseverative slot assignment
Visual neglectBiased competitionVCCEWithBistableSystematic binding failures
Thalamic infarctNo frequency routingThalamicRelayModality-specific loss
Absence epilepsyNo attentional filterTRNAttentionalFilterUnfiltered sensory flooding
Temporal lobe epilepsyNo phase precessionThetaPhasePrecessionFlat temporal gradient
Phonological dyslexiaNo rehearsal bufferPhonologicalLoopPoor nonword repetition
Age-related WM declineNo synaptic facilitationActivitySilentTraceItems fade from silent WM
Autism (ASD)No VIP disinhibitionVIPDisinhibitoryGateImpaired top-down modulation
OCDACC hyperactivityACCConflictMonitorExcessive conflict checking
AbuliaACC lesionACCConflictMonitorDecision paralysis
Anesthesia/unconsciousnessNo apical amplificationApicalAmplificationNo BAC firing
Epilepsy (PV deficit)No axo-axonic vetoChandelierVetoGateRunaway excitation
Fragile XExcessive metaplasticityMetaplasticityUnstable threshold adaptation
ConfabulationNo event boundariesLCEventBoundaryCross-context memory merging
Deja vuBroken repetition suppressionRepetitionSuppressionNovel feels familiar
Cannabis intoxicationIndiscriminate suppressionEndocannabinoidGateDisorganized representations
Age-related declineReduced neural noiseStochasticResonancePoor weak signal detection
GADSST deficitSSTMartinottiExcessive top-down influence

Each row represents a testable prediction: disabling the corresponding NCT module should produce the computational analog of the neurological deficit. This disease-mapping methodology provides 30 natural ablation studies validating the necessity of each module.

Section 13: Multi-Scale Homeostatic Regulation (Theorems 7, 12, 13, 19, 26, 41, 42)

The brain maintains stable learning across timescales spanning milliseconds to days through nested homeostatic feedback loops. In NCT, three primary regulatory mechanisms operate at different timescales, with mathematical guarantees of global stability via the small-gain theorem (Theorem 19) and timescale separation (Theorem 26).

13.1 BCM Homeostasis (Theorem 7)

Biological basis. The Bienenstock-Cooper-Munro (BCM) rule describes how cortical synaptic plasticity thresholds slide based on recent postsynaptic activity. High-activity synapses raise the threshold (requiring stronger input for LTP), while low-activity synapses lower it (making LTP easier). This per-synapse homeostasis prevents both runaway potentiation and synaptic depression.

Mathematical formulation. Per-parameter sliding threshold:

theta_M(t) = (1 - beta) x theta_M(t-1) + beta x g_p(t)^2

where g_p(t) is the gradient magnitude for parameter p at step t, and beta = 1/tau_BCM is the threshold update rate. Gradient modulation:

g_BCM = g_p x (1 + gamma x sign(g_p^2 - theta_M))

where gamma = 0.1 is the modulation strength. When g_p^2 > theta_M (gradient above threshold), the modulation factor is 1.1 (amplify). When g_p^2 < theta_M (gradient below threshold), the factor is 0.9 (suppress). At equilibrium, theta_M converges to E[g_p^2], producing a net contraction factor of approximately 0.963 that prevents gradient explosion.

Key parameters. tau_BCM = 1430 steps (biological: hours-scale plasticity); gamma = 0.1; beta adapted by metaplasticity (Theorem 42). Applied AFTER global gradient clipping, BEFORE astrocyte modulation (mandated order).

13.2 Metaplasticity (Theorem 42)

Biological basis. The sliding threshold itself has a sliding rate, metaplasticity. In stable learning regimes, the threshold adapts quickly (confident tracking). In volatile regimes (curriculum changes, learning rate jumps), the threshold adapts slowly (hedging against transients). Biophysically, this corresponds to mGluR5-dependent modification of the BCM threshold rate.

Mathematical formulation. Adaptive BCM threshold rate:

v(t) = 0.999 x v(t-1) + 0.001 x (g^2(t) - theta_M(t))^2 (deviation variance)

s(t) = 1 / (1 + v(t) / max(theta_M^2(t), 1e-12)) (stability measure, in [0, 1])

beta(t) = clamp(beta_0 x (0.5 + 1.5 x s(t)), beta_0/2, 2 x beta_0) (adaptive rate)

When stable (v approximately 0): s approximately 1, beta approximately 2 x beta_0 (fast adaptation, confident). When volatile (v >> theta_M^2): s approximately 0, beta approximately 0.5 x beta_0 (slow adaptation, hedging). The clamp to [beta_0/2, 2 x beta_0] prevents runaway (Fragile X analog: excessive metaplasticity).

Disease mapping. Fragile X syndrome (mGluR5 overactivation): metaplastic thresholds shift too fast, producing unstable learning. Alzheimer’s disease (amyloid-beta): insufficient metaplasticity, thresholds cannot adapt to changing input statistics.

13.3 Astrocyte Layer-Wise Homeostasis (Theorem 12)

Biological basis. Astrocytes monitor synaptic activity via glutamate spillover and release gliotransmitters (D-serine, ATP) to modulate synaptic efficacy. Their calcium dynamics operate on two timescales: fast (seconds, local synaptic events) and slow (minutes, integrated activity level). The slow/fast ratio detects sustained changes in layer activity.

Mathematical formulation. Two-timescale per-layer gradient tracking:

A_fast_l(t) = (1 - 1/tau_fast) x A_fast_l(t-1) + (1/tau_fast) x ||grad_l||_2, tau_fast = 33 steps

A_slow_l(t) = (1 - 1/tau_slow) x A_slow_l(t-1) + (1/tau_slow) x ||grad_l||_2, tau_slow = 500 steps

Gliotransmitter release signal: g_l = sigmoid(gamma_astro x (A_slow_l - A_fast_l)), gamma_astro = 5.0. Per-layer learning rate multiplier: m_l = 0.8 + 0.4 x g_l, giving m_l in [0.8, 1.2].

When A_slow > A_fast (activity decreasing over time): g_l > 0.5, m_l > 1.0, boost the layer. When A_slow < A_fast (activity increasing rapidly): g_l < 0.5, m_l < 1.0, suppress the layer. The plus/minus 20% range prevents instability under worst-case transients.

Key parameters. tau_fast = 33 steps; tau_slow = 500 steps; gamma_astro = 5.0; range [0.8, 1.2]. Applied AFTER BCM modulation (mandated order).

13.4 Synaptic Scaling (Proposition 13)

Biological basis. Turrigiano’s synaptic scaling (Science, 1998): neurons multiplicatively scale all their synaptic weights to maintain a target firing rate. Unlike Hebbian plasticity (which is input-specific), synaptic scaling is global per-neuron, it preserves the relative pattern of synaptic weights (angular structure) while normalizing the overall magnitude.

Mathematical formulation. Per-neuron multiplicative homeostasis every 100 steps: for each row i of the weight matrices W_gate and W_up in DendriticFFN, compute the row norm ||W_i||. Scale each row toward the mean norm: s_i = clamp(mean_norm / (||W_i|| + epsilon), 0.9, 1.1). Update: W_i <- W_i x s_i.

The clamp to [0.9, 1.1] preserves angular structure: the cosine similarity between any two weight rows is exactly preserved under scalar multiplication. This prevents dead neurons (rows with vanishing norm) and saturated neurons (rows with exploding norm) in the sparse (2% active) DendriticFFN without distorting learned selectivity patterns.

Key parameters. Period: every 100 steps; range: [0.9, 1.1]; applied to W_gate, W_up in DendriticFFN.

13.5 Lyapunov Stability (Theorem 19)

Stability guarantee. The composite homeostatic system (BCM + Astrocyte + Synaptic Scaling) is globally asymptotically stable. Proof via the small-gain theorem: the loop gain product of all nested feedback loops must be less than 1. BCM gain = gamma = 0.1; Astrocyte gain = 0.4 x sigmoid range = 0.2; composite loop gain = 0.1 x 0.2 = 0.02, much less than 1. Phase margin exceeds 165 degrees in the Nyquist diagram, providing robust stability margins against parameter perturbation.

13.6 Timescale Separation (Theorem 26)

Convergence condition. For K nested homeostatic loops with timescales tau_1 < tau_2 < … < tau_K, convergence requires tau_{i+1} / tau_i > C_min where C_min approximately 3 (Borkar 2008, two-timescale stochastic approximation). In V10.1, BCM and astrocyte_fast both operated at tau = 50, causing oscillatory interference. The corrected cascade with verified separation ratios:

Mechanismtau (steps)Ratio to previous
DA-LR (instantaneous)1–
Astrocyte fast3333x
Synaptic scaling1003.0x
Astrocyte slow5005.0x
BCM threshold14302.86x

All ratios exceed the C_min = 3 threshold (the BCM/astrocyte_slow ratio of 2.86 is marginal but acceptable given the small BCM gain gamma = 0.1).

13.7 Mandated Gradient Processing Order

The gradient processing pipeline must execute in the following order, which is a non-negotiable requirement for correct operation:

Step 1: Backward pass, scaler.scale(loss).backward(), then scaler.unscale_(optimizer). Step 2: Global gradient clipping, clip_grad_norm_(max=1.0). MUST be first to prevent fp16 overflow before homeostatic scaling. Step 3: BCM modulation, per-parameter gradient scaling based on sliding threshold. MUST be second because it operates on clipped gradients. Step 4: Astrocyte modulation, per-layer gradient scaling based on two-timescale activity. MUST be third because it operates on BCM-modulated gradients. BCM and Astrocyte are fused into a single CUDA operation (single .cpu().tolist() call for all parameter gradient norms) to minimize synchronization overhead. Step 5: Optimizer step, scaler.step(optimizer), scaler.update(), scheduler.step().

Reversing BCM and Astrocyte causes compounded dual-modulation. Placing DA modulation before clipping causes the clip to undo DA effects on large gradients. Omitting timescale separation causes homeostatic loop interference (Theorem 26).

Section 14: Six-Tier Training Protocol

The training protocol implements 18 mechanisms across 6 developmental tiers, ordered from foundational (Tier 1: learning rate structure) to refinement (Tier 6: attention-gated plasticity). Each tier builds on the calibration achieved by previous tiers, following the developmental critical period principle (Theorem 11).

Tier 1 (Theorems 3, 5, 7): Foundational Learning

  1. CLS Dual Learning Rates (Theorem 3). Five parameter groups implementing complementary learning systems (McClelland et al. 1995):

GroupLR MultipleWeight DecayParametersBrain Basis
HPC5.0x0.01Hippocampal bindingFast episodic binding (seconds)
Neuromod0.3x0.0DA, NE, ACh, 5-HT modulesSlow regulatory signals (minutes-hours)
Neocortex1.0x0.1Attention, FFN, LayerNormStable cortical plasticity (hours)
sigma-squared0.05x0.0Uncertainty headTwo-timescale precision tracking (Thm 17)
Gates10.0x0.0gate_raw, log_sigmaFast gating via ion channel dynamics

The 200x ratio between gates (10x) and sigma-squared (0.05x) ensures gate discovery (which modules to activate) precedes precision calibration (how confident the model is). Optimizer: AdamW(beta_1=0.9, beta_2=0.95). Schedule: 100-step linear warmup then cosine decay to 0.

  1. Surprise-Weighted NTP (Theorem 5). Per-token gradient weighting: w(t) = DA(t) x pi_top(t) / E[DA x pi_top], normalized to mean 1.0. DA(t) = |epsilon_t| / EMA(|epsilon|) is the surprise ratio. pi_top(t) = 1/sigma_squared_top is precision at the final layer. The weight is detached from the computation graph to prevent second-order effects. Effect: biases gradient toward hard tokens (entities, rare words) where DA is high, producing WMDP_genuine = 0.139 in V10.1a.

  2. BCM Homeostatic Threshold (Theorem 7). Per-parameter gradient stability with metaplastic rate (see Section 13.1-13.2).

Tier 2 (Theorems 4, 8, 6, Proposition 9): Adaptive Learning

  1. Precision-Timescale Coupling (Theorem 4). Auxiliary loss weights scaled by sqrt(tau_m): modules with longer timescales (slower dynamics) receive proportionally higher loss weights. This ensures equal gradient contribution regardless of timescale.

  2. DA-Modulated Dynamic LR (Theorem 8). The MSE-optimal DA-LR coupling follows Michaelis-Menten kinetics: f*(DA) = DA / (DA + c), where c = noise-to-signal ratio. Linear approximation near DA approximately 1: lr_group(t) = lr_base x (1 + alpha x (DA_t - 1)). For HPC: alpha = 0.3 (high surprise increases hippocampal learning). For neocortex: alpha = -0.05 (high surprise slightly decreases cortical learning, letting HPC handle novelty).

  3. Sleep Consolidation (Theorem 6, Proposition 9). Every P = 1000 wake steps, perform S = 10 sleep replay steps on a buffer of the top-20 highest-DA batches. Sleep LR multipliers: HPC 0.3x (suppress re-encoding), neocortex 1.3x (accelerate consolidation). Knowledge gap reduction: Delta(t+S) <= Delta(t) x exp(-1.3 x eta_N x S x mu), where Delta is the performance gap between HPC and neocortex. GradScaler state is saved before sleep and restored after to prevent scale drift.

Tier 3 (Theorem 10): Precision-Weighted Correction

  1. Precision-Weighted Top-Down Correction (Theorem 10). EBT-style closed-form Newton step using PWPC precision: X_refined = X + pi_norm x W_td(pred_dn), where pi_norm = (1/sigma_squared).clamp(0.1, 3.0) is the normalized precision. Zero additional parameters, reuses existing sigma_squared from PWPC module.

Tier 4 (Theorem 11, Corollary 11.1): Developmental Scheduling

  1. Developmental Critical Periods (Theorem 11). Module-specific Gaussian plasticity schedule: cp_m(t) = floor + (1 - floor) x exp(-(t - peak_m)^2 / (2 x width_m^2)). Each module has a peak plasticity time and width, ensuring that lower-level modules (precision calibration) are well-trained before higher-level modules (temporal binding) begin learning.

ModulePeakWidthJustification
PWPC sigma-squared1000800Calibrate uncertainty first
HPC10001200Depends on sigma-squared
CFC15001000After sigma-squared calibrated
ThalamicGLH20001000Staggered, longer window
Neuromod5000800Regulate after learning

Optimal peak spacing: t_l = t_{l-1} + 2.15 x width_{l-1} (for 90% calibration target).

  1. Aux Warmup (Corollary 11.1). Zero auxiliary losses during steps 0-200 (allow NTP to establish basic representations), linear ramp from 0 to full weight during steps 200-500. Prevents auxiliary losses from dominating early gradients (V10.1a problem: aux = 68% of gradient).

Tier 5 (Theorem 12, Proposition 13): Homeostatic Maintenance

  1. Astrocyte Layer-Wise Homeostasis (Theorem 12). Two-timescale gradient modulation per layer (see Section 13.3).

  2. Synaptic Scaling (Proposition 13). Per-neuron multiplicative normalization every 100 steps (see Section 13.4).

Tier 6 (Theorems 14, 15, 16): Refinement

  1. ACh Attention-Gated Plasticity (Theorem 14). Tripartite gate combining three orthogonal learning signals: gate = 1 + 0.5 x DA + 0.3 x sigma_squared + 0.3 x ACh, where DA = surprise, sigma_squared = uncertainty, ACh = attention depth (from CFC-UCAM column sums). Zero new parameters, approximately 0.1% overhead.

  2. Deep Supervision (Theorem 15). Shared lm_head applied at intermediate layers {4, 8, 12}, injecting vocabulary-level gradient signal into early and mid layers. Annealed with PWPC critical period (fades during NTP consolidation). Zero new parameters, approximately 2% overhead.

  3. EMA (Theorem 16). Polyak averaging with alpha = 0.999 for validation, evaluation, and checkpoints: theta_EMA(t) = alpha x theta_EMA(t-1) + (1 - alpha) x theta(t). Variance reduction: approximately 2000x at steady state (effective over 1/(1-alpha) = 1000 steps).

Additional Training Mechanisms

  1. Multi-Loss Gradient Alignment (Theorem 18). Monitor cos(grad_NTP, grad_aux) every 100 steps. When negative (auxiliary loss gradient opposes NTP), apply PCGrad projection: g_NTP_corrected = grad_NTP - (dot(grad_NTP, grad_aux) / ||grad_aux||^2) x grad_aux. At V10.2 step 2000: GAD = 1.00 (perfect alignment, no projection needed).

  2. DDP Gradient Consistency (Theorem 23). All homeostatic mechanisms (BCM, Astrocyte, Synaptic Scaling) applied AFTER all-reduce to guarantee parameter synchronization across GPUs. Flow: local gradients then all-reduce(avg) then BCM/Astrocyte then optimizer step. Proof by induction: identical averaged gradients produce identical modulations produce identical parameters.

  3. Cross-Timescale Coherence (Theorem 21). Memory write periods for different timescale modules must be coprime to prevent destructive interference. Geometric timescale spacing with coprime phase-locking ensures no two modules write to the same memory location at the same step.

  4. Aux Capping. Auxiliary loss magnitude capped at 2x NTP loss to prevent aux gradient dominance. Combined with aux warmup (Corollary 11.1), this resolved V10.1a’s problem where aux constituted 68% of total gradient.

Section 15: Loss Functions

The total loss combines primary, auxiliary, and regularization terms:

L_total = sum_t [gate(DA, ACh, sigma_squared) x CE_NTP(t)] (surprise-weighted next-token prediction)

  • sum_l [lambda_l x sqrt(tau_l) x cp_l(t) x F_l] (per-layer Friston free energy, precision-timescale coupled)

  • lambda_kl x L_kl (always-on asymmetric boundary for sigma_squared: relu(0.3 - sigma_squared)^2 + relu(sigma_squared - 4.0)^2)

  • lambda_replay x cp_HPC(t) x L_replay (hippocampal replay loss during sleep)

  • lambda_slot_orth x L_slot_orth (slot orthogonality regularization)

  • lambda_tpc x cp_GLH(t) x L_tpc (temporal prediction coding)

  • lambda_prosp x cp_HPC(t) x L_prosp (prospective hippocampal prediction)

  • alpha_DS x cp_PWPC(t) x L_DS (deep supervision at layers {4, 8, 12})

  • lambda_z x logsumexp^2 (z-loss for logit stability, PaLM style)

  • lambda_bistable x L_bistable (bistable binding regularization)

  • lambda_cereb x L_cereb (cerebellar temporal prediction)

Logit soft-cap: 30 x tanh(logits / 30) (Gemma 2 style, prevents logit explosion). Auxiliary loss magnitude capped at 2x NTP loss. Critical period functions cp_m(t) anneal each loss term according to its developmental schedule (Theorem 11).

Loss weight values. lambda_kl = 0.01 (gentle sigma_squared boundary); lambda_unc = 0.01 (Friston free energy); lambda_bound = 0.1 (asymmetric boundary); lambda_z = 1e-4 (z-loss); lambda_cereb = 0.02; lambda_bistable = 0.001; alpha_DS = 0.1 (deep supervision). All auxiliary weights subject to aux warmup (zero during steps 0-200, linear ramp 200-500) and aux capping (max 2x NTP).

Section 16: Experimental Results

The NCT V10.2 architecture was validated in two experimental configurations: (1) from-scratch training at 105.5M parameters on WikiText-103, and (2) NCT-Adapt wrapping a frozen TinyLlama-1.1B backbone with 77M trainable parameters.

16.1 V10.2 From-Scratch Training Results (Step 2000)

Training configuration: 105.5M parameters, WikiText-103, T4 x2 GPUs, batch_size=4, seq_len=512, base_lr=3e-4, 100-step warmup, cosine decay, EMA alpha=0.999.

MetricValueTargetStatus
sigma_squared2.51[0.5, 5.0]Healthy (V10.1a: saturated at cap 10)
KL (sigma_squared penalty)0.093< 0.5Well-controlled
CAA (confidence-accuracy alignment)+0.125> 0Positive (V10.1a: -0.032 inverted)
GAD (gradient alignment)1.00> 0.7Perfect alignment
LIS (lateral inhibition sparsity)0.989[0.01, 0.02]1.1% active (brain target 1-2%)
PCC (precision calibration)+0.130> 0sigma_squared correctly tracks prediction error
EBF (entity binding fidelity)0.700> 0.670% correct entity binding
Aux/Total gradient ratio0.67 declining< 0.5 by step 4000Trend correct (V10.1a: 68% constant)

Key validation points: (1) sigma_squared control solved, the 10-theorem evolution (Theorems 27-28h) produced stable precision that tracks prediction error (PCC = +0.130). (2) Confidence-accuracy alignment positive, when the model reports high confidence (low sigma_squared), it is more accurate (CAA = +0.125), validating the predictive coding precision mechanism. (3) Sparse activation achieved, DendriticFFN exact-k selection produces 1.1% active units, matching the biological target of 1-2% cortical activation. (4) Gradient alignment perfect, auxiliary losses align with NTP gradient (GAD = 1.00), no PCGrad projection needed.

16.2 NCT-Adapt Wrapper Results (5000 Steps)

Training configuration: TinyLlama-1.1B frozen backbone, 77M trainable NCT parameters (7% overhead), MPS device, batch_size=4, seq_len=512, base_lr=1e-4, 100-step warmup, cosine decay, 2.7 hours total training.

MetricBase TinyLlamaNCT-AdaptImprovement
NTP Accuracy0.4770.512+3.5%
Val Perplexity10.49.8-5.8%
Hallucination AUROC0.500 (random)0.917+41.7 points
PCC (sigma_squared vs error)N/A0.459Novel capability
Trust AlignmentN/A0.433Novel capability
Uncertainty GapN/A1.878Novel capability
Gate Max alphaN/A0.0102 (1%)Within 0.1 cap
Parameter Overhead–77M (7%)< 10% target

Novel capabilities. The three metrics marked “Novel capability” represent qualitatively new capabilities that the base transformer does not possess: (1) PCC = 0.459 means the model’s uncertainty estimates (sigma_squared) correlate with actual prediction errors with r = 0.459, the model genuinely knows when it is uncertain. (2) Trust Alignment = 0.433 means high-confidence predictions are significantly more accurate than low-confidence predictions. (3) Uncertainty Gap = 1.878 means the model produces substantially higher sigma_squared for tokens it gets wrong compared to tokens it gets right. These capabilities are absent from standard transformers, which produce no per-token uncertainty signal.

Hallucination detection. The hallucination AUROC of 0.917 demonstrates that NCT’s sigma_squared can discriminate between correct and incorrect predictions with 91.7% accuracy under the area-under-ROC-curve metric. This is a direct consequence of the predictive coding precision mechanism (Theorems 1, 17, 27-28h): when the model’s internal prediction matches the observation, sigma_squared is low (confident); when they mismatch, sigma_squared is high (uncertain). No prior art achieves this without post-hoc calibration or ensemble methods.

Stability guarantees. Zero NaN events throughout 5000 training steps. Zero degradation (NTP accuracy monotonically improved). Val perplexity monotonically improved from 10.4 to 9.8. Gate alpha self-regulated to 1% (from 0.47% at initialization to maximum 1.02%), confirming the identity-at-initialization with gradual activation principle (Theorem 50). Identity test passed: maximum logit difference less than 10^-3 with all gates disabled.

16.3 Disease Mapping as Ablation Evidence

The disease-mapping methodology (Section 1) provides natural ablation evidence for each module. Specific neurological conditions produce specific computational deficits that map directly to NCT module removals:

DiseaseAblated ModuleExpected DeficitNCT Analog
Parkinson’s (DA depletion)D1D2InvertedUCannot modulate WM gatingFlat exploration/exploitation
Alzheimer’s (ACh depletion)TripartiteAChGateInverted attention gainNovel stimuli not prioritized
Schizophrenia (NMDA hypo)NMDAAttractorSlotsPersistent WM failureItems lost from active WM
Epilepsy (PV deficit)ChandelierVetoGateRunaway excitationUnbounded activation growth
Autism (VIP deficit)VIPDisinhibitoryGateImpaired top-down modulationOver-suppressed SST gating
Confabulation (LC deficit)LCEventBoundaryEvent blendingCross-context memory merging
Spinocerebellar ataxiaCerebellarTimingTemporal discoordinationSpeech timing errors
Cannabis intoxicationEndocannabinoidGateIndiscriminate suppressionDisorganized representations
Age-related declineStochasticResonanceReduced neural noisePoor weak signal detection
GAD (SST deficit)SSTMartinottiExcessive top-down influenceOver-amplified predictions
Depression/ManiaTonicDATemperatureDA temperature extremesFixed exploration rate
Deja vuRepetitionSuppressionBroken novelty signalNovel = familiar confusion

Each row represents a testable prediction: disabling the corresponding NCT module should produce the computational analog of the neurological deficit.

16.4 Custom Evaluation Metrics

Six custom metrics were designed specifically to probe NCT’s brain-inspired capabilities that standard language model metrics (perplexity, HellaSwag) do not capture:

Entity Binding Fidelity (EBF). Measures how accurately the model maintains distinct attribute bindings for multiple co-referential entities over 256+ tokens. CFC theta-gamma coupling (Theorem 2) and VCCEWithBistable (Theorem 25) should produce higher EBF than standard attention.

Temporal Gradient Sharpness (TGS). Measures how sharply attention decays for irrelevant tokens versus a flat baseline. ThalamicGLH temporal gating should produce sharper decay than uniform attention.

Predictive Coding Calibration (PCC). Pearson correlation between sigma_squared and actual prediction error magnitude. A well-calibrated model achieves PCC > 0.3. V10.2 achieves PCC = +0.130 at step 2000 (from-scratch) and PCC = 0.459 (NCT-Adapt at step 5000).

Working Memory Decay Profile (WMDP). Presents entities and tests recall at intervals of 8, 32, 128, 256 tokens. NCT’s hierarchical time constants (NMDA tau=333, Silent tau=14, Phono K=8) should produce a multi-timescale decay curve. WMDP_genuine = 0.139 achieved in V10.1a at step 6500 (first genuine working memory signal).

Lateral Inhibition Sparsity (LIS). Fraction of FFN units active per token at test time. DendriticFFN exact-k selection targets LIS in [0.01, 0.02]. V10.2 achieves LIS = 0.989 (1.1% active), matching the biological cortical activation rate of 1-2%.

Confidence-Accuracy Alignment (CAA). Bins predictions by sigma_squared (high/low confidence) and checks whether accuracy correlates with 1/sigma_squared. Positive CAA means the model’s confidence signal is informative. V10.2: CAA = +0.125 (from-scratch), validating PWPC precision mechanism.

Section 17: Alternative Embodiments and Computational Requirements

17.1 Scaling Configurations

The architecture described herein uses d_model = 384, L = 12 layers, K = 6 columns as the reference configuration at approximately 105.5M parameters. Alternative embodiments include:

Small (d = 256, L = 12, K = 4): Approximately 48M parameters. Suitable for edge deployment. WTA becomes effective (k_active = 2 of K = 4). CFC binding engages with multiple co-referential entities at T >= 256.

Medium (d = 512, L = 24, K = 8): Approximately 360M parameters. All mechanisms fully engaged. K = 8 WTA is strongly sparse. Hierarchical time constants diverge across 24 layers.

Large (d = 1024, L = 48, K = 8): Approximately 1.5B parameters. ThalamicGLH temporal hierarchy develops across 48 layers (fast syntax at bottom, slow narrative at top). Attention O(T^2) vs GLH O(d^2 x T) provides computational advantage at long context.

All configurations use the same 30-module architecture, 6-tier training protocol, and 5 optimizer groups. Only d_model, L, K, and derived dimensions scale.

17.2 NCT-Adapt Embodiment

An alternative embodiment wraps a pre-trained frozen backbone (e.g., TinyLlama-1.1B, LLaMA-7B, or any decoder-only transformer) with 27 NCT brain modules as a post-block processing wrapper. The frozen backbone generates representations; NCT modules operate on the output of each frozen layer with a capped gated residual: X = X_frozen + alpha x (X_nct - X_frozen), where alpha = 0.1 x sigmoid(gate_raw) is capped at maximum 10% NCT contribution per layer to prevent compounding across L layers. This embodiment adds novel capabilities (hallucination detection, uncertainty quantification, working memory) to any existing transformer with less than 10% parameter overhead and no modification to the frozen model.

7. Claims

GROUP A: PREDICTIVE CODING CLAIMS (Theorems 1, 17, 27, 28, 28b-28h, Corollary 28g.1)

Claim 1 (Independent System, Bidirectional Precision-Weighted Predictive Coding):

  1. A computing system for processing sequential data, the system comprising a processor, a memory, and instructions that cause the processor to implement a neural network comprising a plurality of hierarchically arranged computational blocks, wherein each computational block comprises a predictive coding module configured to:

    1. compute a bottom-up prediction of the representation expected at the next higher layer AND a top-down prediction of the representation expected at the next lower layer, using separate learnable linear projections;

    2. estimate per-position log-precision using a sigmoid-bounded parameterization: gamma = GAMMA_MIN + (GAMMA_MAX - GAMMA_MIN) x sigmoid(W_sigma x X), where GAMMA_MIN and GAMMA_MAX are predetermined constants, and compute variance as sigma_squared = exp(-gamma), wherein sigma_squared is bounded within a predetermined range for all finite values of W_sigma x X;

    3. compute precision-normalized surprise as the prediction error divided by the estimated variance;

    4. gate processing using a learnable threshold with a softplus parameterization: process_gate = sigmoid(beta x (surprise - softplus(tau_raw))), and blend prediction with observation using the process gate;

    5. compute a per-layer free energy loss F(gamma) = exp(gamma) x MSE - gamma, having a proven analytical equilibrium at sigma_squared = MSE;

    wherein the precision estimates from (b) are propagated to at least one other module within the same computational block to modulate its computation.

Claim 2 (Dependent, Sigmoid-Bounded Log-Precision):

  1. The computing system of claim 1, wherein the sigmoid-bounded parameterization in step (b) provides: (i) bounded sigma_squared without gradient dead zones at boundaries, unlike hard clamping; (ii) the gradient ∂gamma/∂omega = (GAMMA_MAX - GAMMA_MIN) x sigmoid(omega) x (1 - sigmoid(omega)) is non-zero for all finite omega; and (iii) the maximum gradient magnitude |∂F/∂omega| is bounded at (GAMMA_MAX - GAMMA_MIN) x 0.25 x max(|∂F/∂gamma|), ensuring fp16 numerical safety.

Claim 3 (Dependent, Friston Canonical Free Energy):

  1. The computing system of claim 1, wherein the free energy loss in step (e) is the Friston canonical variational free energy F(gamma) = exp(gamma) x MSE - gamma without any clamp on the product exp(gamma) x MSE, wherein the sigmoid bounding of gamma guarantees that the gradient ∂F/∂omega is bounded for any finite MSE, as proven by Corollary 28g.1.

Claim 4 (Dependent, Biophysical Reparameterization):

  1. The computing system of claim 1, wherein ALL bounded learnable quantities in the neural network use sigmoid reparameterization corresponding to the neural firing-rate curve (f-I curve), specifically: scale parameters use p = c x sigmoid(omega); range parameters use p = a + (b-a) x sigmoid(omega); and decay rates use a_min + (a_max - a_min) x sigmoid(f(X)), replacing all hard clamps with smooth gradient flow.

Claim 5 (Dependent, Precision Tracking with Timescale Separation):

  1. The computing system of claim 1, wherein the sigma_squared parameters are assigned a separate learning rate group at a fraction of the base learning rate (specifically eta/20), implementing two-timescale stochastic approximation where model weights update faster than precision estimates.

GROUP B: SPARSE ACTIVATION CLAIMS (Theorems 4, 20)

Claim 6 (Independent System, Dendritic FFN with Exact-k Sparsification):

  1. A computing system for processing sequential data, the system comprising a processor, a memory, and instructions that cause the processor to implement a neural network comprising a feed-forward processing module within each of a plurality of computational blocks, wherein the feed-forward processing module comprises:

    1. a dendritic branch gate receiving a first input signal (X_pc) from a predictive coding module and computing per-neuron gate logits through a learnable linear projection;

    2. during training, adding Gumbel noise to the gate logits and selecting exactly k neurons using top-k selection, where k is less than or equal to 5% of the total neurons;

    3. computing a straight-through gradient estimator: gate_output = gate_hard + sigmoid(gate_logit / tau) - sigmoid(gate_logit / tau).detach(), where tau is a learnable temperature;

    4. a main computation path receiving a second input signal (X_mid) from an attention module;

    5. multiplying the main computation by the dendritic gate output;

    6. applying grouped divisive normalization across a predetermined number of column groups between the dendritic gate and a second sparsification stage;

    7. applying a Winner-Take-All sparsification using a differentiable threshold computed via Newton’s method (5 iterations), where the target active neuron count is dynamically determined by a neuromodulatory signal.

Claim 7 (Dependent, Cross-Module Input Separation):

  1. The computing system of claim 6, wherein the dendritic branch gate receives its input (X_pc) from a DIFFERENT source than the main computation path (X_mid), creating a cross-module dependency where neuron SELECTION depends on predictive coding state while neuron VALUES depend on attention output.

GROUP C: ATTENTION CLAIMS (Theorems 2, 15, 16)

Claim 8 (Independent System, Cross-Frequency Coupled Attention):

  1. A computing system for processing sequential data, the system comprising a processor, a memory, and instructions that cause the processor to implement a neural network comprising an attention module within each of a plurality of computational blocks, the attention module configured to:

    1. decompose input into P phase slots via learned softmax projections W_theta and W_gamma;

    2. compute a CFC binding mask C_cfc as the element-wise product of two outer-product coherence matrices: C_cfc = (phi_theta x phi_theta_transpose) element-multiply (phi_gamma x phi_gamma_transpose);

    3. add log(C_cfc) as an attention bias to the standard Q x K_transpose attention scores;

    4. modulate attention temperature using a precision signal sigma_squared from a predictive coding module within the same block, such that high uncertainty produces soft attention and low uncertainty produces sharp attention;

    5. implement BOTH excitatory heads producing positive contributions AND inhibitory heads producing negated contributions scaled by a learned per-head alpha.

Claim 9 (Dependent, Deep Supervision):

  1. The computing system of claim 8, further comprising deep supervision at a plurality of intermediate layers using a shared language modeling head, wherein the deep supervision loss is annealed with a developmental critical period schedule.

GROUP D: THALAMIC PROCESSING CLAIMS (Theorems 5, 44)

Claim 10 (Dependent, TRN Attentional Filter):

  1. The computing system of claim 1, further comprising a thalamic reticular nucleus filter that computes relevance by comparing cortical need (query = W_q(X_pre)) to relay content (key = W_k(delta_relay)) via a cross-attention mechanism: relevance = sigmoid(query dot key / sqrt(d_TRN)), and gates the thalamic relay contribution based on relevance.

GROUP E: WORKING MEMORY CLAIMS (Theorems 31-36)

Claim 11 (Independent System, Four-Level Working Memory Hierarchy):

  1. A computing system for natural language processing comprising a processor executing a neural network, the neural network comprising a multi-level working memory hierarchy with FOUR distinct memory systems:

    1. an NMDA attractor module implementing persistent attractor dynamics using a linearized attention state matrix with an ultra-slow learnable decay rate having a half-life exceeding 100 tokens and a default-closed write gate, implementing content-addressable retrieval via normalized linear attention;

    2. an activity-silent module implementing short-term synaptic facilitation with a faster decay having a half-life of less than 50 tokens, maintaining information through synaptic traces rather than persistent activation;

    3. a phonological loop module implementing cyclic rehearsal of K positions (K = 8) through a circular buffer with round-robin write and content-addressable read via softmax attention over slots;

    4. a dopamine-gated module implementing an inverted-U response function f(DA) = 4 x DA x (1-DA) where moderate dopamine levels optimize working memory performance and extreme levels impair it;

    wherein the four memory systems operate simultaneously with different time constants and the system assigns items to different stores depending on priority.

Claim 12 (Dependent, Time Cell Temporal Context):

  1. The computing system of claim 11, further comprising a time cell bank with N exponentially-spaced time cells having time constants tau_i = 2^(i/4), forming a Laplace-domain approximation of elapsed time with Weber-Fechner resolution.

Claim 13 (Dependent, Theta Phase Precession):

  1. The computing system of claim 11, further comprising a theta phase precession module with a learnable period P that creates periodic multiplicative modulation of representations, implementing graded temporal structure within theta cycles.

Claim 14 (Dependent, Theta-Gamma PAC):

  1. The computing system of claim 11, further comprising a theta-gamma phase-amplitude coupling module where gamma amplitude (binding strength) is modulated by theta phase (cycle position): PAC(x) = gamma_amp(x) x cos(2 pi x theta_phase(x)).

GROUP F: NEUROMODULATORY CLAIMS (Theorems 5, 8, 14, 22, 37, 47)

Claim 15 (Independent Method, Tripartite Neuromodulatory Learning):

  1. A method for training a neural network implemented by a digital processor, the method comprising:

    1. computing a dopamine signal proportional to per-token prediction error;

    2. computing an acetylcholine signal from attention column-sums across layers;

    3. computing a precision signal from per-position variance estimates of a predictive coding module;

    4. combining the dopamine, acetylcholine, and precision signals in a learned neural network gate producing per-token importance weights in a bounded range [0.5, 2.0];

    5. applying the importance weights to modulate per-token cross-entropy loss gradients;

    wherein the gate is identity-initialized and gradually learns to combine the three orthogonal biological signals.

Claim 16 (Dependent, D1/D2 Inverted-U):

  1. The method of claim 15, further comprising a dopamine-dependent working memory gating module implementing an inverted-U function f(DA) = 4 x DA x (1-DA) that peaks at moderate dopamine levels, wherein high DA increases maintenance stability and low DA increases update flexibility.

Claim 17 (Dependent, Tonic DA Temperature):

  1. The method of claim 15, further comprising maintaining a slow exponential moving average of surprise with decay constant alpha >= 0.999 and mapping said average to a gain modulation signal that increases processing gain during exploitation (high sustained success) and decreases gain during exploration (high sustained surprise).

GROUP G: HOMEOSTATIC REGULATION CLAIMS (Theorems 7, 12, 13, 19, 26, 41, 42)

Claim 18 (Independent System, Five-Level Homeostatic Regulation):

  1. A computing system for training a neural network, the system comprising a processor, a memory, and instructions implementing at least five independent homeostatic feedback loops at different spatial and temporal scales:

    1. a per-parameter BCM mechanism tracking running mean of gradient-squared and modulating gradients toward the mean with an adaptive rate determined by a metaplasticity subsystem;

    2. a per-layer astrocyte mechanism using two exponential moving averages at different timescales (tau_fast approximately 33 steps, tau_slow approximately 500 steps) and modulating layer gradients by the ratio of slow to fast activity;

    3. a per-neuron synaptic scaling mechanism that periodically normalizes weight row norms toward their mean while preserving angular structure;

    4. a per-parameter metaplasticity mechanism that adapts the BCM threshold update rate based on gradient stability, with rate bounded in [beta_0/2, 2 beta_0];

    5. a per-block chandelier veto mechanism that can completely suppress a block’s output contribution when learned criteria indicate unreliable computation;

    wherein adjacent feedback loops have timescale separation ratios exceeding 3:1.

Claim 19 (Dependent, Lyapunov Stability):

  1. The computing system of claim 18, wherein the composite homeostatic system satisfies a small-gain stability condition with the product of non-CLS loop gains Gamma = 0.01, providing a phase margin exceeding 165 degrees.

Claim 20 (Dependent, Metaplasticity):

  1. The computing system of claim 18, wherein the metaplasticity subsystem in (d) tracks a deviation variance v(t) of gradient magnitude from the BCM threshold, computes stability s = 1/(1 + v/theta_M_squared), and adjusts the BCM update rate as beta = beta_0 x (0.5 + s), such that stable gradients yield faster threshold adaptation and volatile gradients yield slower adaptation.

GROUP H: INHIBITORY TRIAD CLAIMS (Theorems 38, 40, 41, 46)

Claim 21 (Independent System, Non-Commutative Inhibitory Triad):

  1. A computing system for processing sequential data, the system comprising a processor, a memory, and instructions that cause the processor to implement a neural network comprising an inhibitory processing triad applied to top-down correction signals, the triad comprising THREE modules applied in a mandatory non-commutative order:

    1. FIRST: an SST/Martinotti-type module that computes a tonic suppression mask and REDUCES the correction signal based on a learned activity level: correction_out = correction x (1 - gate x sst_activity);

    2. SECOND: a VIP-type module that RELEASES the suppression applied by the first module: correction_out = correction x (1 + gate x vip_signal), where the amplification is strictly non-negative;

    3. THIRD: an apical amplification module that computes coincidence between bottom-up and top-down signals (multiplicative AND) and AMPLIFIES the surviving correction: correction_out = correction x (1 + gate x coincidence_gain);

    wherein reversing the order of any two modules produces a mathematically different result.

GROUP I: CEREBELLAR AND BASAL GANGLIA CLAIMS (Theorems 24, 25, 30)

Claim 22 (Independent System, Cerebellar Temporal Prediction):

  1. A computing system for processing sequential data, the system comprising a processor, a memory, and instructions implementing a cerebellar timing module that:

    1. computes a linear prediction of the next-step representation;

    2. computes a prediction error as the difference between predicted and actual next-step representations;

    3. applies a gated correction to the current representation using the prediction error, where the gate implements a learnable Kalman gain;

    4. trains the predictor using a precision-weighted MSE loss where precision comes from a predictive coding module;

    wherein the correction module forms a Kalman-like observer with state prediction, innovation, and gain update.

Claim 23 (Dependent, Basal Ganglia Bypass):

  1. The computing system of claim 22, further comprising a striatal confidence gate that:

    1. computes a confidence estimate from a stop-gradiented linear probe of the representation;

    2. gates each block’s contribution: X_out = g x block_output + (1-g) x X_input;

    3. initializes with high pass-through (g approximately 0.95) and learns to bypass blocks for familiar patterns.

Claim 24 (Dependent, Bistable Entity Binding):

  1. The computing system of claim 22, further comprising a bistable entity binding mechanism that adds content-dependent mutual inhibition between slot columns before Gumbel-Softmax selection, creating K stable fixed points in the binding energy landscape, with a regularization loss preventing inhibition matrix collapse or explosion.

GROUP J: ADDITIONAL MECHANISM CLAIMS (Theorems 43, 45, 48, 49)

Claim 25 (Dependent, Event Boundary Detection):

  1. The computing system of claim 1, further comprising a locus coeruleus event boundary module that monitors the cosine change between adjacent representations, detects context shifts where change exceeds a learnable threshold, and emits a reset pulse that promotes memory segmentation before new information is written to working memory.

Claim 26 (Dependent, Repetition Suppression):

  1. The computing system of claim 1, further comprising a repetition suppression module that computes the element-wise difference between adjacent position representations, extracts nonlinear novelty features via GELU activation, and applies a gated correction that amplifies novel tokens and suppresses familiar ones.

Claim 27 (Dependent, Stochastic Resonance):

  1. The computing system of claim 1, further comprising a stochastic resonance module that:

    1. injects Gaussian noise with per-dimension learnable amplitude during BOTH training AND inference;

    2. learns the noise amplitude via gradient descent using the reparameterization trick;

    3. preserves non-zero noise at convergence, enhancing weak signal detection; wherein the noise injection at inference time is intentional and beneficial.

Claim 28 (Dependent, Endocannabinoid Gate):

  1. The computing system of claim 1, further comprising an endocannabinoid gate module that:

    1. computes per-position activation excess above a learnable threshold;

    2. applies sigmoid-scaled suppression proportional to excess magnitude;

    3. affects only positions exceeding the threshold (position-specific); implementing a demand-driven negative feedback that prevents any single position from dominating the representation.

GROUP K: HOOK PIPELINE AND INITIALIZATION CLAIMS (Theorem 50)

Claim 29 (Independent System, Hook-Based Processing Pipeline):

  1. A computing system for natural language processing comprising a processor executing a neural network, the neural network comprising a hook-based processing pipeline that sequences module invocations in a predetermined neuroanatomically-derived order comprising:

    a pre-block hook applying stochastic resonance, thalamic relay, reticular nucleus filtering, tonic dopamine temperature, and basal ganglia selection BEFORE each block; a block forward pass comprising predictive coding, cross-frequency coupled attention, entity binding, thalamic gated linear history, and dendritic feed-forward; a post-block veto hook applying a chandelier veto gate AFTER each block; a top-down correction hook applying SST suppression THEN VIP disinhibition THEN apical amplification in that non-commutative order; a post-reentrant hook applying cerebellar timing; a post-NE-gain hook applying event boundary detection, repetition suppression, NMDA attractors, theta phase precession, theta-gamma PAC, activity-silent traces, phonological loop, endocannabinoid gate, and cross-area global workspace; a pre-logits hook applying conflict monitoring, time cells, D1/D2 gating, tripartite ACh gate, and surprise weighting.

Claim 30 (Dependent, Identity at Initialization with Asymmetric LR):

  1. The computing system of claim 29, wherein ALL modules are initialized to produce identity behavior at training step zero, comprising: all output projection weights initialized to zero; all gate parameters initialized to a value g_init = -2.0 such that sigmoid(g_init) approximately equals 0.12; gate parameters assigned a learning rate multiplier of at least 5x higher than weight parameters; wherein the gradient flow guarantee ensures gates reach operational values (sigmoid approximately 0.5) within a predetermined number of training steps.

GROUP L: TRAINING PROTOCOL CLAIMS (Theorems 3, 5-16, Propositions 9, 13)

Claim 31 (Independent Method, Six-Tier Training Protocol):

  1. A method for training a neural network on a digital processor, the method implementing a six-tier brain-inspired training protocol comprising:

    Tier 1: (a) assigning at least five parameter groups with differentiated learning rates comprising hippocampal parameters at 5x, neuromodulatory parameters at 0.3x, neocortical parameters at 1x, precision parameters at 0.05x, and gate parameters at 10x the base rate; (b) computing a surprise-weighted next-token prediction loss with per-token weights derived from prediction error; (c) applying per-parameter BCM homeostatic gradient modulation;

    Tier 2: (d) scaling auxiliary loss weights proportional to the square root of each module’s characteristic timescale; (e) modulating per-step learning rates based on a surprise signal with system-specific coupling coefficients; (f) periodically replaying high-prediction-error batches with modified learning rates for hippocampal-neocortical consolidation;

    Tier 3: (g) applying precision-weighted top-down corrections as closed-form Newton steps;

    Tier 4: (h) scheduling module-specific auxiliary loss contributions using Gaussian plasticity windows with learned peaks and widths; (i) zeroing all auxiliary losses during an initial warmup period with linear ramp activation;

    Tier 5: (j) applying per-layer astrocyte-like gradient modulation with fast and slow exponential moving averages; (k) periodically normalizing per-neuron weight norms while preserving angular structure;

    Tier 6: (l) applying tripartite neuromodulatory learning combining dopamine, acetylcholine, and precision signals; (m) injecting vocabulary-level gradient supervision at intermediate layers using a shared language modeling head; (n) maintaining exponential moving average shadow weights for evaluation.

Claim 32 (Dependent, Sleep Consolidation):

  1. The method of claim 31, wherein step (f) comprises maintaining a replay buffer of batches with highest prediction error, and periodically conducting a sleep consolidation phase of S replay steps where hippocampal parameters receive a reduced learning rate (0.3x) and neocortical parameters receive an increased learning rate (1.3x).

Claim 33 (Dependent, Developmental Critical Periods):

  1. The method of claim 31, wherein step (h) comprises computing a module-specific plasticity fraction: cp_m(t) = floor + (1-floor) x exp(-(t-peak_m) squared / (2 x width_m squared)), where each module has a different peak step and width determined by the dependency chain between modules.

Claim 34 (Dependent, Gradient Alignment Monitoring):

  1. The method of claim 31, further comprising periodically computing the cosine similarity between the NTP gradient and each auxiliary loss gradient, and adaptively reducing auxiliary loss weights when the cosine similarity falls below a negative threshold.

Claim 35 (Dependent, Coprime Phase-Locked Writes):

  1. The method of claim 31, further comprising assigning mutually coprime write periods to memory modules at different timescales to minimize cross-timescale interference.

Group M: Unified Architecture Claims

Claim 36 (Independent System, Unified Brain-Complete Architecture):

  1. A computing system for natural language processing comprising a processor, a memory, and instructions that cause the processor to implement a neural network, the neural network comprising a hierarchical stack of computational blocks wherein EACH block implements ALL of the following subsystems:

    1. bidirectional predictive coding with sigmoid-bounded log-precision (Friston canonical free energy);

    2. cross-frequency coupled attention with precision-modulated temperature and excitatory/inhibitory head separation;

    3. dendritic feed-forward network with exact-k neuron-level sparse activation using dendritic branch gating and Winner-Take-All selection;

    4. thalamic gated linear history with layer-dependent decay rates;

    5. bistable entity binding with mutual inhibition dynamics;

    AND the system further comprises inter-block subsystems including:

    1. a hippocampal memory module for one-shot associative binding;

    2. a four-level working memory hierarchy with NMDA attractor slots, activity-silent traces, phonological loop, and D1/D2 inverted-U gating;

    3. a tripartite neuromodulatory gate combining prediction error, attention, and precision signals;

    4. at least five independent homeostatic feedback loops operating at different spatial and temporal scales;

    5. an inhibitory triad comprising SST, VIP, and apical amplification modules applied in a specific non-commutative order;

    6. cerebellar timing with Kalman-optimal error correction;

    7. basal ganglia striatal confidence gate for familiar-pattern bypass;

    8. event boundary detection, repetition suppression, stochastic resonance, and endocannabinoid regulation;

    9. conflict monitoring and tonic dopamine temperature control;

    10. a hook-based processing pipeline with six hooks in neuroanatomically-derived order;

    AND is trained using a six-tier protocol comprising complementary learning system learning rates, surprise-weighted loss, BCM homeostasis, sleep consolidation, developmental critical periods, and exponential moving average weight consolidation;

    wherein the total system implements at least forty-nine (49) mathematically specified brain mechanisms.

Claim 37 (Dependent, Disease-Mapping Design Methodology):

  1. The computing system of claim 36, wherein each subsystem is derived from a specific neurological disease mapping where the disease (natural ablation study) identifies exactly one missing computational mechanism, and removing the corresponding subsystem from the computing system produces the computational analog of that disease’s symptom.

Group N: Computer-readable Medium Claims

Claim 38:

  1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement the computing system of claim 1.

Claim 39:

  1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement the computing system of claim 6.

Claim 40:

  1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement the computing system of claim 11.

Claim 41:

  1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement the computing system of claim 18.

Claim 42:

  1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement the computing system of claim 29.

Claim 43:

  1. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement the computing system of claim 36.

Group O: Additional Method Claims

Claim 44 (Independent Method, Single-Pass Uncertainty with Feedback):

  1. A method for processing sequential data implemented by a digital processor, the method producing per-position uncertainty estimates in a SINGLE forward pass, the method comprising:

    1. at each layer, computing a log-precision value using a sigmoid-bounded parameterization;

    2. computing variance as sigma_squared = exp(-log_precision), bounded within (0.1, 5.0);

    3. computing the Friston canonical free energy F(gamma) = exp(gamma) x MSE - gamma;

    4. feeding variance estimates back into same-layer attention temperature modulation AND dendritic feed-forward gating;

    5. combining variance with dopamine and acetylcholine signals in a tripartite learnable gate;

    6. training with a six-tier protocol including five independent homeostatic feedback loops;

    wherein the uncertainty estimates have a positive correlation with actual prediction error (CAA > 0) without requiring multiple forward passes, model ensembles, or dropout at test time.

Claim 45 (Independent Method, Integrated Processing Pipeline):

  1. A method for processing natural language implemented by a digital processor, the method comprising for each of a plurality of hierarchically arranged processing stages:

    1. applying a pre-processing hook comprising stochastic resonance noise injection, thalamic relay routing, reticular nucleus filtering, tonic dopamine modulation, and basal ganglia action selection;

    2. computing bidirectional predictive coding with sigmoid-bounded precision estimation;

    3. computing cross-frequency coupled attention with precision-modulated temperature;

    4. processing through a dendritic feed-forward network with two-stage sparsification;

    5. applying a chandelier veto gate;

    6. applying an inhibitory triad in the order SST, then VIP, then apical amplification;

    7. applying cerebellar timing correction;

    8. updating working memory comprising NMDA attractor slots, theta precession, PAC coupling, activity-silent traces, and phonological loop;

    9. applying event boundary detection, repetition suppression, and endocannabinoid regulation;

    10. computing conflict monitoring, D1/D2 gating, and tripartite neuromodulatory weighting;

    11. producing output token probabilities AND per-position calibrated uncertainty estimates.

Claim 46 (Dependent, Specific Numerical Parameters):

  1. The method of claim 45, wherein: the dendritic gate selects exactly k = floor(0.02 x d_ff) neurons; the NMDA decay rate is sigmoid(6.0) approximately 0.9975 giving half-life approximately 277 tokens; the phonological loop has K = 8 positions; the D1/D2 function is 4 x DA x (1-DA); the inhibitory triad processes in SST-VIP-Apical order; the gate initialization is sigmoid(-2.0) approximately 0.12; the BCM timescale is approximately 1430 steps; and the astrocyte fast timescale is approximately 33 steps.

Claim 47 (Dependent, EMA Weight Consolidation):

  1. The method of claim 45, further comprising maintaining exponential moving average shadow weights with decay alpha = 0.999 and using said shadow weights for all evaluation, wherein the EMA provides approximately 2000x variance reduction compared to instantaneous training weights.

Claim 48 (Dependent, Auxiliary Loss Capping):

  1. The method of claim 45, further comprising capping auxiliary losses at a maximum of 2x the NTP loss magnitude and applying logit soft-capping via 30 x tanh(logits/30) to prevent logit explosion.

Claim 49 (Dependent, DDP Consistency):

  1. The method of claim 45, further comprising distributed data parallel training where all homeostatic computations (BCM, astrocyte, synaptic scaling) operate on post-all-reduce averaged gradients, guaranteeing identical homeostatic state across all ranks.

Claim 50 (Dependent, Combined Loss with Critical Periods):

  1. The method of claim 45, wherein the total training loss comprises: surprise-weighted NTP loss; per-layer Friston free energy with precision-timescale coupling weights proportional to sqrt(tau_m); asymmetric boundary regularization on sigma_squared with free zone [0.3, 4.0]; slot orthogonality loss; bistable binding regularization; deep supervision at intermediate layers with critical period annealing; z-loss on logsumexp squared; all gated by module-specific Gaussian critical period fractions and an auxiliary warmup ramp.

8. Comparison with Prior Work

ConceptPrior ArtNCT Specific NoveltyHow it differs
Predictive codingRao & Ballard 1999: unidirectionalBidirectional + sigmoid-bounded log-precision + Friston F(gamma)=exp(gamma)xMSE-gamma + precision-to-attention couplingCombining bidirectional PC with Friston canonical form AND sigmoid bounding was never suggested
Sparse FFNMoE (Shazeer 2017): expert-levelTwo-stage neuron-level: dendritic gate (Gumbel exact-k from PC output) + WTA (Newton, neuromod) + grouped divisive normCross-module PC-to-FFN gating is novel; two-stage with different inputs unprecedented
Uncertainty in LMMC-Dropout: multiple passesSingle-pass sigmoid-bounded sigma-squared with F(gamma)=exp(gamma)xMSE-gamma equilibrium + same-layer feedbackSingle-pass uncertainty with proven equilibrium feeding back into computation is novel
Brain-inspired NNSNNs: isolated mechanisms50 mechanisms unified with specific hook ordering + 5 homeostatic loops + asymmetric LRNo prior system combines >4 mechanisms; hook ordering from neuroanatomy is novel
Working memoryNone in LMs4-level hierarchy: NMDA (277T) + silent (14T) + phono (K=8) + D1D2 inverted-UNo LM implements ANY persistent WM; 4 levels unprecedented
HomeostasisBatchNorm at mostFIVE loops: BCM + astrocyte + synaptic scaling + metaplasticity + chandelier, Lyapunov stable5 interacting loops with Lyapunov proof is novel
Inhibitory circuitNone in NNsSST -> VIP -> Apical, non-commutative, neuroanatomically mandatedThe 3-type ordering from neuroscience has never been implemented
Tripartite learningAdaGrad: single signalDA + ACh + sigma-squared in learned gate [0.5, 2.0]3 biologically derived orthogonal signals combined is novel
Precision paramHard clampSigmoid-bounded log-precision (f-I curve): ALL hard clamps replacedNeural f-I curve reparameterization for all bounded params is novel
Cerebellar timingNone in LMsKalman-optimal temporal prediction with precision-weighted MSECerebellar timing module in language model is novel
BG bypassMoD (Raposo 2024)Striatal confidence gate with stop-grad probe + per-layer learned biasContent-dependent layer bypass from BG neuroscience has no prior art
Event boundaryNone in LMsLC NE reset pulse from cosine change detection, promotes memory segmentationEvent boundary detection for memory segmentation in LMs is novel
Stochastic resonanceDropoutLearnable noise at train+eval, per-dimension amplitude, gradient-optimizedIntentional eval-time noise learned via gradient descent is novel
EndocannabinoidNoneMagnitude-threshold retrograde suppression, position-specificDemand-driven activation suppression from eCB neuroscience is novel
MetaplasticityNoneStability-dependent BCM rate: stable=faster, volatile=slower, boundedAdaptive homeostatic rate from metaplasticity literature is novel

License

PolyForm Noncommercial License 1.0.0

This 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.