# NeuroCortex Transformer: A Cortical Column Network with Local Predictive Coding for Language Modeling

- Authors: Krrish Choudhary
- Published: 2026-03-22
- Tags: AI
- Web page: https://verace.in/research/nct-cortical-column-network

## Abstract

Modern language models rely on the transformer architecture, which requires global backpropagation through all parameters, produces frozen models incapable of post-deployment learning, and scales quadratically with sequence length. We propose the NeuroCortex Transformer (NCT), a cortical column network that replaces transformer blocks with biologically-grounded six-layer cortical columns. NCT learns through local predictive coding and Hebbian plasticity, requiring zero backpropagation through its column hierarchy, and operates continuously with integrated wake-sleep consolidation. Each column implements thalamic input gating (L4), top-down modulation (L1), windowed Hebbian association at $O(Tw)$ complexity (L2/3), dendritic computation with sparse activation (L5), and thalamic feedback (L6), augmented by VIP/SST/PV interneurons, three-timescale working memory, nested oscillatory dynamics, and dopaminergic/noradrenergic/serotonergic/cholinergic neuromodulation. Subcortical systems, thalamus, hippocampus, basal ganglia, and cerebellum, provide routing, episodic memory, reward-driven selection, and temporal prediction. On WikiText-2 with a 300M-parameter model trained for 5,000 steps using only local learning rules, NCT achieves a validation perplexity of 54.0, representing a 256$\times$ improvement over the random baseline, with self-calibrating prediction precision ($\sigma^2$: 1.0$\rightarrow$1.88) and stable autonomous operation including 150 dream-phase consolidation cycles. These results demonstrate that local predictive coding can learn meaningful language representations without global gradient propagation, establishing a foundation for continuously learning, self-improving language systems. This paper provides complete architectural specifications, mathematical formulations, initialization protocols, and all hyperparameters necessary for full reproduction.

## Capabilities

- **NeuroCortex Transformer (NCT)**: Cortical column network replacing transformer blocks with six-layer columns trained by local predictive coding and Hebbian plasticity.
- **Disease-Mapping Methodology**: Neurological disorders used as natural ablations to find missing computational mechanisms and their NCT modules.
- **Precision-Weighted Predictive Coding (PWPC)**: Each column minimizes its precision-weighted prediction error locally; learned $\sigma^2$ is the learning signal.
- **L2/3 Windowed Hebbian Association**: Windowed Hebbian recall with k-WTA and anti-Hebbian lateral competition replacing self-attention at $O(Tw)$ cost.
- **Identity-at-Init Principle**: All new modules start as identity via gate init -2.0 and zero output weights so adding mechanisms does not perturb existing behavior.
- **Three-Timescale Working Memory**: NMDA attractor slots, activity-silent Tsodyks-Markram trace, and a phonological loop, all gated and identity-at-init.

## 1. Introduction

The transformer architecture (Vaswani et al. 2017) has become the dominant paradigm for language modeling, powering systems from GPT (Brown et al. 2020) to LLaMA (Touvron et al. 2023). Despite remarkable performance, transformers exhibit fundamental limitations absent in biological neural systems: (1) they require global backpropagation of error gradients through all parameters, a mechanism widely considered biologically implausible (Lillicrap et al. 2020); (2) they produce frozen models that cannot learn from individual interactions after deployment; (3) their self-attention mechanism scales quadratically as $O(T^2)$ with sequence length; and (4) they lack integrated memory, consolidation, and metacognitive systems.

The mammalian neocortex processes language through cortical columns, repeating computational units organized in six layers with distinct feedforward, lateral, and feedback pathways (Mountcastle 1997; Harris and Shepherd 2015). Learning occurs through local synaptic plasticity rules: predictive coding minimizes layer-wise prediction errors (Rao and Ballard 1999; Whittington and Bogacz 2017), while Hebbian and anti-Hebbian dynamics self-organize representations (Hebb 1949; Pehlevan and Chklovskii 2019). Neuromodulatory systems (dopamine, norepinephrine, serotonin, acetylcholine) gate plasticity based on reward, arousal, and attention (Schultz, Dayan, and Montague 1997; Hasselmo 2006). Sleep consolidation transfers episodic memories to semantic knowledge (Tononi and Cirelli 2006; McClelland, McNaughton, and O’Reilly 1995). No global error signal is required.

Recent work has begun bridging predictive coding and deep learning (Millidge, Tschantz, and Buckley 2022; Salvatori et al. 2024), and biologically-inspired alternatives to backpropagation have been proposed (Hinton 2022; Ororbia and Mali 2023). However, existing approaches typically modify individual components of the transformer (e.g., replacing backprop with forward-forward) rather than designing an architecture from neural circuit principles. No prior system integrates cortical columns, predictive coding, Hebbian learning, neuromodulation, working memory, oscillatory dynamics, subcortical systems, and wake-sleep consolidation into a unified language model.

The contributions of this work are:

- We propose the **NeuroCortex Transformer (NCT)**, a cortical column network that replaces transformer blocks with six-layer columns implementing 25+ brain mechanisms, trained entirely through local learning rules.
- We demonstrate that **local predictive coding achieves a 256$\times$ improvement** over random baseline (perplexity 13,817$\rightarrow$54.0) on WikiText-2 with zero backpropagation through the column hierarchy.
- We show that the prediction precision system ($\sigma^2$) **self-calibrates** during training, confirming precision-weighted predictive coding.
- We introduce a **disease-mapping methodology** that systematically identifies missing computational mechanisms by mapping neurological disorders to model failure modes.
- We provide **complete implementation specifications**, every equation, hyperparameter, initialization value, and algorithm, sufficient for full reproduction from this paper alone.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 presents design principles. Section 4 details the NCT architecture. Section 5 describes the local learning framework. Section 6 covers prenatal self-organization. Section 7 details the experimental setup. Section 8 presents results. Section 9 discusses scaling. Section 10 presents the disease-mapping methodology. Section 11 concludes.

## 2. Related Work

#### Predictive Coding.

Rao and Ballard (1999) introduced predictive coding as a framework for cortical processing. Whittington and Bogacz (2017) proved that predictive coding with local Hebbian plasticity approximates backpropagation. Millidge, Tschantz, and Buckley (2022) extended this to arbitrary computation graphs. Salvatori et al. (2024) surveyed applications to classification and generation. These works focus on replacing backprop within existing architectures; NCT designs the architecture itself from cortical circuit principles.

#### Alternatives to Backpropagation.

Lillicrap et al. (2020) reviewed biological implausibility of backprop. Hinton (2022) proposed forward-forward training. Ororbia and Mali (2023) combined predictive coding with forward-forward. These modify learning algorithms while retaining standard architectures. NCT replaces both architecture and learning algorithm.

#### Hebbian and Self-Organizing Networks.

Pehlevan and Chklovskii (2019) showed that Hebbian feedforward + anti-Hebbian lateral converges to the PCA subspace. Bienenstock, Cooper, and Munro (1982) established BCM homeostatic plasticity. NCT implements both within L2/3, replacing $O(T^2)$ attention with $O(Tw)$ windowed Hebbian recall.

#### Cortical Column Models.

Mountcastle (1997) proposed the cortical column as the fundamental compute unit. Douglas and Martin (2004) described the canonical cortical circuit. Harris and Shepherd (2015) synthesized modern understanding. NCT is the first to implement a complete six-layer column as a language modeling unit.

| **Method** | **Local** | **Continuous** | **Memory** | **Neuromod** | **Sleep** | **Columns** |
| --- | --- | --- | --- | --- | --- | --- |
| Transformer (Vaswani et al. 2017) |  |  |  |  |  |  |
| Forward-Forward (Hinton 2022) |  |  |  |  |  |  |
| Pred. Coding (Salvatori et al. 2024) |  |  |  |  |  |  |
| Hebbian Nets (Pehlevan and Chklovskii 2019) |  |  |  |  |  |  |
| **NCT (Ours)** |  |  |  |  |  |  |

Table: Table 1: Comparison of approaches to biologically-inspired language modeling.

## 3. Design Principles

Five core theorems guide NCT’s design. Each is grounded in established neuroscience and provides a specific computational guarantee.

### Theorem A: Predictive Coding Replaces Backpropagation

Each column minimizes its own prediction error locally (Whittington and Bogacz 2017):

$$
\boldsymbol{\epsilon}_l = \mathbf{x}_l - f(\mathbf{x}_{l+1}), \qquad \Delta\theta_l = -\eta \cdot \boldsymbol{\epsilon}_l \cdot \frac{\partial f}{\partial \theta_l}
$$

The learned precision $\sigma^2$ from precision-weighted predictive coding (PWPC) *is* the learning signal. No global loss function is required.

### Theorem B: Hebbian + Anti-Hebbian = Self-Organizing Representations

Following Pehlevan and Chklovskii (2019):

$$
\Delta W_{\text{ff}} = \eta \cdot \mathbf{y} \cdot \mathbf{x}^\top, \qquad \Delta W_{\text{lat}} = -\eta \cdot \mathbf{y} \cdot \mathbf{y}^\top
$$

This converges to the PCA subspace, replacing Q/K/V attention with self-organizing content-addressable recall.

### Theorem C: Neuromodulatory Reward = RL Without Backprop

Dopamine encodes reward prediction error (Schultz, Dayan, and Montague 1997):

$$
\Delta\theta = \text{DA} \cdot \text{ACh} \cdot f(\text{NE}, \text{5-HT}) \cdot \Delta\theta_{\text{local}}
$$

((3))

Acetylcholine gates learning, norepinephrine controls exploration, serotonin modulates time horizon.

### Theorem D: Wake-Sleep = Autonomous Self-Improvement

Following Tononi and Cirelli (2006): WAKE processes input and tags surprises; SLEEP replays, downscales synapses ($W \leftarrow 0.99W$), and consolidates episodic$\rightarrow$semantic memory.

### Theorem E: Structural Plasticity = Growing Architecture

Synaptogenesis where prediction error is persistently high; pruning where gates approach zero. The network continuously adapts its own structure.

### The Identity-at-Init Principle

**All new modules must be identity at initialization.** This is enforced through two mechanisms:

- **Gate initialization**: $g_0 = -2.0$, so $\sigma(g_0) \approx 0.12$. Output $\approx 0.12 \times \text{module\_output} \approx 0$.
- **Output weight initialization**: $W_{\text{out}} = \mathbf{0}$. Module contribution is exactly zero until learned.

This ensures that adding any mechanism to a trained network does not perturb existing behavior.

### The Parameter Bounding Principle

The brain is an open dissipative system that self-regulates through feedback loops, not imposed bounds:

- Hard clamps (e.g., `clamp(x, 0, 1)`) are **never used**.
- Soft clamps (e.g., $0.1 + \mathop{\mathrm{softplus}}(x)$) are **never used**.
- Bare $\mathop{\mathrm{softplus}}(x)$ for positivity constraints (e.g., $\tau$, $\eta$, $\sigma^2$) is the **correct** approach.
- System stability comes from regulatory circuits: BCM homeostasis, metaplasticity, synaptic scaling, chandelier veto, endocannabinoid modulation.

## 4. The NCT Architecture

NCT replaces the transformer’s stack of self-attention blocks with a hierarchy of $N$ cortical columns, augmented by subcortical systems (Figure 2). The full forward pass is given in Algorithm 1.

### System Overview

The processing pipeline is:

$$
\begin{aligned}
    \mathbf{e} &= \text{BrainEmbed}(\text{tokens})  \\
    \mathbf{x} &= \mathop{\mathrm{RMSNorm}}(\mathbf{e}) + 0.1 \cdot \text{GridPos}(\mathbf{e})  \\
    \mathbf{h}_i &= \text{Column}_i\big(\text{Thal}(\mathbf{h}_{i-1}, i), \mathbf{c}^{\text{td}}_i, \sigma^2_{i-1}\big), \quad i = 0, \ldots, N{-}1  \\
    \text{logits} &= \text{BrainLMHead}\big(\mathop{\mathrm{RMSNorm}}(\text{HPC}(\text{BG}(\text{CB}(\mathbf{h}_{N-1}))))\big) 
\end{aligned}
$$

((4), (5), (6), (7))

### Brain Embedding (4-Stage Pipeline)

Token embedding follows a biologically-motivated 4-stage cascade:

1. **Base embedding**: Standard lookup $W_{\text{embed}} \in \mathbb{R}^{V \times d}$, initialized $\mathcal{N}(0, 0.02)$.
2. **Morphological composition**: Dual-route (lexical + sublexical) model inspired by Coltheart’s DRC theory. A 1D convolution (kernel=3) over embeddings captures sublexical morpheme patterns, gated against direct lexical lookup.
3. **Hub-and-spoke integration**: $S=6$ semantic “spoke” projections (each $d \rightarrow d$) combined via a central hub, modeling the anterior temporal lobe’s cross-modal binding.
4. **Sparse distributed activation**: $2\times$ expansion followed by top-2% activation (keeping only the largest 2% of activations nonzero), projecting back to $d$.

Weight tying: the LM head shares $W_{\text{embed}}$ from stage 1.

### Grid-Cell Position Encoding

Instead of RoPE (which requires attention), positions are encoded via learnable grid-cell frequencies (Hafting et al. 2005). Per-head sinusoidal signals are added (not rotated) to embeddings with a small scale factor (0.1) to avoid dominating content at initialization.

### Cortical Column

Each cortical column implements six layers, three interneuron types, working memory, oscillatory dynamics, and homeostatic regulation. The data flow is:

$$
\text{L4} \rightarrow \text{L1} \rightarrow \text{SST+VIP} \rightarrow \text{L2/3} \rightarrow \text{WM} \rightarrow \text{Osc} \rightarrow \text{PV} \rightarrow \text{L5} \rightarrow \text{L6}
$$

#### Layer 4: Thalamic Input

L4 receives routed feedforward input and projects to column-internal dimension:

$$
\mathbf{h}_{\text{L4}} = \mathop{\mathrm{RMSNorm}}(W_{\text{L4}} \mathbf{x}_{\text{in}}), \qquad W_{\text{L4}} \in \mathbb{R}^{d_{\text{col}} \times d_{\text{model}}}
$$

Initialization: if $d_{\text{col}} = d_{\text{model}}$, $W_{\text{L4}} = I$ (identity). Otherwise, Kaiming normal.

#### Layer 1: Top-Down Modulation

L1 integrates top-down context from higher columns, global workspace, and lateral connections:

$$
\mathbf{h} = \mathbf{h}_{\text{L4}} + \sigma(g_{\text{L1}}) \cdot W_{\text{L1}} \mathbf{c}_{\text{td}}, \qquad g_{\text{L1,init}} = -2.0
$$

$W_{\text{L1}}$ is initialized with Kaiming normal; $W_{\text{out,L1}} = \mathbf{0}$ (identity at init via residual).

#### Interneurons: VIP + SST (Pre-L2/3)

Applied *before* L2/3 at the apical dendrite level:

**VIP (Vasoactive Intestinal Peptide), Disinhibitory Gate:**

$$
\mathbf{v} = \sigma(g_{\text{VIP}}) \cdot \sigma\big(W_{\text{VIP,out}} \cdot \mathop{\mathrm{GELU}}(W_{\text{VIP,in}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{c}_{\text{td}}))\big)
$$

VIP reads top-down novelty signals. $W_{\text{VIP,in}} \in \mathbb{R}^{d_i \times d}$, $W_{\text{VIP,out}} \in \mathbb{R}^{d \times d_i}$, with $W_{\text{VIP,out}} = \mathbf{0}$ at init. $d_i$ is the inhibitory dimension (default: 128).

**SST (Somatostatin), Dendritic Inhibition:**

$$
\mathbf{s}_{\text{total}} = s_{\text{tonic}} + (1 - s_{\text{tonic}}) \cdot \sigma(g_{\text{SST}}) \cdot \sigma(W_{\text{SST,out}} \cdot \mathop{\mathrm{GELU}}(W_{\text{SST,in}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h})))
$$

$$
\mathbf{s}_{\text{eff}} = \mathbf{s}_{\text{total}} \cdot (1 - \mathbf{v}), \qquad \mathbf{h} \leftarrow \mathbf{h} \odot (1 - \mathbf{s}_{\text{eff}})
$$

Tonic SST ($s_{\text{tonic}} = 0.10$) provides baseline inhibition from intrinsic Na$^+$ currents. VIP disinhibits SST, allowing input through.

#### Layer 2/3: Windowed Hebbian Association

This is the core computational layer, replacing self-attention entirely. For each position $t$ and head $h \in \{1, \ldots, H\}$:

**Step 1, Content-addressable recall:**

$$
\mathbf{a}_t^h = W_{\text{assoc}}^h \cdot \mathbf{x}_t^h, \qquad W_{\text{assoc}}^h \in \mathbb{R}^{d_h \times d_h}
$$

$W_{\text{assoc}}^h$ is initialized as identity and updated by Hebbian learning (not backprop).

**Step 2, Local window context (causal):** Gather a window $[t-w, t]$ of value projections $\mathbf{v}_j^h = W_{\text{val}} \mathbf{x}_j^h$ (pad with zeros for positions before the sequence start):

$$
\mathbf{x}_{\text{win}}^h = [\mathbf{x}_{t-w}^h, \ldots, \mathbf{x}_t^h], \qquad \mathbf{v}_{\text{win}}^h = [\mathbf{v}_{t-w}^h, \ldots, \mathbf{v}_t^h]
$$

**Step 3, Distance-weighted context:**

$$
\alpha_{tj}^h = \frac{\exp\big(\mathbf{w}_{\text{dist}}^h \cdot |\mathbf{x}_t^h - \mathbf{x}_j^h|\big)}{\sum_{k=t-w}^t \exp\big(\mathbf{w}_{\text{dist}}^h \cdot |\mathbf{x}_t^h - \mathbf{x}_k^h|\big)}, \qquad \mathbf{w}_{\text{dist}}^h \in \mathbb{R}^{d_h}
$$

$\mathbf{w}_{\text{dist}}^h$ initialized at $\mathbf{0}$ (uniform weighting at init).

**Step 4, Combine and k-WTA:**

$$
\mathbf{c}_t^h = \sum_{j=t-w}^t \alpha_{tj}^h \cdot \mathbf{v}_j^h
$$

$$
\mathbf{y}_t = W_{\text{out}} \cdot \mathop{\mathrm{kWTA}}\big(\text{concat}[\mathbf{a}_t^1 + \mathbf{c}_t^1, \ldots, \mathbf{a}_t^H + \mathbf{c}_t^H]\big)
$$

$\mathop{\mathrm{kWTA}}$ retains only the top $k\%$ activations (default $k=15\%$), setting the rest to zero. This enforces sparse, competitive coding.

**Step 5, Anti-Hebbian lateral competition:**

$$
\mathbf{y}_t^h \leftarrow \mathbf{y}_t^h - W_{\text{lat}}^h \cdot \mathbf{y}_t^h, \qquad W_{\text{lat}}^h \in \mathbb{R}^{d_h \times d_h}, \quad W_{\text{lat,init}}^h = \mathbf{0}
$$

**Output:** $\mathbf{h} \leftarrow \mathbf{h} + \sigma(g_{\text{L2/3}}) \cdot \mathbf{y}$, where $W_{\text{out}}$ is initialized at $\mathbf{0}$ and $g_{\text{L2/3,init}} = -2.0$.

**Complexity:** $O(T \cdot w \cdot d)$ vs. $O(T^2 \cdot d)$ for self-attention. With $w = 16$, this is $16\times$ cheaper for $T = 256$ and $256\times$ cheaper for $T = 4096$.

**Settling:** L2/3 can iterate $S$ times (default $S=1$), re-anchoring to input each step for recurrent competitive settling.

#### Working Memory (3 Timescales)

Between L2/3 and L5, three working memory subsystems operate at different temporal scales. All are gated, identity-at-init, and maintain persistent state across sequential forward passes (state resets on batch size change).

**1. NMDA Attractor Slots** (Luck and Vogel 1997): $K=4$ competitive slots model sustained neural firing.

- Per-slot learned decay: $\alpha_k = \sigma(\beta_k)$, where $\beta_{k,\text{init}} = 6.0$ gives $\alpha \approx 0.9975$, half-life $\approx 277$ tokens.
- Write: score each slot via $\mathbf{s} = W_{\text{score}} \mathbf{h}_t \in \mathbb{R}^K$; $\mathbf{w} = \text{softmax}(\mathbf{s})$; content $= W_{\text{write}} \mathbf{h}_t \in \mathbb{R}^{d_{\text{slot}}}$; slots $\leftarrow \alpha \cdot \text{slots} + \mathbf{w} \cdot \text{content}$.
- Read: query-based attention over slots; output via $W_{\text{read}} \in \mathbb{R}^{d \times d_{\text{slot}}}$ ($W_{\text{read,init}} = \mathbf{0}$).
- Gate: $\sigma(g_{\text{NMDA}})$, $g_{\text{NMDA,init}} = -2.0$.

**2. Activity-Silent Trace** (Mongillo, Barak, and Tsodyks 2008): Tsodyks-Markram short-term plasticity.

$$
\begin{aligned}
    \text{release} &= u \cdot x  \\
    u &\leftarrow \alpha_f \cdot u + (1 - u) \cdot w_g \cdot |\text{content}|  \\
    x &\leftarrow \text{clamp}\big(\alpha_d \cdot x + (1 - \alpha_d)(1 - x) - \delta_f \cdot u \cdot x,\ 0,\ 1\big) 
\end{aligned}
$$

((20), (21), (22))

where $u$ is facilitation, $x$ is available depression variable, $\alpha_f = \sigma(\beta_f)$ with $\beta_{f,\text{init}} = 4.6$ ($\alpha_f \approx 0.990$), $\alpha_d = \sigma(\beta_d)$ with $\beta_{d,\text{init}} = 2.5$ ($\alpha_d \approx 0.924$), and $\delta_f = \sigma(\beta_\delta) \cdot 0.5$ with $\beta_{\delta,\text{init}} = -2.0$.

**3. Phonological Loop**: $K_p = 8$ circular buffer slots with decay and rehearsal.

- Passive decay: slots $\leftarrow p_{\text{decay}} \cdot \text{slots}$, $p_{\text{decay}} = \sigma(4.0) \approx 0.982$.
- Rehearsal: most recent slot strengthened by $r_{\text{str}} = \sigma(-1.0) \approx 0.27$.
- Circular write: write pointer advances modulo $K_p$.
- Read: query-based attention $\rightarrow W_{\text{read}} \in \mathbb{R}^{d \times d_p}$ ($W_{\text{read,init}} = \mathbf{0}$).

#### Oscillatory Dynamics (Nested PAC)

Cross-frequency phase-amplitude coupling (Buzsáki and Draguhn 2004; Jensen and Colgin 2007):

$$
A_\gamma(t) = 1 + \kappa_1 \cos\phi_\theta(t) + \kappa_2 \cos\phi_\delta(t) - \kappa_3 \frac{1 + \cos\phi_\alpha(t)}{2}
$$

((23))

where phases are computed from learnable periods:

$$
\phi_b(t) = \frac{2\pi t}{\mathop{\mathrm{softplus}}(P_b^{\text{raw}})}, \qquad b \in \{\theta, \alpha, \delta\}
$$

Default period initializations: $P_\theta = 8$, $P_\alpha = 20$, $P_\delta = 64$ tokens. Coupling strengths: $\kappa_1 = \tanh(\kappa_1^{\text{raw}})$ initialized at 0.3 (theta-gamma present at rest), $\kappa_2, \kappa_3$ initialized at 0.0.

Phase-content interaction through rank-reduced projection ($r=32$):

$$
\text{modulation} = W_{\text{out}} \cdot \tanh\big(W_{\text{content}} \mathbf{h} + W_{\text{phase}} [\sin\phi_\theta, \cos\phi_\theta, \sin\phi_\alpha, \cos\phi_\alpha, \sin\phi_\delta, \cos\phi_\delta]\big)
$$

Output: $\mathbf{h} \leftarrow \mathbf{h} + \sigma(g_{\text{osc}}) \cdot A_\gamma \cdot \text{modulation}$. $W_{\text{out}}$ initialized $\mathcal{N}(0, 0.01)$ (small nonzero: oscillations provide signal from the start).

#### Interneurons: PV/Chandelier (Post-Computation)

Applied *after* working memory and oscillations, *before* L5:

$$
p_{\text{pass}} = \sigma\big(W_{\text{PV,score}} \cdot \mathop{\mathrm{GELU}}(W_{\text{PV,in}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}))\big)
$$

Hard gate with straight-through estimator: $\hat{p} = \mathbb{1}[p > 0.5] - p_{\text{detach}} + p$. $W_{\text{PV,score}}$ bias initialized at 5.0 (nearly always open at init). Output:

$$
\mathbf{h} \leftarrow \mathbf{h} \odot \big((1 - \sigma(g_{\text{PV}})) + \sigma(g_{\text{PV}}) \cdot \hat{p}\big)
$$

#### Layer 5: Dendritic FFN + Prediction

Two-compartment dendritic computation with gated linear unit and k-WTA sparsity:

$$
\begin{aligned}
    \mathbf{h}_{\text{basal}} &= \mathop{\mathrm{RMSNorm}}(\mathbf{h}) \\
    \mathbf{h}_{\text{apical}} &= \mathbf{h}_{\text{L4}} + (\mathbf{c}_{\text{td}} \text{ if available}) \\
    \mathbf{f} &= \mathop{\mathrm{GELU}}(W_{\text{up}} \mathbf{h}_{\text{basal}} + W_{\text{gate}} \mathbf{h}_{\text{basal}} \odot W_{\text{apical}} \mathbf{h}_{\text{apical}}) \\
    \mathbf{y}_{\text{L5}} &= W_{\text{out}} \cdot \mathop{\mathrm{kWTA}}(\mathbf{f})
\end{aligned}
$$

$W_{\text{up}}, W_{\text{gate}} \in \mathbb{R}^{d_{\text{ff}} \times d}$, $W_{\text{apical}} \in \mathbb{R}^{d_{\text{ff}} \times d}$, $W_{\text{out}} \in \mathbb{R}^{d \times d_{\text{ff}}}$ initialized at $\mathbf{0}$.

Prediction head for top-down PC signal:

$$
\hat{\mathbf{x}}_{i-1} = W_{\text{pred}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_{\text{L5}})
$$

Precision output ($\sigma^2$):

$$
\sigma^2 = \mathop{\mathrm{softplus}}\big(W_\sigma \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_{\text{L5}}) + b_\sigma\big), \qquad b_{\sigma,\text{init}} = \log(e^{\sigma^2_{\text{init}}} - 1)
$$

where $\sigma^2_{\text{init}} = 1.0$.

#### Layer 6: Thalamic Feedback

$$
\mathbf{f}_{\text{thal}} = \sigma(g_{\text{L6}}) \cdot W_{\text{L6,out}} \cdot \mathop{\mathrm{GELU}}(W_{\text{L6,in}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}))
$$

$W_{\text{L6,out}}$ initialized at $\mathbf{0}$. This feedback modulates the thalamic relay for the next input.

#### BCM Homeostasis

Per-column sliding threshold (Bienenstock, Cooper, and Munro 1982):

$$
\theta_{\text{BCM}} \leftarrow (1 - \tfrac{1}{\tau_{\text{BCM}}}) \cdot \theta_{\text{BCM}} + \tfrac{1}{\tau_{\text{BCM}}} \cdot \overline{y^2}
$$

where $\overline{y^2}$ is the mean squared postsynaptic activity and $\tau_{\text{BCM}} = 1000$. The Hebbian update is modulated: potentiation when $y > \theta_{\text{BCM}}$, depression when $y < \theta_{\text{BCM}}$.

#### Metaplasticity

Plasticity of plasticity (Abraham and Bear 1996): a slow EMA ($\tau = 500$) tracks recent weight change magnitude. Learning rate multiplier: $\text{LR}_{\text{eff}} = \eta / (1 + \text{plasticity\_ema})$.

#### Column Output

The column returns: output $\mathbf{h}_{\text{out}}$ (to next column), prediction $\hat{\mathbf{x}}_{i-1}$ (for PC), thalamic feedback $\mathbf{f}_{\text{thal}}$, internal state, precision $\sigma^2$, L2/3 input and output (for Hebbian update).

Residual connection: $\mathbf{h}_{\text{out}} = \mathbf{x}_{\text{in}} + \mathbf{y}_{\text{L5}}$ (or $W_{\text{residual}} \mathbf{x}_{\text{in}} + \mathbf{y}_{\text{L5}}$ if $d_{\text{col}} \neq d_{\text{model}}$).

### Subcortical Systems

#### Thalamus + TRN

$G$ relay groups (default $G = \lceil N/3 \rceil$) each containing:

$$
\text{relay}(\mathbf{x}) = \mathbf{x} + \sigma(g_r) \cdot r_{\text{TRN}} \cdot W_{\text{out}} \mathop{\mathrm{GELU}}(W_{\text{in}} \mathop{\mathrm{RMSNorm}}(\mathbf{x}))
$$

Column $i$ maps to relay group $\lfloor i / (N/G) \rfloor$. L6 feedback modulates: relay $+= 0.1 \cdot \mathbf{f}_{\text{thal}}$.

TRN implements reticular gating via a low-rank ($r_{\text{TRN}} = d_{\text{trn}}$, default 24) gate:

$$
r_{\text{TRN}} = \sigma\big(W_{\text{trn,out}} \cdot \tanh(W_{\text{trn,in}} \cdot [\mathbf{x}; \text{relay\_delta}])\big)
$$

Bimodality loss encourages binary gating: $\mathcal{L}_{\text{TRN}} = r(1-r)$.

#### Hippocampus

Three-stage processing:

- **Dentate Gyrus**: Sparse expansion $d \rightarrow d_{\text{sparse}}$ (default $4d$) with ReLU. Pattern separation via high expansion ratio.
- **CA3**: $W_{\text{CA3}} \in \mathbb{R}^{d_{\text{sparse}} \times d_{\text{sparse}}}$ autoassociative memory for pattern completion.
- **CA1**: $W_{\text{CA1}} \in \mathbb{R}^{d \times d_{\text{sparse}}}$ projects back to cortical stream.

Gated output added to stream. Episodic encoding: during training, episodes where $\|\boldsymbol{\epsilon}\| / \sigma^2$ exceeds $\theta_{\text{surprise}}$ (default 0.5) are stored in a circular buffer (max 2048 memories). Decay: $\sigma(4.95) \approx 0.993$.

#### Basal Ganglia

D1/D2 receptor pathways with inverted-U dopamine response:

$$
\text{D1}(\text{DA}) = \sigma\big(\text{slope}_1 \cdot (\text{DA} - \text{EC50}_1)\big), \qquad \text{EC50}_1 = 0.65, \quad \text{slope}_1 = 8.0
$$

$$
\text{D2}(\text{DA}) = \sigma\big(\text{slope}_2 \cdot (\text{DA} - \text{EC50}_2)\big), \qquad \text{EC50}_2 = 0.25, \quad \text{slope}_2 = 8.0
$$

Direct pathway (Go): $\mathbf{d}_1 = \text{D1} \cdot W_{\text{go}} \mathbf{h}$. Indirect pathway (NoGo): $\mathbf{d}_2 = \text{D2} \cdot W_{\text{nogo}} \mathbf{h}$. Output: $\mathbf{h}_{\text{BG}} = \mathbf{h} + \sigma(g_{\text{BG}}) \cdot (\mathbf{d}_1 - \mathbf{d}_2)$.

#### Cerebellum

Forward model predicting next hidden state:

$$
\hat{\mathbf{h}}_{t+1} = W_{\text{cb,out}} \cdot \mathop{\mathrm{GELU}}(W_{\text{cb,in}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_t))
$$

Prediction error provides auxiliary loss: $\mathcal{L}_{\text{CB}} = \|\mathbf{h}_t - \hat{\mathbf{h}}_t\|^2$.

#### Brainstem (Neuromodulation)

Computes four neuromodulatory signals from the top column’s output:

$$
\begin{aligned}
    \text{DA} &= \sigma(W_{\text{da}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_{\text{top}})) \quad & \text{(reward prediction error)} \\
    \text{NE} &= \sigma(W_{\text{ne}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_{\text{top}})) \quad & \text{(arousal/exploration)} \\
    \text{5-HT} &= \sigma(W_{\text{5ht}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_{\text{top}})) \quad & \text{(time horizon)} \\
    \text{ACh} &= \sigma(W_{\text{ach}} \cdot \mathop{\mathrm{RMSNorm}}(\mathbf{h}_{\text{top}})) \quad & \text{(attention/plasticity gate)}
\end{aligned}
$$

Each is a scalar or low-dimensional vector. Tonic DA is tracked as an EMA ($\alpha = 0.999$) for baseline subtraction.

#### Global Workspace

Following Baars (1988; Dehaene and Naccache 2001), columns compete for broadcast:

$$
w_i = \frac{\exp(\|\boldsymbol{\epsilon}_i\| / \tau)}{\sum_j \exp(\|\boldsymbol{\epsilon}_j\| / \tau)}, \qquad \mathbf{b} = \sum_i w_i \cdot W_{\text{write},i} \cdot \mathbf{h}_i
$$

Broadcast read per column: $\mathbf{c}_i^{\text{ws}} = W_{\text{read},i} \cdot \mathbf{b}$. Added to L1 top-down context on the next PC iteration. $W_{\text{write},i}$ initialized at $\mathbf{0}$ (no broadcast at init). Bottleneck dimension: $d_{\text{ws}} = d/4$.

#### Self-Assessment (Metacognition)

ACC-like conflict monitor computes column disagreement:

$$
\text{conflict} = \text{Var}(\{\mathbf{h}_0, \ldots, \mathbf{h}_{N-1}\})
$$

High conflict $\rightarrow$ allocate more PC inference steps (up to $+2$ extra, capped). This implements metacognitive “thinking harder when uncertain.”

#### Brain LM Head

Instead of a standard linear projection, the LM head implements:

- Low-rank weight-tied projection ($W_{\text{embed}}$ from stage 1) with learned production delta (rank 32).
- WEAVER++ competition (rank 64) for lexical selection.
- Log-frequency bias for common words.

![Internal structure of a single cortical column showing the complete data flow from L4 input through all six layers, interneurons, working memory, and oscillatory dynamics. All modules are gated and identity-at-init.](<https://verace.in/research/nct-cortical-column-network/figures/figure-1.webp>)

Figure 1: Internal structure of a single cortical column showing the complete data flow from L4 input through all six layers, interneurons, working memory, and oscillatory dynamics. All modules are gated and identity-at-init.

## 5. Local Learning Framework

### Predictive Coding Update

Each column $i$ updates weights to minimize its prediction error weighted by precision:

$$
\Delta \theta_i = -\eta_{\text{PC}} \cdot \frac{1}{\sigma_i^2} \cdot \boldsymbol{\epsilon}_i \cdot \frac{\partial \hat{\mathbf{x}}_i}{\partial \theta_i}
$$

PC inference iterations (up to $K_{\max} + K_{\text{extra}}$) run **without gradients** (biologically correct: neural settling is dynamical relaxation, not gradient descent). Only the final state is used for weight updates. This saves $O(N \cdot K)$ activation memory.

Convergence criterion (relative): stop when $\frac{|\|\boldsymbol{\epsilon}^{(k)}\|^2 - \|\boldsymbol{\epsilon}^{(k-1)}\|^2|}{\|\boldsymbol{\epsilon}^{(k-1)}\|^2 + 10^{-8}} < \tau_{\text{conv}}$.

### Hebbian Update

L2/3 $W_{\text{assoc}}$ updated per Section 4.4.4. BCM threshold modulates (Section 4.4.10). Metaplasticity adjusts effective LR (Section 4.4.11).

### Output Correction

In PC and Hebbian training modes, only the LM head receives an analytical output correction:

$$
\Delta W_{\text{LM}} = -\eta_{\text{out}} \cdot \nabla_{W_{\text{LM}}} \mathcal{L}_{\text{NTP}}, \qquad \eta_{\text{out}} = 100 \times \eta_{\text{base}}
$$

with gradient clipping at $\|\mathbf{g}\|_{\max} = 1.0$. This is the *only* component that uses backpropagated gradients, and it affects only the final projection layer (not the column hierarchy).

### Training Modes

| **Mode** | **Learning Rule** | **NTP Backprop** | **Use Case** |
| --- | --- | --- | --- |
| `hebbian` | Hebbian only | None | Purest biological |
| `predictive_coding` | Local PC errors | None$^*$ | Brain-like |
| `hybrid` | PC + Hebbian + analytical NTP | LM head only | Best performance |
| `backprop` | Standard | Full global | Baseline comparison |
| $^*$Analytical LM head correction only. |  |  |  |

Table: Table 2: Available training modes.

## 6. Prenatal Self-Organization

Before processing any external data, NCT bootstraps itself through spontaneous activity, mirroring prenatal brain development. Four activity patterns run for $S_{\text{prenatal}}$ steps (default 500):

1. **Spontaneous waves (30%)**: Momentum random walk in embedding space (Meister et al. 1991). Simulates retinal waves that establish initial connectivity patterns.
2. **Motor babbling (25%)**: Auto-regressive self-generation (capped at 16 tokens for memory). The model generates from its own predictions, learning basic sequential structure.
3. **Competitive differentiation (25%)**: Structured patterns (e.g., one-hot, gradient) force columns to specialize through competitive Hebbian learning.
4. **Oscillatory calibration (20%)**: Multi-frequency input with PAC (Khazipov and Luhmann 2006). Calibrates the oscillatory periods and coupling strengths.

Prenatal mixing: each step randomly selects a pattern type with the probabilities above. The prenatal phase establishes initial column differentiation before any data-driven learning.

## 7. Experimental Setup

| **Category** | **Parameter** | **Value** |
| --- | --- | --- |
| **Core** | $d_{\text{model}} = d_{\text{col}}$ | 768 |
|  | $N$ (columns) | 16 |
|  | $d_{\text{ff}}$ | 3,072 |
|  | $V$ (vocab) | 13,817 |
|  | $T_{\max}$ (max seq len) | 1,024 |
|  | Association heads ($H$) | 12 |
| **L2/3** | Window $w$ | 16 |
|  | $k$-WTA ratio | 0.15 |
|  | Hebbian LR ($\eta_H$) | $1 \times 10^{-4}$ |
|  | Settling steps ($S$) | 1 |
|  | Assoc. dropout | 0.1 |
| **PC** | PC min steps | 2 |
|  | PC max steps ($K_{\max}$) | 5 |
|  | Convergence $\tau_{\text{conv}}$ | 0.01 |
|  | $\sigma^2_{\text{init}}$ | 1.0 |
|  | PC LR ($\eta_{\text{PC}}$) | $3 \times 10^{-4}$ |
| **WM** | NMDA slots ($K$) | 4 |
|  | NMDA $d_{\text{slot}}$ | 80 |
|  | NMDA decay init ($\beta$) | 6.0 |
|  | Silent $d_{\text{trace}}$ | 80 |
|  | Phono slots ($K_p$) | 8 |
| **Intern.** | $d_{\text{inhibitory}}$ | 192 |
|  | PV bias init | 5.0 |
|  | SST tonic | 0.10 |
| **Osc.** | $P_\theta$ init | 8 |
|  | $P_\alpha$ init | 20 |
|  | $P_\delta$ init | 64 |
|  | $\kappa_1$ init | 0.3 |
|  | $\kappa_2, \kappa_3$ init | 0.0 |
| **Thal.** | Relay groups ($G$) | 4 |
|  | $d_{\text{relay}}$ | 384 |
|  | $d_{\text{trn}}$ | 28 |
|  | TRN bimodality weight | 1.0 |
| **HPC** | $d_{\text{sparse}}$ | 3,072 |
|  | Memory capacity | 4,096 |
|  | Surprise $\theta$ | 0.5 |
| **CB** | $d_{\text{cerebellar}}$ | 384 |
|  | $d_{\text{bg}}$ | 192 |
|  | D1 EC50 / slope | 0.65 / 8.0 |
|  | D2 EC50 / slope | 0.25 / 8.0 |
| **Sleep** | Sleep interval | 100 steps |
|  | Replay steps | 50 |
|  | Downscale factor | 0.99 |
|  | Replay priority | surprise |
| **Structural** | Growth threshold | 2.0 |
|  | Prune threshold | 0.01 |
|  | Prune interval | 1,000 |
| **Training** | Base LR ($\eta$) | $3 \times 10^{-4}$ |
|  | Batch size | 4 |
|  | Sequence length | 256 |
|  | Dropout | 0.1 |
|  | Weight decay | 0.01 |
| **Gates** | $g_0$ (all gates) | $-2.0$ |
|  | Gate LR multiplier | 20$\times$ |
|  | Max grad norm | 1.0 |
| **BCM** | $\tau_{\text{BCM}}$ | 1,000 |
|  | Metaplasticity $\tau$ | 500 |

Table: Table 3: Complete hyperparameter specification for the laptop preset (300M parameters).

#### Dataset.

WikiText-2 (Merity et al. 2016) with the NCT morphological tokenizer ($V = 13{,}817$ tokens, dual-route Coltheart DRC design). 23.3% of training data seen (0.23 epochs) over 5,000 steps.

#### Hardware.

NVIDIA RTX 4050 Laptop (6GB VRAM), PyTorch, bfloat16. Training: ${\sim}14$ hours. Evaluation: 571,136 tokens, 2,231 steps, 2.4 hours.

#### Training Configuration.

Predictive coding mode: local PC + analytical LM head correction ($100\times$ LR). Zero backprop through columns. 500 prenatal steps. Wake-sleep every 100 steps.

## 8. Results and Analysis

### Main Results

| **Model** | **Val Loss** | **Val PPL $\downarrow$** | **Backprop** | **Continuous** |  |
| --- | --- | --- | --- | --- | --- |
| Random baseline | 9.53 | 13,817 | – | – |  |
| NCT (Hebbian) | – | 25,680$^\dagger$ | None | Yes |  |
| **NCT (PC)** | **3.99** | **54.0** | None$^*$ | **Yes** |  |
| $^\dagger$Best training PPL at 2,230 steps. $^*$Analytical LM head correction only. |  |  |  |  |  |

Table: Table 4: Main results on WikiText-2 validation.

NCT achieves validation perplexity **54.0** ($256\times$ over random). Training loss: $14.60 \rightarrow 3.97$ ($-72.8\%$). PC loss: $9.43 \rightarrow 6.22$ ($-32.6\%$). Best training loss reached 3.07 (PPL 21.6).

### Training Dynamics

| **Metric** | **Step 1** | **Step 5,000** | **Change** |
| --- | --- | --- | --- |
| Train loss | 14.60 | 3.97 | $-72.8\%$ |
| Train PPL | 2,181,724 | 52.9 | $-99.998\%$ |
| PC loss | 9.43 | 6.36 | $-32.6\%$ |
| $\sigma^2$ (precision) | 0.77 | 1.88 | $+144\%$ |
| Best train loss | – | 3.07 | – |
| HPC memories | 0 | 2 | – |
| Dream phases | 0 | 150 | – |

Table: Table 5: Training metrics evolution over 5,000 steps.

#### Precision Self-Calibration.

$\sigma^2$ evolved from 1.0 (init) to 1.88, confirming PWPC self-calibration. The system learned that its predictions are becoming more reliable.

#### Train/Val Gap.

Best train loss 3.07 vs. validation 3.99 (gap 0.92) indicates effective regularization via sleep downscaling and sparse activation, despite training on only 23% of a small dataset.

#### Wake-Sleep.

150 dream phases completed. HPC accumulated only 2 memories, suggesting the surprise threshold ($\theta = 0.5$) may be too conservative.

### Generation Quality

| **Prompt** | **Generated continuation** |
| --- | --- |
| “The” | The alanosterunicabicort The . , A of Love the In It the United Re of In |
| “In the beginning” | In the beginning The A ) . of He a with . the In United Ir of on ( |
| “Scientists discovered that” | Scientists discovered that In the on of A .The , A reitestanom with Love |
| “The city of” | The city of The A , of in United . The to Stelianoderucatis Love a , ( |
| “Once upon a time” | Once upon a time Ataseronibittticon of the A with In The , De Aft A re |

Table: Table 6: Generation samples (greedy decoding, 20 tokens).

The model has learned unigram frequency distributions (“the,” “of,” “in,” “a” dominate) but not sequential structure. This is expected: L2/3 Hebbian associations require many more token-transition observations, and only 23% of WikiText-2 has been seen. Morpheme fragments (e.g., “alanosterunicabicort”) indicate the sublexical route producing ill-formed compositions for rare unseen tokens.

### Parameter Locality

| **Component** | **Parameters** | **%** |
| --- | --- | --- |
| Column-local (16 columns) | 253.4M | 84.3% |
| Global coordination (thal + lateral + workspace) | 9.7M | 3.2% |
| Fixed (embedding + LM head + position) | 25.9M | 8.6% |
| Subcortical (HPC + BG + CB + brainstem) | 11.6M | 3.9% |
| **Total** | **300.1M** | **100%** |

Table: Table 7: Parameter distribution by component (300M model).

84.3% of parameters are column-local, updated only by local learning rules. This modularity directly enables the scaling framework (Section 9).

## 9. Scaling Framework

The locality of NCT’s learning rules enables scaling unavailable to transformers.

#### Progressive Column Growth.

New columns are added: existing column weights (84.3%) preserved. Only thalamic routing, lateral connections, and workspace projections (3.2%) require retraining. New columns undergo prenatal self-organization. Cost: ${\sim}8\%$ of full retrain per column.

#### Column Splitting.

Overloaded columns are split into two function-preserving copies ($W_{\text{out}} \times 0.5$ each), then diverge via competitive Hebbian learning. Cost: ${\sim}7\%$ per split.

#### $\mu$P Hyperparameter Transfer.

Hyperparameters validated on a small model (learning rates, plasticity rates, oscillatory periods, gate init) transfer to larger models (Yang et al. 2021). NCT’s local learning rules are particularly amenable: each column’s dynamics are scale-independent.

#### Width Expansion.

$d_{\text{model}}$ increase: old subspace warm-started, new dimensions initialized near zero. Most expensive scaling operation (${\sim}70\%$ of full retrain).

#### Recommended Scaling Path.

*Small incremental:* column growth/splitting. *Large jumps ($>2\times$):* $\mu$P + train from scratch at target scale.

## 10. Disease-Mapping Methodology

NCT’s architecture was developed using neurological disorders as natural ablation studies. For each brain disease, we identify: (1) the missing/damaged mechanism, (2) the resulting computational deficit, and (3) the NCT module that implements the healthy mechanism. This provides systematic coverage guarantees unavailable to engineering-driven architecture search.

| **Disease** | **Missing Mechanism** | **NCT Module** |
| --- | --- | --- |
| Vegetative state | No global broadcast | GlobalWorkspace |
| Parkinson’s | No DA prediction error | Brainstem (DA) + BG |
| ADHD | No NE arousal control | Brainstem (NE) |
| Depression | No 5-HT time horizon | Brainstem (5-HT) |
| Broca’s aphasia | No re-entrant processing | PC inference iterations |
| Schizophrenia (CFC) | Broken cross-column coupling | LateralColumnConn. |
| Schizophrenia (NMDA) | No persistent WM | NMDA attractor slots |
| Schizophrenia (PAC) | No phase-amplitude coupling | ColumnOscillations |
| Alzheimer’s (ACh) | Inverted attention gain | Brainstem (ACh) |
| Amnesia (HM) | No episodic binding | Hippocampus |
| Semantic dementia | No consolidation | Wake-Sleep cycle |
| Spinocerebellar ataxia | No temporal prediction | Cerebellum |
| Huntington’s | No action selection | BasalGanglia (D1/D2) |
| Thalamic infarct | No frequency routing | Thalamus + TRN |
| Temporal lobe epilepsy | No phase precession | ColumnOscillations |
| Phonological dyslexia | No rehearsal buffer | PhonologicalLoop |
| Autism (ASD) | No VIP disinhibition | VIP interneuron |
| OCD | No conflict monitoring | SelfAssessment (ACC) |
| Epilepsy (chandelier) | No axo-axonic veto | PV/Chandelier |
| Fragile X | No metaplasticity | Metaplasticity |
| Alzheimer’s (entorhinal) | No grid cells | GridCellPositionEnc. |
| Anomic aphasia | No production delta | BrainLMHead |
| Parkinson’s (decision) | DA-depleted threshold | DriftDiffusion |

Table: Table 8: Disease-to-mechanism mapping (complete). Each row represents a brain disease, the mechanism it ablates, and the corresponding NCT module.

## 11. Conclusion

We presented the NeuroCortex Transformer (NCT), a cortical column network that replaces transformer blocks with biologically-grounded six-layer columns trained through local predictive coding and Hebbian plasticity. A 300M-parameter NCT achieves validation perplexity 54.0 on WikiText-2 with zero backpropagation through its column hierarchy, a $256\times$ improvement over random baseline. The prediction precision system self-calibrates ($\sigma^2$: $1.0 \rightarrow 1.88$), wake-sleep consolidation operates autonomously (150 dream phases), and 84.3% of parameters are column-local, enabling incremental scaling.

These results establish that local predictive coding can learn meaningful language representations without global gradient propagation. The current gap to transformer-level perplexity reflects data starvation (23% of a small dataset) rather than architectural limitation.

#### Future Work.

- **Full-data training:** Train to convergence on WikiText-103 (${\sim}100$M tokens), targeting PPL $<$ 25.
- **Ablation study:** Systematically remove each mechanism (VIP, SST, PV, WM, oscillations, HPC, sleep) and measure impact.
- **Transformer baseline:** Train a same-size transformer on the same data for fair comparison.
- **Progressive scaling:** Grow from 16 $\rightarrow$ 32 columns via `v11_scale.py`, validating $\mu$P transfer.
- **Continuous learning:** Evaluate whether deployed NCT improves from user interactions without retraining.
- **Multi-modal:** Dedicate columns to vision/audio via thalamic routing.

#### Reproducibility.

All architectural specifications, hyperparameters, initialization values, and algorithms in this paper are complete and self-contained. The codebase is available at [https://github.com/krrish/NeuroCortex-Transformer](https://github.com/krrish/NeuroCortex-Transformer).

## 12. Forward Pass Algorithm

![Algorithm 1: NCT Forward Pass](<https://verace.in/research/nct-cortical-column-network/figures/algorithm-1.webp>)

Algorithm 1: NCT Forward Pass

## 13. RMSNorm

Used throughout instead of LayerNorm:

$$
\mathop{\mathrm{RMSNorm}}(\mathbf{x}) = \frac{\mathbf{x}}{\sqrt{\frac{1}{d}\sum_{i=1}^d x_i^2 + \epsilon}} \cdot \boldsymbol{\gamma}, \qquad \epsilon = 10^{-6}, \quad \boldsymbol{\gamma}_{\text{init}} = \mathbf{1}
$$

## 14. Presets

| **Preset** | $d_{\text{model}}$ | $N$ | $d_{\text{ff}}$ | $H$ | **Params** | **VRAM** |
| --- | --- | --- | --- | --- | --- | --- |
| default | 512 | 12 | 2,048 | 8 | 106M | ${\sim}$2 GB |
| laptop | 768 | 16 | 3,072 | 12 | 300M | ${\sim}$5 GB |
| 1b | 1,280 | 20 | 5,120 | 20 | 1,008M | ${\sim}$10 GB |

Table: Table 9: Available model presets.

## 15. Brain Embedding: Complete Specification

### Stage 1: Base Embedding

Standard lookup: $\mathbf{e} = W_{\text{embed}}[\text{token\_id}]$, $W_{\text{embed}} \in \mathbb{R}^{V \times d}$, $V = 13{,}817$. Init: $\mathcal{N}(0, 0.02)$.

### Stage 2: Morphological Composition (Dual-Route DRC)

The Coltheart Dual-Route Cascaded model: a **lexical route** (direct embedding lookup) competes with a **sublexical route** (character/morpheme composition).

**Sublexical route:** 1D convolution over embedding sequence:

$$
\mathbf{s} = \text{Conv1D}(\mathbf{e}, \text{kernel}=3, \text{padding}=1), \qquad W_{\text{conv}} \in \mathbb{R}^{d \times d \times 3}
$$

**Gated combination:**

$$
g_{\text{morph}} = \sigma(W_g \mathbf{e} + b_g), \qquad \mathbf{e}' = g_{\text{morph}} \odot \mathbf{e} + (1 - g_{\text{morph}}) \odot \mathbf{s}
$$

At init: $b_g = 2.0$ so $g \approx 0.88$ (lexical route dominates initially).

### Stage 3: Hub-and-Spoke Integration

Models the anterior temporal lobe’s role as a semantic hub binding $S=6$ modality-specific spokes:

$$
\mathbf{h}_s = W_s \mathbf{e}' + b_s, \qquad s = 1, \ldots, S
$$

$$
\mathbf{h}_{\text{hub}} = W_{\text{hub}} \cdot \frac{1}{S}\sum_{s=1}^S \mathbf{h}_s
$$

$$
\mathbf{e}'' = \mathbf{e}' + \sigma(g_{\text{hub}}) \cdot \mathbf{h}_{\text{hub}}, \qquad g_{\text{hub,init}} = -2.0
$$

Each spoke $W_s \in \mathbb{R}^{d \times d}$. Hub $W_{\text{hub}} \in \mathbb{R}^{d \times d}$.

### Stage 4: Sparse Distributed Activation

Neocortical-style sparse coding:

$$
\mathbf{a} = W_{\text{up}} \mathbf{e}'' \in \mathbb{R}^{2d}, \qquad \hat{\mathbf{a}} = \text{TopK}(\mathbf{a}, k = \lfloor 0.02 \times 2d \rfloor)
$$

$$
\mathbf{e}''' = \mathbf{e}'' + \sigma(g_{\text{sparse}}) \cdot W_{\text{down}} \hat{\mathbf{a}}, \qquad W_{\text{down}} \in \mathbb{R}^{d \times 2d}
$$

$W_{\text{down}}$ initialized at $\mathbf{0}$; $g_{\text{sparse,init}} = -2.0$. Only 2% of expanded activations survive, extreme sparsity matching biological neural firing rates.

## 16. Grid Cell Position Encoding

Inspired by entorhinal grid cells (Hafting et al. 2005). Per-head learnable frequencies replace RoPE (which requires dot-product attention).

For each head $h \in \{1, \ldots, H\}$ and position dimension $j \in \{1, \ldots, d_h/2\}$:

$$
f_{h,j} = \mathop{\mathrm{softplus}}(\omega_{h,j}^{\text{raw}}), \qquad \omega_{h,j,\text{init}}^{\text{raw}} = \log(e^{1/(10000^{2j/d_h})} - 1)
$$

$$
\phi_{h,j}(t) = 2\pi \cdot f_{h,j} \cdot t
$$

Output: $[\cos(\phi_{h,j}(t)), \sin(\phi_{h,j}(t))]$ concatenated across $j$, producing $[H, T, d_h]$.

Per-head scale and boundary remapping:

$$
\mathbf{p}_{h,t} = s_h \cdot [\cos\phi_{h,:}(t); \sin\phi_{h,:}(t)] + \mathbf{b}_h
$$

$s_h$ (scale, init 1.0) and $\mathbf{b}_h$ (boundary, init $\mathbf{0}$) are learnable per head.

Position is added (not rotated) to embeddings: $\mathbf{x} \leftarrow \mathbf{x} + 0.1 \cdot \text{mean}_h(\mathbf{p}_{h,:})$. The 0.1 scale prevents position from dominating content at init.

## 17. Brain LM Head: Lexical Production

Replaces a standard linear projection with a neurologically-grounded 3-component system:

**1. Weight-tied base projection:**

$$
\text{logits}_{\text{base}} = W_{\text{embed}}^\top \mathbf{h} \in \mathbb{R}^V
$$

**2. Production delta (low-rank residual):**

$$
\text{logits}_{\text{delta}} = W_B (W_A \mathbf{h}), \qquad W_A \in \mathbb{R}^{r \times d}, W_B \in \mathbb{R}^{V \times r}, r = 32
$$

Models the production-specific deviation from comprehension semantics. $W_B$ init $\mathcal{N}(0, 0.01)$.

**3. WEAVER++ competition (lexical selection):**

$$
\mathbf{c} = W_D (W_C \mathbf{h}), \qquad W_C \in \mathbb{R}^{r_c \times d}, W_D \in \mathbb{R}^{V \times r_c}, r_c = 64
$$

Applied as multiplicative gate: $\text{logits}_{\text{comp}} = \sigma(\mathbf{c}) \odot \text{logits}_{\text{base}}$. Models lemma-to-phonological form selection.

**4. Frequency bias:**

$$
\text{logits} = \text{logits}_{\text{comp}} + \text{logits}_{\text{delta}} + \mathbf{b}_{\text{freq}}
$$

$\mathbf{b}_{\text{freq}} \in \mathbb{R}^V$ initialized at $\mathbf{0}$, learns log-frequency priors.

## 18. Lateral Column Connections

Horizontal connections between adjacent columns (disease mapping: schizophrenia disconnection syndrome $\rightarrow$ disrupted lateral $\rightarrow$ fragmented perception).

Each column $i$ has send/receive projections to neighbors $i \pm 1$:

$$
\mathbf{m}_{j \rightarrow i} = W_{\text{send},j} \cdot \mathbf{h}_j, \qquad W_{\text{send},j} \in \mathbb{R}^{r \times d}, r = \max(d/8, 32)
$$

$$
\mathbf{l}_i = \sigma(g_{\text{lat},i}) \cdot W_{\text{recv},i} \cdot \frac{1}{|\mathcal{N}(i)|}\sum_{j \in \mathcal{N}(i)} \mathbf{m}_{j \rightarrow i}
$$

where $\mathcal{N}(i)$ is the set of neighbors ($i-1$ and/or $i+1$). $W_{\text{send}}$ initialized at $\mathbf{0}$ (no lateral communication at init). $W_{\text{recv}}$ initialized $\mathcal{N}(0, 0.01)$. Gate $g_{\text{lat},i,\text{init}} = -2.0$.

## 19. Autonomous Operation

### Always-On Learning

The brain has no `eval()` mode. After every forward pass, local learning updates run:

$$
\eta_{\text{eff}} = \eta_{\text{base}} \cdot \text{ACh} \cdot (1 + \text{NE}) \cdot \text{surprise\_scale} \cdot (1 - \text{sleep\_pressure})
$$

Sleep pressure accumulates during wake ($+\delta$ per step) and resets during sleep.

### Wake-Sleep Cycle Algorithm

![Algorithm 2: Wake-Sleep Cycle](<https://verace.in/research/nct-cortical-column-network/figures/algorithm-2.webp>)

Algorithm 2: Wake-Sleep Cycle

### Prenatal Self-Organization Algorithm

![Algorithm 3: Prenatal Development](<https://verace.in/research/nct-cortical-column-network/figures/algorithm-3.webp>)

Algorithm 3: Prenatal Development

### Imagination Engine

Generates synthetic experiences from memory for offline learning:

1. Retrieve a hippocampal memory as seed
2. Auto-regressively generate a continuation (up to 16 tokens)
3. Evaluate the imagined sequence: compute prediction error
4. If PE is high (novel imagination), tag for additional replay

This enables “dreaming”, learning from imagined scenarios, not just replayed experiences.

### Curiosity Drive

Expected free energy minimization (Friston 2010):

$$
\text{curiosity}(\mathbf{x}) = \mathbb{E}[\text{information\_gain}(\mathbf{x})] = H[\sigma^2] - \mathbb{E}[H[\sigma^2 | \mathbf{x}]]
$$

Inputs that would maximally reduce prediction uncertainty are prioritized. This drives the system to seek informative inputs, implementing intrinsic motivation.

### Continual Learning Guard (EWC)

Elastic Weight Consolidation protects important weights from catastrophic forgetting:

$$
\mathcal{L}_{\text{EWC}} = \sum_i \frac{\lambda}{2} F_i (\theta_i - \theta_i^*)^2
$$

where $F_i$ is the Fisher information (importance) of parameter $i$ and $\theta_i^*$ is the optimal value from previous tasks. **Note:** Currently disabled in the 6GB VRAM configuration due to memory constraints. Requires memory-efficient Fisher estimation for deployment.

### Self-Play: Learning from Own Output

The brain processes its own speech (auditory cortex hears you speak), creating a feedback loop. NCT implements this as self-play:

1. Generate a continuation from a prompt ($\leq 32$ tokens, brain-decoded)
2. Feed the generation BACK through the model as input
3. Compute prediction error on the self-generated text
4. If PE is high $\rightarrow$ the model surprised itself $\rightarrow$ learn from it
5. If PE is low $\rightarrow$ generation is consistent $\rightarrow$ reinforce patterns

Disease mapping: inner speech deficits (schizophrenia) $\rightarrow$ inability to monitor own speech $\rightarrow$ thought insertion. Stuttering $\rightarrow$ failed forward model of own speech production.

Self-play interval: every 10 steps (after 200 step warm-up). If last 3 self-play losses all exceed 15.0, interval increases to $5\times$ (model still producing gibberish, slow down). Zero learnable parameters.

### Consolidation Manager

Manages the episodic $\rightarrow$ semantic consolidation pipeline (McClelland, McNaughton, and O’Reilly 1995):

- Track which hippocampal memories have been replayed $\geq R_{\min}$ times
- Frequently-replayed memories are promoted from hippocampal episodic buffer to cortical column weights (semantic storage)
- Consolidated memories are removed from the HPC buffer, freeing capacity
- Consolidation occurs during sleep phases (not wake)

### Developmental Program (Critical Periods)

The brain changes HOW it learns over time. Hensch (2004): critical periods are opened by inhibitory maturation. Huttenlocher (1979): synapse density peaks at age 2, halves by adulthood.

| **Stage** | **Steps** | **LR mult** | **Inhib** | **Hebb wt** | **Struct** | **Sleep $\times$** |
| --- | --- | --- | --- | --- | --- | --- |
| Sensory | 0–1K | 2.0$\times$ | 0.3 | 0.8 | 1.0 | 2.0$\times$ |
| Association | 1K–5K | 1.5$\times$ | 0.6 | 0.6 | 0.7 | 1.5$\times$ |
| Integration | 5K–20K | 1.0$\times$ | 0.9 | 0.4 | 0.3 | 1.0$\times$ |
| Refinement | 20K+ | 0.5$\times$ | 1.0 | 0.3 | 0.1 | 0.7$\times$ |

Table: Table 10: Developmental stages mapped to training steps. Each stage modulates learning rate, inhibitory strength, structural plasticity rate, Hebbian/PC balance, and sleep frequency.

Like the biological brain: early stages are Hebbian-dominated (absorb everything), late stages are PC-dominated (refine predictions). Inhibitory strength increases throughout, matching GABA maturation driving critical period closure. Zero learnable parameters, purely algorithmic staging.

### Brain Decoder (Generation)

Text generation uses the `BrainDecoder` class, which orchestrates:

- **Drift-Diffusion Sampling** (Appendix M): Evidence accumulation for token selection with DA-modulated threshold and urgency.
- **Inhibition of Return**: Exponentially decaying suppression of recently-generated tokens. Decay rate $\alpha = 0.85$, initial suppression $= -5.0$. Prevents repetition loops.
- **$\sigma^2$-adaptive temperature**: High precision (low $\sigma^2$) $\rightarrow$ lower temperature (confident, deterministic). Low precision (high $\sigma^2$) $\rightarrow$ higher temperature (uncertain, exploratory).
- **Neuromodulatory signals**: DA gates impulsivity (low DA $\rightarrow$ conservative), NE modulates exploration noise, ACh gates whether generation continues.
- **Speculative generation**: Generate $K$ candidates in parallel, verify with a teacher model, accept the longest correct prefix (standard speculative decoding applied to brain-decoded output).

### Text Environment (Autonomous Data Acquisition)

For continuous autonomous operation, `TextEnvironment` provides a data stream:

- Scans a directory for `.txt` files
- Yields batches of tokenized sequences
- Handles file exhaustion (loops, shuffles, moves to next file)
- Integrates with `AutonomousLoop` for never-ending training

This enables NCT to train continuously on any text corpus without a fixed dataset.

## 20. Structural Plasticity

The network continuously adapts its own structure (Theorem E):

**Synaptogenesis (growth):** Where prediction error is persistently high ($\|\boldsymbol{\epsilon}\| > \theta_{\text{growth}}$, default 2.0), the L2/3 association matrix is expanded. New connections are initialized near zero and learn via Hebbian plasticity.

**Pruning:** Where gate values approach zero ($\sigma(g) < \theta_{\text{prune}}$, default 0.01), the corresponding connections are removed. Checked every $I_{\text{prune}}$ steps (default 1000).

**Neurogenesis:** For novel concepts that cannot be represented by existing columns, a new column can be grown via the scaling framework (Section 9).

## 21. Complete Loss Function

The total loss in hybrid mode is:

$$
\mathcal{L}= \mathcal{L}_{\text{NTP}} + \lambda_{\text{PC}} \mathcal{L}_{\text{PC}} + \lambda_{\text{CB}} \mathcal{L}_{\text{CB}} + \lambda_{\text{TRN}} \mathcal{L}_{\text{TRN}}
$$

| **Term** | **Weight** | **Computation** |
| --- | --- | --- |
| $\mathcal{L}_{\text{NTP}}$ | 1.0 | Cross-entropy: $-\sum_t \log p(y_t \| \text{logits}_t)$, ignoring padding ($y=-1$) |
| $\mathcal{L}_{\text{PC}}$ | 1.0 | Precision-weighted prediction error: $\sum_{i=0}^{N-1} \frac{1}{\sigma_i^2} \\|\boldsymbol{\epsilon}_i\\|^2$ |
| $\mathcal{L}_{\text{CB}}$ | 0.1 | Cerebellar prediction error: $\\|\mathbf{h}_t - \hat{\mathbf{h}}_t\\|^2$ |
| $\mathcal{L}_{\text{TRN}}$ | 0.1 | TRN bimodality: $\frac{1}{G}\sum_{g=1}^G r_g(1-r_g)$, encouraging binary gates |

Table: Table 11: Loss terms and their computation.

In `predictive_coding` and `hebbian` modes, $\mathcal{L}_{\text{NTP}}$ gradients propagate *only* to the LM head (not through columns). All column weight updates come from local PC/Hebbian rules.

## 22. Evaluation Metrics

Beyond standard perplexity, NCT uses brain-inspired evaluation metrics:

| **Metric** | **Module** | **Measures** |
| --- | --- | --- |
| COL_DIFF | Columns | Column output differentiation: $\text{std}(\{\mathbf{h}_0, \ldots, \mathbf{h}_{N-1}\})$. Higher = more specialization. |
| GATE_EVO | All gates | Mean absolute change from init: $\frac{1}{\|G\|}\sum_g \|\sigma(g) - \sigma(g_0)\|$. Higher = mechanisms activating. |
| PCC | PWPC | Pearson correlation between $\sigma^2$ and actual $\|\boldsymbol{\epsilon}\|^2$. Positive = precision calibrated. |
| CAA | PWPC | Confidence-accuracy alignment: bin predictions by $\sigma^2$, compare with actual error. |
| LIS | L5 k-WTA | FFN activation sparsity per token. Target: 1–15% active. |

Table: Table 12: Custom evaluation metrics for NCT.

## 23. Complete Initialization Protocol

| **Parameter** | **Init** | **Rationale** |
| --- | --- | --- |
| $W_{\text{embed}}$ | $\mathcal{N}(0, 0.02)$ | Standard embedding init |
| All gate $g$ params | $-2.0$ | $\sigma(-2) \approx 0.12$: near-zero output |
| $W_{\text{out}}$ (all modules) | $\mathbf{0}$ | Zero contribution at init |
| $W_{\text{L4}}$ (if $d_c = d$) | $I$ (identity) | Pass-through at init |
| $W_{\text{L4}}$ (if $d_c \neq d$) | Kaiming normal | Standard projection init |
| $W_{\text{assoc}}^h$ | $I$ (identity) | Self-recall at init |
| $W_{\text{val}}$ (L2/3) | $I$ (identity) | Pass-through values |
| $W_{\text{dist}}^h$ (L2/3) | $\mathbf{0}$ | Uniform window weighting |
| $W_{\text{lat}}^h$ (L2/3) | $\mathbf{0}$ | No lateral competition |
| $W_{\text{VIP,out}}$ | $\mathbf{0}$ | No disinhibition |
| $W_{\text{SST,out}}$ | $\mathbf{0}$ | No dendritic inhibition |
| PV score bias | $5.0$ | $\sigma(5) \approx 0.993$: always open |
| NMDA decay $\beta_k$ | $6.0$ | $\sigma(6) \approx 0.9975$: slow decay |
| Silent facil $\beta_f$ | $4.6$ | $\sigma(4.6) \approx 0.990$ |
| Silent depress $\beta_d$ | $2.5$ | $\sigma(2.5) \approx 0.924$ |
| Phono decay | $4.0$ | $\sigma(4) \approx 0.982$ |
| Phono rehearsal | $-1.0$ | $\sigma(-1) \approx 0.27$: mild rehearsal |
| PAC $\kappa_1$ | $0.3$ | Theta-gamma coupling at rest |
| PAC $\kappa_2, \kappa_3$ | $0.0$ | No delta/alpha coupling initially |
| Osc $W_{\text{out}}$ | $\mathcal{N}(0, 0.01)$ | Small nonzero: oscillations active |
| $\sigma^2$ bias ($b_\sigma$) | $\log(e^{1.0}-1)$ | $\mathop{\mathrm{softplus}}(b) = 1.0$ |
| Tonic DA EMA | $0.999$ | Slow baseline tracking |
| Gate LR multiplier | $20\times$ | Gates learn faster than weights |
| $\mathop{\mathrm{RMSNorm}}$ $\gamma$ | $\mathbf{1}$ | Identity scaling |

Table: Table 13: Initialization values for every learnable parameter type.

## 24. Drift-Diffusion Sampling

For generation, NCT optionally uses a drift-diffusion decision model (disease mapping: Parkinson’s decision-making deficit $\rightarrow$ DA-depleted threshold):

$$
e(t) = e(t-1) + \text{logits}_{\text{top}} - \text{logits}_{\text{second}} + \mathcal{N}(0, \sigma_{\text{noise}})
$$

Token is committed when $e(t) > \theta_{\text{decision}}$, where $\theta$ is DA-modulated:

$$
\theta = \theta_{\text{base}} \cdot (1 + \text{DA} \cdot \text{urgency}(t))
$$

Low DA (Parkinson’s analog) $\rightarrow$ high threshold $\rightarrow$ slow, conservative decisions. High DA $\rightarrow$ low threshold $\rightarrow$ fast, impulsive generation. Includes inhibition of return to suppress recently-generated tokens.

## 25. Production Interface

For continuous deployment, NCT provides production infrastructure:

### Context and Deployment

- **Context management:** Automatic working memory reset between conversations; persistent HPC across sessions.
- **Always-on learning:** Every inference triggers local weight updates (controllable via learning rate).
- **Sleep scheduling:** Autonomous sleep cycles during idle periods.
- **Self-repair:** If loss diverges ($> 2\times$ best), roll back to saved best state and reduce learning rate.
- **Checkpoint:** Periodic auto-save of full model state including WM, HPC memories, BCM thresholds, neuromod EMAs.

### Quantization ($\sigma^2$-Guided Precision Mapping)

V11 parameter categories mapped to precision levels:

- **FP16:** $\sigma^2$ ($W_\sigma$), decay rates, oscillatory phases, grid-cell periods, these are precision-critical (exponential compounding, phase sensitivity).
- **INT8:** Column projections (L4/L5/L6), interneuron weights, gates, embedding, LM head, sufficient for sigmoid-gated or projection weights.
- **INT4:** L2/3 association weights (bulk, high redundancy) and L5 FFN, largest weight blocks, highest redundancy.

### Distributed Training (FSDP2)

FSDP wrapping policy: each `CorticalColumn` is one FSDP unit (all 6 layers + interneurons + WM stay together, stateful interaction must not be split). Subcortical systems, embedding, and LM head are in the outer FSDP unit. Mixed precision: `bfloat16` params, `float32` reduce.

### Alignment (SFT/DPO)

**SFT:** Response-only loss with $\sigma^2$-aware weighting: uncertain tokens get reduced loss weight (brain principle: don’t force confidence on genuinely ambiguous content). Auxiliary losses (PC + cerebellar) maintained at 10% weight to preserve brain mechanisms during fine-tuning.

**DPO:** $\sigma^2$-adaptive $\beta$: $\beta_{\text{eff}} = \beta / \max(\bar{\sigma}^2, 0.1)$. Higher certainty $\rightarrow$ stronger preference enforcement. Higher uncertainty $\rightarrow$ softer preferences (don’t force strong opinions on ambiguous content).

### Tool Use (V11ToolAdapter)

Adapter extracts V11’s intrinsic signals for tool selection:

- `should_use_tool`: High $\sigma^2$ + high tonic DA = uncertain + exploring $\rightarrow$ try a tool. Low $\sigma^2$ = confident in text generation $\rightarrow$ don’t interrupt. DA modulates threshold (high DA $\rightarrow$ lower threshold $\rightarrow$ more tool exploration).
- `get_tool_confidence`: ACC conflict level inverted. High conflict = low confidence = maybe ask user.

### Retrieval (V11RetrievalAdapter)

$\sigma^2$-gated retrieval: only retrieve external knowledge when $\sigma^2 > \theta_{\text{retrieval}}$ (default 2.0). Brain principle: hippocampus supplements cortical knowledge when cortex can’t make a confident prediction on its own.

### $\sigma^2$-Early Exit (Adaptive Column Depth)

The brain doesn’t process every input to the same depth. Easy inputs (low $\sigma^2$) are resolved in early sensory areas. Hard inputs (high $\sigma^2$) propagate to deeper prefrontal processing.

$$
\text{Exit at column } i \text{ if } i \geq N_{\min} \text{ and } \bar{\sigma}^2_i < \theta_{\text{exit}}
$$

Default: $N_{\min} = 2$ columns, $\theta_{\text{exit}} = 0.3$. This skips remaining columns, saving compute proportional to the number of skipped columns.

## 26. Implementation Reference

| **Paper Section** | **Source File** | **LOC** |
| --- | --- | --- |
| Cortical Column (Section 4.4) | `v11_column.py` | 1,436 |
| Full Model (Section 4) | `v11_model.py` | 1,022 |
| Autonomous Op. (Appendix H) | `v11_autonomous.py` | 1,787 |
| Learning (Section 5) | `v11_learning.py` | 1,081 |
| Subcortical (Section 4.5) | `v11_systems.py` | 939 |
| Configuration | `v11_config.py` | 186 |
| Production (Appendix N) | `v11_production.py` | 569 |
| Scaling (Section 9) | `v11_scale.py` | 530 |
| Training | `train_v11.py` | 1,028 |
| Brain Embedding (Appendix D) | `brain_embeddings.py` | – |
| Position Encoding (Appendix E) | `brain_position.py` | – |
| LM Head (Appendix F) | `brain_lm_head.py` | – |
| Sampling (Appendix M) | `brain_decoding.py` | – |
| Tokenizer (Appendix Q) | `nct_tokenizer/` | 1,073 |
| **Total (V11 core + tokenizer)** |  | **$>$10,600** |

Table: Table 14: Mapping from paper sections to source code files.

| **Class Name** | **Section** | **Purpose** |
| --- | --- | --- |
| *Tokenizer* |  |  |
| `MorphemeType` | Appendix Q | Enum: PREFIX, ROOT, SUFFIX, WORD, UNKNOWN |
| `Morpheme` | Appendix Q | Dataclass: surface form + type + canonical |
| `NCTTokenizer` | Appendix Q | Dual-route morphological tokenizer ($V=13{,}817$) |
| `Encoding` | Appendix Q | Token ID sequence result |
| *Configuration* |  |  |
| `V11Config` | Section 7 | 50+ hyperparameters, presets (default/laptop/1b) |
| *Brain Modules* |  |  |
| `HubAndSpokeProjection` | Appendix D | Thm 56: ATL semantic hub with $S=6$ spokes |
| `SparseDistributedProjection` | Appendix D | Thm 57: $2\times$ expansion + top-2% activation |
| `MorphemeCompositionGate` | Appendix D | Thm 58: Dual-route lexical/sublexical blend |
| `V11BrainEmbedding` | Appendix D | 4-stage embedding pipeline |
| `GridCellPositionEncoding` | Appendix E | Learnable grid-cell frequencies |
| `BrainLMHead` | Appendix F | WEAVER++ + production delta + freq bias |
| `DriftDiffusionSampler` | Appendix M | DA-modulated evidence accumulation |
| `InhibitionOfReturn` | Appendix M | Repetition avoidance via decaying suppression |
| `BrainDecoder` | Section H.10 | Full generation orchestrator |
| *Cortical Column* |  |  |
| `L4_ThalamicInput` | Section 4.4 | Feedforward input projection |
| `L1_TopDownModulation` | Section 4.4 | Apical feedback integration |
| `L23_LateralAssociation` | Section 4.4.4 | Windowed Hebbian $O(Tw)$, $H$ heads |
| `ColumnWorkingMemory` | Section 4.4.5 | NMDA + Silent Trace + Phonological Loop |
| `ColumnOscillations` | Section 4.4.6 | Nested PAC (theta-alpha-delta) |
| `ColumnInterneurons` | Section 4.4 | VIP + SST + PV/Chandelier |
| `L5_OutputPrediction` | Section 4.4.8 | Dendritic FFN + prediction + $\sigma^2$ |
| `L6_ThalamicFeedback` | Section 4.4 | Thalamic relay modulation |
| `BCMHomeostasis` | Section 4.4.10 | Sliding threshold $\theta_{\mathrm{BCM}}$ |
| `Metaplasticity` | Section 4.4.11 | Learning rate adaptation |
| `LateralColumnConnection` | Appendix G | Horizontal send/recv between neighbors |
| `CorticalColumn` | Section 4.4 | Complete 6-layer column |
| `ColumnOutput` | Section 4.4 | Dataclass: output, prediction, $\sigma^2$, state |
| `RMSNorm` | Appendix B | Root mean square normalization |
| *Subcortical Systems* |  |  |
| `ThalamicRelay` | Section 4.5 | Single relay group ($W_{\mathrm{in}}, W_{\mathrm{out}}$, gate) |
| `ThalamicReticularNucleus` | Section 4.5 | TRN gating (bimodality loss) |
| `Thalamus` | Section 4.5 | $G$ relay groups + TRN |
| `Hippocampus` | Section 4.5 | DG/CA3/CA1 + surprise tagging + replay |
| `BasalGanglia` | Section 4.5 | D1/D2 pathways, action selection |
| `Cerebellum` | Section 4.5 | Forward model, temporal prediction |
| `Brainstem` | Section 4.5 | DA/NE/5-HT/ACh computation |
| `NeuromodState` | Section 4.5 | Dataclass: 4 neuromod signals |
| `CorticalWorkspace` | Section 4.5 | Global broadcast (Baars 1988) |
| `SelfAssessment` | Section 4.5 | ACC conflict $\rightarrow$ extra PC steps |
| *Learning* |  |  |
| `PredictiveCodingOptimizer` | Section 5 | Local PC updates per column |
| `HebbianOptimizer` | Section 5 | Hebbian + anti-Hebbian for L2/3 |
| `NeuromodulatedPlasticity` | Section 5 | $\Delta\theta = \mathrm{DA}\cdot\mathrm{ACh}\cdot f(\mathrm{NE},\mathrm{5HT})\cdot\Delta\theta_{\mathrm{local}}$ |
| `WakeSleepScheduler` | Appendix H | Wake/sleep timing + downscaling |
| `DevelopmentalProgram` | Section H.9 | 4-stage critical period scheduling |
| `V11LearningManager` | Section 5 | Orchestrates PC+Hebbian+Neuromod+Sleep+Dev |
| *Autonomous Operation* |  |  |
| `AlwaysOnLearning` | Appendix H | LR modulated by ACh, NE, surprise, sleep pressure |
| `ImaginationEngine` | Appendix H | Dream from HPC memories |
| `CuriosityDrive` | Appendix H | Free energy minimization (Friston) |
| `SelfPlay` | Section H.7 | Generate$\rightarrow$re-process$\rightarrow$learn |
| `ContinualLearningGuard` | Appendix H | EWC synaptic importance |
| `ConsolidationManager` | Section H.8 | Episodic$\rightarrow$semantic transfer |
| `AutonomousLoop` | Appendix H | Main wake-sleep-dream-evaluate orchestrator |
| `AutonomousConfig` | Appendix H | Configuration dataclass |
| `PrenatalDevelopment` | Section 6 | 4-phase prenatal self-organization |
| `MemoryLoader` | Appendix H | DataLoader wrapper for HPC replay |
| `TextEnvironment` | Section H.11 | Autonomous data acquisition |
| *Full Model* |  |  |
| `CorticalColumnNetwork` | Section 4 | Complete NCT: columns + subcortical + learning |
| *Production / Scaling* |  |  |
| `V11ToolAdapter` | Appendix N | BG/$\sigma^2$/ACC $\rightarrow$ tool selection |
| `V11RetrievalAdapter` | Appendix N | $\sigma^2$/HPC $\rightarrow$ retrieval triggers |
| `V11EarlyExitConfig` | Appendix N | $\sigma^2$-guided adaptive column depth |

Table: Table 15: Complete class inventory. Every class in the NCT codebase with its paper reference.

## 27. Training CLI

```
# Smoke test (12 tests, no GPU required)
python3 train_v11.py --smoke

# Default config (106M, fits 6GB GPU)
python3 train_v11.py --mode predictive_coding \
    --steps 5000 --prenatal 500 --bf16 \
    --batch_size 4 --seq_len 256 --lr 3e-4 \
    --wake_sleep --save_dir checkpoints/v11

# Laptop preset (300M, needs ~5GB VRAM)
python3 train_v11.py --preset laptop \
    --mode predictive_coding --steps 5000 \
    --prenatal 500 --bf16 --wake_sleep

# 1B preset (needs ~10GB VRAM)
python3 train_v11.py --preset 1b \
    --mode hebbian --steps 5000 --bf16

# Continuous training (never stops)
python3 train_v11.py --mode predictive_coding \
    --steps continuous --bf16 --wake_sleep

# Resume from checkpoint
python3 train_v11.py --resume_latest --bf16
```

Key flags: `--mode` (hebbian|predictive_coding|hybrid|backprop), `--preset` (default|laptop|1b), `--prenatal N` (prenatal steps), `--wake_sleep` (enable sleep cycles), `--inference_steps N` (PC iterations), `--bf16` (mixed precision).

## 28. NCT Morphological Tokenizer

The tokenizer implements a dual-route architecture based on the Coltheart DRC (Dual Route Cascaded) model of reading, where a lexical route handles known whole words and a sublexical route performs morphological decomposition.

### Design Principles

- **Lossless**: encode $\rightarrow$ decode = identity. Every byte is recoverable.
- **Deterministic**: same text always produces exactly the same tokens.
- **Morphologically faithful**: never splits mid-morpheme (unlike BPE).
- **Cross-word safe**: never merges tokens across word boundaries (unlike BPE/SentencePiece).
- **Oscillatory alignment**: each token $\approx$ 1 gamma cycle ($\approx$ 1 morpheme). Words span theta cycles (8–16 tokens). Phrases span alpha cycles ($\approx$20 tokens). This aligns tokenization with the oscillatory hierarchy of the cortical columns.

### Vocabulary Structure

Total vocabulary: $V = 13{,}817$ tokens, organized as:

| **ID Range** | **Token Type** | **Count** |
| --- | --- | --- |
| 0–5 | Special: `<pad>`, `<unk>`, `<bos>`, `<eos>`, `<cap>`, `<allcap>` | 6 |
| 6–261 | Byte fallback: `<byte:0>` through `<byte:255>` | 256 |
| 262–$\sim$300 | Whitespace and punctuation tokens | $\sim$40 |
| $\sim$300–$\sim$370 | Prefix morphemes (`un-`, `re-`, `dis-`...) | $\sim$70 |
| $\sim$370–$\sim$500 | Suffix morphemes (`-tion`, `-ness`, `-ing`...) | $\sim$130 |
| $\sim$500–$\sim$8,500 | Root morphemes (stems) | $\sim$8,000 |
| $\sim$8,500–13,816 | Whole words (high-frequency monomorphemic) | $\sim$5,300 |

Table: Table 16: Tokenizer vocabulary structure.

### Pre-tokenization

A regex splits raw text into pieces before morphological processing:

```
pattern = r"'s|'t|'re|'ve|'m|'ll|'d"   # contractions
        + r"|[A-Za-z\u00C0-\u024F]+"     # words (+ Latin Extended)
        + r"|\d+"                         # numbers
        + r"|\s"                          # whitespace (single char)
        + r"|[^\s]"                       # any other single char
```

Contractions are split: “don’t” $\rightarrow$ “don” + “’t”. Capitalization is factored out: “Hello” $\rightarrow$ `<cap>` + “hello”.

### Encoding Algorithm

![Algorithm 4: NCT Tokenizer Encoding](<https://verace.in/research/nct-cortical-column-network/figures/algorithm-4.webp>)

Algorithm 4: NCT Tokenizer Encoding

### Morphological Decomposition

The sublexical route uses rule-based affix stripping:

1. **Suffix stripping** (longest match first): Try removing each suffix from the English affix inventory ($\sim$130 suffixes). Apply morphophonemic rules (consonant doubling reversal: “running” $\rightarrow$ “run” + “ning” $\rightarrow$ “run” + “-ing”; e-dropping: “making” $\rightarrow$ “mak” $\rightarrow$ “make” + “-ing”; y$\rightarrow$i: “happiness” $\rightarrow$ “happi” $\rightarrow$ “happy” + “-ness”).
2. **Root validation**: Check if the remaining stem is a known word. If yes, accept decomposition. If not, try the next-longest suffix.
3. **Prefix stripping**: After successful suffix stripping, try removing prefixes ($\sim$70 prefixes, longest match first). Validate remaining root.
4. **Fallback**: If no valid decomposition is found, treat the word as monomorphemic (whole-word token if in vocabulary, byte encoding otherwise).

The affix inventory is sourced from MorphoLex and Bauer (1983), covering $\sim$200 productive English affixes organized by decreasing length for greedy longest-match.

### Decoding

Lossless reconstruction: concatenate surface forms, apply capitalization from `<cap>`/`<allcap>` markers, reconstruct bytes from `<byte:`$b$`>` tokens.

### Vocabulary Construction

Built from a text corpus using frequency-based selection:

- Roots: top 8,000 by frequency (min frequency $\geq$ 3)
- Whole words: top 5,000 monomorphemic words (min frequency $\geq$ 5)
- All productive English prefixes and suffixes included regardless of frequency
- Whitespace/punctuation tokens added for all observed characters

## 29. Scaling Algorithms: Complete Specification

### Progressive Column Growth

![Algorithm 5: Progressive Column Growth](<https://verace.in/research/nct-cortical-column-network/figures/algorithm-5.webp>)

Algorithm 5: Progressive Column Growth

**Thalamus expansion**: New relay groups are created with random initialization. Existing relay weights are copied position-by-position. The TRN (dimension-based, not column-count-based) transfers directly.

**Lateral expansion**: New columns get zero-initialized send weights (identity-at-init: no lateral signal initially). Old column positions are mapped to their new indices.

**Workspace expansion**: New columns get zero-initialized write projections. Old write/read weights are copied.

**Cost estimate**: Adding 1 column to a 12-column model costs $\sim$8% of full retraining (7.5M new column params + $\sim$0.7M routing retraining out of 106M total).

### Net2Net Column Splitting

![Algorithm 6: Column Splitting (Function-Preserving)](<https://verace.in/research/nct-cortical-column-network/figures/algorithm-6.webp>)

Algorithm 6: Column Splitting (Function-Preserving)

**Function preservation**: At the moment of split, $0.5 \cdot W_a + 0.5 \cdot W_b = W_{\text{original}}$, so network output is mathematically identical. Subsequent competitive Hebbian learning drives the two copies to differentiate.

**Cost estimate**: $\sim$7% of full retraining per split.

### Overload Detection

To identify which columns to split, evaluate over $n$ batches:

- **Prediction error**: Mean $\sigma^2$ per column (high = overloaded)
- **Gate saturation**: Mean gate activation (high = all mechanisms maxed out)
- **Overload score**: $0.6 \times \text{PE\_norm} + 0.4 \times \text{gate\_norm}$

Split the column with the highest overload score.

### $\mu$P Hyperparameter Transfer

29 hyperparameters are extracted from a trained small model and transferred to larger configurations. These include: all learning rates ($\eta_{\text{PC}}, \eta_H, \eta_{\text{base}}$), PC dynamics ($K_{\min}, K_{\max}, \tau_{\text{conv}}, \sigma^2_{\text{init}}$), Hebbian parameters ($k_{\text{WTA}}, S, w$), gate dynamics ($g_0$, gate LR mult), BCM/meta time constants, oscillatory periods, WM slot counts, sleep parameters, structural plasticity thresholds, and regularization.

Dimension-dependent parameters ($d_{\text{relay}}, d_{\text{inhibitory}}, d_{\text{slot}}, d_{\text{sparse}}$, etc.) are scaled proportionally to $d_{\text{model}}$:

$$
d_{\text{param}}^{\text{large}} = \max\bigg(\text{floor}, \bigg\lfloor d_{\text{param}}^{\text{small}} \times \frac{d_{\text{model}}^{\text{large}}}{d_{\text{model}}^{\text{small}}} \bigg\rfloor\bigg)
$$

### Parameter Locality Analysis

| **Operation** | **Params Affected** | **% of Total** | **Est. Cost** |
| --- | --- | --- | --- |
| Add 1 column | 7.5M (new) + 0.7M (routing) | 7.7% | $\sim$8% |
| Split 1 column | 7.5M (divergence) + 0.3M (routing) | 7.3% | $\sim$7% |
| Width $\times 2$ | All weights touching $d_{\text{model}}$ | $\sim$75% | $\sim$70% |
| Full retrain | All 106M | 100% | 100% |

Table: Table 17: Scaling cost analysis for the default 106M configuration.

## 30. Architecture Overview

![Complete NCT architecture. Left: N cortical columns (each with L4rightarrowL1rightarrowVIP/SSTrightarrowL2/3rightarrowWMrightarrowOsc/PVrightarrowL5/L6) connected hierarchically with top-down predictions (dashed blue) and lateral connections. Right: subcortical systems providing thalamic routing, hippocampal memory, basal ganglia reward selection, cerebellar temporal prediction, brainstem neuromodulation (DA/NE/5-HT/ACh), and global workspace broadcast. Self-assessment monitors column conflict for metacognitive PC step allocation.](<https://verace.in/research/nct-cortical-column-network/figures/figure-2.webp>)

Figure 2: Complete NCT architecture. Left: $N$ cortical columns (each with L4$\rightarrow$L1$\rightarrow$VIP/SST$\rightarrow$L2/3$\rightarrow$WM$\rightarrow$Osc/PV$\rightarrow$L5/L6) connected hierarchically with top-down predictions (dashed blue) and lateral connections. Right: subcortical systems providing thalamic routing, hippocampal memory, basal ganglia reward selection, cerebellar temporal prediction, brainstem neuromodulation (DA/NE/5-HT/ACh), and global workspace broadcast. Self-assessment monitors column conflict for metacognitive PC step allocation.

## 31. Checkpoint Format

NCT checkpoints (`.pt` files) store:

- `model_state_dict`: All model parameters ($W$, $g$, buffers)
- `optimizer_state_dict`: Optimizer state (if using external optimizer)
- `config`: Full `V11Config` dataclass (all hyperparameters)
- `step`: Training step count
- `best_loss`: Best validation loss seen
- `metrics`: Last training metrics (loss, PC loss, $\sigma^2$, gate values)
- `hpc_memories`: Hippocampal episodic buffer (for replay continuity)
- `bcm_thresholds`: Per-column BCM $\theta$ values
- `metaplasticity_ema`: Per-column plasticity history
- `tonic_da`: Tonic dopamine EMA value
- `prenatal_complete`: Boolean (whether prenatal phase finished)

Checkpoints are saved every 1,000 steps and at best validation loss. Loading restores all persistent state including working memory pointers, BCM thresholds, and neuromodulator EMAs.

## 32. Transformer Components Replaced

| **Killed (Transformer)** | **Replaced With (Brain)** |
| --- | --- |
| Q/K/V dot-product attention | Windowed Hebbian association $O(Tw)$ |
| Causal mask | Local window ($w=16$ = 2 theta cycles) |
| RoPE in attention | Grid-cell position encoding (additive) |
| Global backprop to all layers | Predictive coding (local per column) |
| Adam/SGD optimizer | Hebbian + neuromod plasticity |
| Batch training | Online learning + wake-sleep cycle |
| Fixed deployment | Continuous operation, structural plasticity |
| LayerNorm | RMSNorm |
| Learned positional embedding | Grid-cell frequencies (neuroscience-based) |
| Standard embedding | 4-stage brain embedding pipeline |
| Linear LM head | Brain LM head (WEAVER++ + drift-diffusion) |

Table: Table 18: What NCT killed vs. what it replaced with.

## References

1. Abraham, Wickliffe C, and Mark F Bear. 1996. “Metaplasticity: The Plasticity of Synaptic Plasticity.” Trends in Neurosciences 19 (4): 126–30.
2. Baars, Bernard J. 1988. “A Cognitive Theory of Consciousness.” Cambridge University Press.
3. Bienenstock, Elie L, Leon N Cooper, and Paul W Munro. 1982. “Theory for the Development of Neuron Selectivity: Orientation Specificity and Binocular Interaction in Visual Cortex.” Journal of Neuroscience 2 (1): 32–48.
4. Brown, Tom, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, et al. 2020. “Language Models Are Few-Shot Learners.” Advances in Neural Information Processing Systems 33: 1877–1901.
5. Buzsáki, György, and Andreas Draguhn. 2004. “Neuronal Oscillations in Cortical Networks.” Science 304 (5679): 1926–29.
6. Dehaene, Stanislas, and Lionel Naccache. 2001. “Towards a Cognitive Neuroscience of Consciousness: Basic Evidence and a Workspace Framework.” Cognition 79 (1-2): 1–37.
7. Douglas, Rodney J, and Kevan AC Martin. 2004. “Neuronal Circuits of the Neocortex.” Annual Review of Neuroscience 27: 419–51.
8. Friston, Karl. 2010. “The Free-Energy Principle: A Unified Brain Theory?” Nature Reviews Neuroscience 11 (2): 127–38.
9. Hafting, Torkel, Marianne Fyhn, Sturla Molden, May-Britt Moser, and Edvard I Moser. 2005. “Microstructure of a Spatial Map in the Entorhinal Cortex.” Nature 436 (7052): 801–6.
10. Harris, Kenneth D, and Gordon MG Shepherd. 2015. “The Neocortical Circuit: Themes and Variations.” Nature Neuroscience 18 (2): 170–81.
11. Hasselmo, Michael E. 2006. “The Role of Acetylcholine in Learning and Memory.” Current Opinion in Neurobiology 16 (6): 710–15.
12. Hebb, Donald O. 1949. “The Organization of Behavior: A Neuropsychological Theory.” Wiley.
13. Hinton, Geoffrey. 2022. “The Forward-Forward Algorithm: Some Preliminary Investigations.” arXiv Preprint arXiv:2212.13345.
14. Jensen, Ole, and Laura L Colgin. 2007. “Cross-Frequency Coupling Between Neuronal Oscillations.” Trends in Cognitive Sciences 11 (7): 267–69.
15. Khazipov, Roustem, and Heiko J Luhmann. 2006. “Early Patterns of Electrical Activity in the Developing Cerebral Cortex of Humans and Rodents.” Trends in Neurosciences 29 (7): 414–18.
16. Lillicrap, Timothy P, Adam Santoro, Luke Marris, Colin J Akerman, and Geoffrey Hinton. 2020. “Backpropagation and the Brain.” Nature Reviews Neuroscience 21 (6): 335–46.
17. Luck, Steven J, and Edward K Vogel. 1997. “The Capacity of Visual Working Memory for Features and Conjunctions.” Nature 390 (6657): 279–81.
18. McClelland, James L, Bruce L McNaughton, and Randall C O’Reilly. 1995. “Why There Are Complementary Learning Systems in the Hippocampus and Neocortex: Insights from the Successes and Failures of Connectionist Models of Learning and Memory.” Psychological Review 102 (3): 419.
19. Meister, Markus, Rachel OL Wong, Denis A Baylor, and Carla J Shatz. 1991. “Synchronous Bursts of Action Potentials in Ganglion Cells of the Developing Mammalian Retina.” Science 252 (5008): 939–43.
20. Merity, Stephen, Caiming Xiong, James Bradbury, and Richard Socher. 2016. “Pointer Sentinel Mixture Models.” arXiv Preprint arXiv:1609.07843.
21. Millidge, Beren, Alexander Tschantz, and Christopher L Buckley. 2022. “Predictive Coding Approximates Backprop Along Arbitrary Computation Graphs.” Neural Computation 34 (6): 1329–68.
22. Mongillo, Gianluigi, Omri Barak, and Misha Tsodyks. 2008. “Synaptic Theory of Working Memory.” Science 319 (5869): 1543–46.
23. Mountcastle, Vernon B. 1997. “The Columnar Organization of the Neocortex.” Brain 120 (4): 701–22.
24. Ororbia, Alexander G, and Ankur Mali. 2023. “The Predictive Forward-Forward Algorithm.” arXiv Preprint arXiv:2301.01452.
25. Pehlevan, Cengiz, and Dmitri B Chklovskii. 2019. “Neuroscience-Inspired Online Unsupervised Learning Algorithms: Artificial Neural Networks.” IEEE Signal Processing Magazine 36 (6): 88–96.
26. Rao, Rajesh PN, and Dana H Ballard. 1999. “Predictive Coding in the Visual Cortex: A Functional Interpretation of Some Extra-Classical Receptive-Field Effects.” Nature Neuroscience 2 (1): 79–87.
27. Salvatori, Tommaso, Yuhang Song, Yu Hong, Lei Sha, Simon Frieder, Zhenghua Xu, Rafal Bogacz, and Thomas Lukasiewicz. 2024. “Brain-Inspired Computational Intelligence via Predictive Coding.” arXiv Preprint arXiv:2308.07870.
28. Schultz, Wolfram, Peter Dayan, and P Read Montague. 1997. “A Neural Substrate of Prediction and Reward.” Science 275 (5306): 1593–99.
29. Tononi, Giulio, and Chiara Cirelli. 2006. “Sleep Function and Synaptic Homeostasis.” Sleep Medicine Reviews 10 (1): 49–62.
30. Touvron, Hugo, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, et al. 2023. “Llama 2: Open Foundation and Fine-Tuned Chat Models.” arXiv Preprint arXiv:2307.09288.
31. Vaswani, Ashish, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. “Attention Is All You Need.” In Advances in Neural Information Processing Systems. Vol. 30.
32. Whittington, James CR, and Rafal Bogacz. 2017. “An Approximation of the Error Backpropagation Algorithm in a Predictive Coding Network with Local Hebbian Synaptic Plasticity.” Neural Computation 29 (5): 1229–62.
33. Yang, Greg, Edward J Hu, Igor Babuschkin, Szymon Sidor, Xiaodong Liu, David Farhi, Nick Ryder, Jakub Pachocki, Weizhu Chen, and Jianfeng Gao. 2021. “Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer.” In Advances in Neural Information Processing Systems. Vol. 34.

## License

[PolyForm Noncommercial License 1.0.0](https://verace.in/license)

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.
