Source-linked AI summary
Efficient Continual Learning in Language Models via Thalamically Routed Cortical Columns
Afshin Khadangi
TL;DR
Large language models must adapt to evolving streams without catastrophic forgetting, while existing stabilization approaches can depend on costly or external procedures. TRC2 embeds continual learning in a decoder backbone through cortical columns, thalamic modulation, hippocampal memory, and forgetting-controlled replay. Across task-sequential language modeling, it improves boundary quality and reduces cumulative forgetting, with retention gains attributed to the thalamic and hippocampal pathways.
Problem
Continual language models must absorb evolving data and task mixtures while preserving prior competence despite interference from sequential updates.
Method
TRC2 integrates cortical columns, thalamic selective modulation, hippocampal event-selective memory, delayed writing, causal updates, and replay-driven consolidation into the decoder backbone.
Results
TRC2 improves task-boundary modeling and reduces cumulative forgetting across task-sequential streams, with retention gains attributed to thalamic and hippocampal pathways rather than scale alone.
Takeaways & Limitations
Separating stable computation from localized fast plasticity provides a concrete architectural route to retaining earlier capabilities during continual language modeling.
Takeaways & Limitations
The remaining limitation is computational: sparse and memory-based pathways can still be executed more efficiently.
Abstract
from arXiv · showhide
Large language models deployed in the wild must adapt to evolving data, user behavior, and task mixtures without erasing previously acquired capabilities. In practice, this remains difficult: sequential updates induce catastrophic forgetting, while many stabilization methods rely on external procedures that are costly, brittle, or difficult to scale. We present TRC$^{2}$ (Thalamically Routed Cortical Columns), a decoder-only architecture that makes continual learning a property of the backbone itself. TRC$^{2}$ combines stacked cortical columns with a thalamic modulatory pathway for selective inter-column communication and a hippocampal pathway for event selective retrieval, delayed surprise-based writing, and replay-driven consolidation. This design localizes fast plasticity while preserving a slower stable computation pathway. We further introduce a causal memory-update scheme and an online replay controller that adjusts consolidation strength from measured forgetting. Across a task-sequential language-modeling stream over C4, WikiText-103, and GSM8K, TRC$^{2}$ consistently improves task-boundary modeling quality and substantially reduces cumulative forgetting relative to Transformer, Mamba, MoE, DeepSeek and continual learning baselines trained under the same pipeline. Ablations show that the thalamic and hippocampal components are central to the retention gains, while the full model remains competitive in throughput and training cost.
1 Introduction
Continual language models must adapt to changing streams without erasing prior capabilities, but existing replay and update methods often leave interference poorly localized. TRC2 makes continual learning an architectural property by combining selective thalamic modulation with hippocampal memory, and it reduces forgetting while improving task-boundary modeling.
- Motivation: Continual learning must balance plasticity for new information with stability for previously acquired competence under evolving data and task mixtures.Retraining is expensive, while lightweight updates can accumulate interference over long streams.
- Motivation: Replay improves retention, but language-model pipelines commonly treat memory as an external procedure layered over global parameter updates.This leaves the architectural problem of localizing adaptation unresolved.
- Approach: TRC2 is a decoder-only backbone with stacked cortical columns, thalamic modulatory feedback, and hippocampal retrieval, delayed writing, and replay consolidation.The design localizes fast adaptation while preserving a slower stable pathway.
- Results: TRC2 improves task-boundary modeling quality and substantially reduces cumulative forgetting against Transformer, Mamba, MoE, and DeepSeekMoE baselines under a shared pipeline.Ablations attribute the gains to thalamic and hippocampal pathways rather than scale alone.
- Approach: The paper introduces causal memory updates and consolidation control based on replay from past stored chunks and measured forgetting.These mechanisms are included as part of the architecture and training scheme.
2 Related Work
Related work addresses continual adaptation through parameter-efficient updates, replay, selective computation, and efficient sequence backbones. TRC2 instead embeds selective routing and causal memory into the backbone while retaining replay-based consolidation.
- Continual learning: Continual-learning surveys distinguish model-modifying methods from external augmentation and emphasize persistent evaluation challenges at scale.TRC2 asks whether the backbone itself can be structured for streaming distribution shift.
- Parameter-efficient adaptation: Low-rank and mixture-based methods constrain adaptation through update geometry, composition, or routing over small parameter subspaces.TRC2 differs by embedding selective routing and memory directly in the backbone.
- Replay and memory: Replay-based approaches reduce forgetting, but TRC2 uses event-selective causal memory access and adjusts replay strength online from measured forgetting.This places the method between purely parametric adaptation and purely external rehearsal.
- Selective computation: Sparse-expert work emphasizes specialization and routing, whereas TRC2 uses routing for modulatory control rather than conventional expert selection.The cited literature also identifies router design as a limiting factor in sparse systems.
- Efficient backbones: Efficient sequence backbones include selective state-space, recurrent, hybrid sparse-expert, and kernel-optimized designs that broaden the architecture space for continual modeling.TRC2 is additionally informed by neuroscience through thalamic and hippocampal pathways.
3 Method
TRC2 combines cortical columns for causal sequence modeling with thalamic feedback and hippocampal memory. Its causal read, delayed write, replay, and forgetting-controlled consolidation pathways separate fast adaptation from stable computation.
- Core architecture: TRC2 is a decoder-only language model that maps input sequences to autoregressive vocabulary logits using cortical columns.Hidden states have batch, sequence, and model-width dimensions, with rotary position encoding and RMS normalization.
- Core architecture: The model has cortical, thalamic, and hippocampal subsystems for causal modeling, inter-column modulation, retrieval, delayed writing, and replay consolidation.Early cortical layers query memory, while late layers receive thalamic and fixed hippocampal feedback.
- Cortical columns and thalamic routing: The cortical column combines attention and a top-k_E routed SwiGLU mixture of experts, and sends a layer-5 projection C to the thalamic router.Thalamic modulation affects the query stream of the next cortical column.
- Cortical columns and thalamic routing: The thalamic router converts cortical state into a causal modulatory signal by combining local and strictly past diffuse pathways, competition, and a modulation gate.The resulting signal is added to the next column’s query stream.
- Hippocampal memory and feedback: The hippocampal pathway performs causal event-selective retrieval, produces fixed feedback for late columns, and retrieves only recent stored entries with exact top-k_H matching.Read-before-write causality is preserved within each forward pass.
- Memory updates: Memory writes are delayed until after backpropagation, when high-surprise candidates are filtered and surviving states are written to a circular buffer.The complete design therefore has separate causal read, delayed write, and replay paths.
- Replay and consolidation: Replay samples past raw-token chunks before inserting the current batch, while an online controller adjusts replay coefficient, batch size, and long-term fraction from measured forgetting.The controller monitors forgetting in log-perplexity space and uses a clipped proportional-integral rule.
- Full model and objective: The full model combines early-cortex processing, hippocampal feedback, thalamic feedback, final logits, masked language-model loss, and post-backward memory and slow-head updates.This yields a strictly causal read path, delayed writes, and separate long-horizon consolidation.
4 Experiments and Results
TRC2 is evaluated in a controlled task-sequential language-modeling stream against matched decoder-only and continual-learning baselines. It delivers broad task-boundary and retention gains, while remaining competitive in efficiency and showing that its global pathways alter plasticity allocation.
- Experimental setup: TRC2 is evaluated on C4, WikiText-103, and GSM8K with explicit task boundaries, shared training infrastructure, and matched optimization budgets.Runs use 4 NVIDIA V100 GPUs, mixed precision, a 22,000-step budget, and a shared tokenizer, data pipeline, and optimization framework.
- Task-boundary quality: TRC2 occupies the lowest perplexity region across all three tasks and the strongest secondary-metric regions across model sizes.The largest perplexity separation appears on the log-scale GSM8K panel; TRC2 leads token accuracy there and remains strongest in BLEU on C4 and WikiText-103.
- Retention and efficiency: TRC2 incurs routing, retrieval, and replay overhead, but several variants remain competitive in compute cost and throughput.The d768-l4 configuration combines strong boundary quality with competitive compute cost and favorable retention.
- Retention and efficiency: TRC2 shifts the throughput-retention frontier toward lower cumulative forgetting at competitive speed.All TRC2 variants lie in the lowest PPL AUFC band, while most baselines occupy a markedly higher forgetting region.
- Ablations: Removing thalamic or hippocampal modules can improve some endpoint metrics while weakening cumulative retention, especially when hippocampal memory is removed.The full model has the strongest AUFC profile, indicating that the global pathways change how plasticity is allocated across the stream.
- Overall findings: Overall, TRC2 raises task-boundary quality, lowers cumulative forgetting, and remains competitive in throughput and total training cost.These results support the paper’s central stability-plasticity claim under the evaluated task stream.
5 Discussion
The results suggest that TRC2’s main advantage is retaining earlier capabilities while learning later tasks, rather than maximizing the newest-task endpoint alone. Its retention benefits come with real but manageable systems costs, alongside a broader monitoring concern about persistent adaptation.
- Retention: TRC2 improves task-boundary scores while forgetting less, with the largest gains on later WikiText-103 and GSM8K tasks.The advantage holds across scales and across both loss-based and text-based metrics.
- Systems tradeoff: The throughput-retention frontier shifts toward lower cumulative forgetting at competitive speed.The preferred tradeoff is especially visible for the d768-l4 configuration, which combines strong quality, retention, and throughput.
- Ablation interpretation: Ablations show that removing global modules may improve some final-task metrics but reduces cumulative retention, with the largest degradation after removing hippocampal memory.This separates endpoint performance from continual-learning quality.
- Systems tradeoff: TRC2 pays extra cost for routing, retrieval, and replay, although several variants remain in a practical efficiency regime.The d768-l4 model combines strong task-boundary quality, the best perplexity retention profile, and competitive throughput.
- Deployment consideration: Persistent adaptation may also preserve harmful or incorrect information more, making careful evaluation and monitoring important.This is a scope and deployment consideration for architectures designed to reduce forgetting.
6 Conclusion
TRC2 routes continual adaptation through selective thalamic modulation and hippocampal memory rather than allowing updates to diffuse through the full backbone. Its memory system combines event-selective retrieval, delayed surprise-based writing, and replay-driven consolidation.
- Architecture: TRC2 uses stacked cortical columns with thalamic modulation and hippocampal episodic memory to route adaptation through the decoder backbone.The thalamic pathway shapes later cortical processing, while the hippocampal pathway supplies retrieved contextual information and supports consolidation.
- Thalamic pathway: The thalamic router transforms intermediate cortical states into selective modulatory feedback for subsequent columns.The signal is applied to later attention processing and combines local and diffuse pathways.
- Hippocampal pathway: The hippocampal module retrieves recent episodic content and injects its output as fixed feedback into later cortical columns.Retrieval scans a recent memory window, and the resulting feedback is combined with the preceding column’s thalamic signal.
- Memory updates: Memory writes are delayed until optimizer-step boundaries, so each forward pass reads the memory state that existed at its start.Only selected high-surprise states are written after backpropagation, using a thresholded write procedure.
- Replay consolidation: An online replay controller monitors degradation on previously learned tasks and adjusts replay strength during continual training.The replay system maintains recent and long-term stores over raw token chunks.
C.1 Task schedule
The continual-learning stream trains sequentially on C4, WikiText-103, and GSM8K under fixed task budgets and evaluates retention on tasks seen so far. Forgetting is tracked with task-referenced metrics, including time-normalized AUFC summaries.
- Task schedule: The schedule presents C4, WikiText-103, and GSM8K as three sequential tasks with 10,000, 10,000, and 2,000 optimizer steps, respectively.The datasets use their specified train, validation, and test splits for optimization and evaluation.
- Training setup: Training uses a shared AdamW configuration with warmup, cosine decay, gradient clipping, and a fixed batch setup across the stream.The main configuration uses four V100 GPUs, fp16 mixed precision, and a learning rate of 2 × 10^-4.
- Evaluation: Validation is periodically performed on every task seen so far, recording baseline, pre-task, post-task, and later evaluation scores.Forgetting references the score immediately after each task, while backward and forward transfer are computed from task-specific comparisons.
- Evaluation metrics: Reported retention summaries use time-normalized area under the forgetting curve and average per-task values over previously seen tasks.Perplexity is evaluated in log space, while BLEU and token accuracy may use gain normalization when the denominator is available.
D Full Results
The full results use task-boundary tables, retention metrics, and an efficiency frontier to evaluate modeling quality, forgetting, and compute together. Across these views, the reported advantage is not confined to a single checkpoint or metric.
- Integrated comparison: The combined evaluation spans boundary perplexity, text-based task scores, cumulative forgetting, and quality-compute tradeoffs.The task-boundary table, retention table, and efficiency frontier provide complementary views of the same empirical comparison.
- Task-boundary results: Table D.1 compares task-boundary performance and efficiency across model families at steps 10k, 20k, and 22k.It reports BLEU for C4 and WikiText-103, token accuracy for GSM8K, throughput, and compute-related statistics.
- Retention results: Table D.2 reports time-normalized AUFC retention values at steps 20k and 22k.Perplexity forgetting is measured in log-perplexity space, with gain normalization additionally used for BLEU and token accuracy when applicable.
E Additional Ablation and Component Analysis
The component analysis indicates that TRC2’s retention gains arise from small, selective global pathways rather than large parameter reallocation. Backbone-level verification further confirms causal outputs, delayed hippocampal writes, persistent memory, and training-only replay updates.
- Component budgets: 97.94%–99.67% of logged parameters reside in cortical columns, while the hippocampal pathway contributes 0.31%–1.96% and the thalamic pathway remains below 0.10%.The static budget reports trainable parameters assigned to cortical, thalamic, and hippocampal subsystems.
- Hippocampal dynamics: The hippocampal pathway operates as a selective plasticity channel: surprise and write thresholds rise after task changes, while write fractions usually remain between 0.1 and 0.4.For d768-l4, the final keep fraction is 0.28125 and raw write fraction is 0.171875; the maximum of 64 writes occurs at only 5 of 1100 checkpoints.
- Training dynamics: Auxiliary traces show transient task-onset increases in the critic and replay losses, while the thalamic auxiliary remains stable rather than drifting upward.For d768-l4, the thalamic auxiliary remains in the [0.0397, 0.0901] range and ends at 0.0421.
- Interpretation: The retention advantage is architectural and dynamical: small global pathways change where fast plasticity is expressed without moving most parameters out of the cortical backbone.The thalamus changes inter-column communication, whereas the hippocampus adds a small parameter fraction but a nontrivial memory and systems footprint.
- Verification results: All main-logits causality checks pass at numerical precision, pending writes do not affect outputs before flush, committed memory persists through evaluation, and replay updates occur only during training with targets.Evaluation clears pending writes without committing them, while optimizer-step flushing commits queued hippocampal writes.
H Additional Aggregate Visualizations of Task Boundary Results
Additional aggregate visualizations organize task-boundary results by width, selected architecture configuration, and configuration-level uncertainty. Together, they provide complementary views of architecture effects, normalized multi-metric performance, and confidence intervals.
- Architecture aggregates: Figure H.7 selects one configuration per architecture using mean rank across six task-boundary metrics, then visualizes axis-wise normalized performance.The six metrics are three perplexities, three BLEU scores, and GSM8K token accuracy; lower rank indicates better overall performance.
J Order Robustness Under Task-Sequence Shuffling
The shuffled-order experiments test whether TRC2’s retention advantage depends on the canonical task sequence. Across all five additional permutations, TRC2 remains in the strongest retention region and shows lower cumulative forgetting than baseline families.
- Experimental setup: The study evaluates the remaining five permutations of the three-task stream while keeping architecture, optimizer, tokenizer, protocol, and task-specific budgets unchanged.The fixed budgets are NC = 10,000, NW = 10,000, and NG = 2,000.
- Stress test: Changing task order tests whether retention improves only in the canonical stream or persists when the point of interference moves.The tasks differ in corpus style, scale, and difficulty, so order changes which task is revisited late and becomes vulnerable to forgetting.
- Results: Across all five shuffles, TRC2 remains in the strongest retention region and shows substantially lower cumulative forgetting than the baseline families.Figures J.10–J.13 provide trajectories, step-22k PPL AUFC summaries, multi-metric retention, and per-task perplexity views.
- Order robustness: Baseline forgetting varies substantially with order, whereas TRC2 remains in a low-forgetting regime and has order-averaged AUFC below all baselines.The contrast is especially pronounced when GSM8K or WikiText-103 appears earlier and C4 is revisited late.
K Learning Dynamics Across the Task Stream
Trajectory and retention views show TRC2 maintaining strong task-boundary quality and lower cumulative forgetting across the stream. The appendix also summarizes uncertainty, scale effects, order robustness, and verification-oriented visual checks.
- Task-boundary quality: TRC2 remains in the strongest region of task-boundary quality curves, with separation from baselines becoming especially visible after task switches.It reaches lower perplexity on C4 and WikiText-103 while retaining competitive or stronger teacher-forced text scores; GSM8K baseline deterioration is sharper after 20k.
- Retention dynamics: TRC2 AUFC trajectories grow more slowly and remain below baselines throughout training, with the clearest tendency in perplexity AUFC.BLEU and token-accuracy AUFC show the same qualitative retention pattern.
- Verification summary: Figure F.5 summarizes checks covering forward and gradient causality, prefix consistency, delayed writes, memory persistence, and replay-buffer semantics.These checks complement the learning-dynamics plots with backbone-level state and causality verification.
- Aggregate views: Figures H.6–H.8 and I.9 provide width-grouped results, normalized best-configuration comparisons, configuration-level confidence intervals, and best-retention summaries.These views use means across seeds and 95% confidence intervals where specified.
- Order robustness: Figures J.10–J.13 examine cumulative forgetting, order robustness, multi-metric retention, and per-task perplexity across five shuffled streams.The shuffled-stream panels mark task boundaries and report perplexity AUFC or task-window perplexity according to each figure.
- Trajectory diagnostics: Figures K.14–K.16 display task-boundary perplexity, text metrics, and area-under-the-forgetting-curve trajectories using run-level means and uncertainty bands.The retention figure defines lower AUFC as better.