Author: Dr. Josef Kurk Edwards (drQedwards)
Status: Research Release
License: MIT
The Recursive Transformer Model (RTM) extends standard transformers with persistent memory, temporal decay, consensus validation, and contradiction detection, enabling stateful reasoning across inference sessions. This directly addresses the problem of nostalgic incorrectness—a model’s tendency to retain outdated or contradicted beliefs.
RTM draws from Dr. Josef “Q.” Edwards’ 2025 research on Persistent Memory Logic Loops (PMLL) and the Enhanced Reconsideration System (ERS). RTM is complementary to the Tiny Recursion Model (TRM), and a hybrid TRM–RTM architecture is possible.
RTM stores past outputs in vectorized memory blocks with:
- Timestamped entries
- Confidence scores
- Embedding-based similarity lookup
Older or unsupported memories naturally lose confidence, reducing stale knowledge.
Related memories reinforce one another, improving model reliability.
Conflicting memories penalize each other’s confidence, reducing knowledge drift.
The repository includes a placeholder for:
- Lattice-based tensor routing
- Memory hashing
- Commitment and re-evaluation cycles
git clone <your repo URL>
cd recursive_transformer
pip install -r requirements.txtRequirements:
- Python 3.10+
- numpy
- scikit-learn
- dateutil
from recursive_transformer import RecursiveTransformerModel
def echo_model(prompt: str):
return prompt
model = RecursiveTransformerModel(base_model=echo_model)
result, confidence = model.generate("What is memory?")
print(result, confidence)recursive_transformer/
│
├── recursive_transformer/
│ ├── memory.py
│ ├── model.py
│ ├── consensus.py
│ ├── contradiction.py
│ ├── decay.py
│ ├── pmll.py
│ └── __init__.py
│
└── examples/
└── simple_example.py
| Feature | TRM | RTM | Hybrid |
|---|---|---|---|
| Primary skill | Recursive reasoning | Persistent state | Both |
| Memory | Stateless | Persistent & decaying | Persistent + recursive |
| Best for | ARC puzzles | Knowledge systems | AGI-level reasoning |
| Parameter size | ~7M | Model-dependent | Model-dependent |
If you use RTM in research:
Edwards, J. (2025). The Recursive Transformer Model: Architecture, Theory, and Implementation with Persistent Memory Logic Loops.
MIT License
RTM is an experimental transformer architecture that fuses:
- Recursive forward passes (self-calling inference path)
- PMLL — Persistent Memory Logic Loop
- KV-Slotting for long-context efficiency
- ARC-AGI benchmark evaluation modules
RTM explores the hypothesis:
A transformer equipped with recursive inference and persistent memory can solve abstraction tasks that defeat standard models.
The model calls itself under a continuation policy, enabling multistep reasoning chains.
Hash-chained semantic memory with Race/Trace retrieval and compressed persistence.
Selective KV-cache rehydration for long-horizon inference without memory blowup.
Includes adapters, evaluation loops, scoring, and ablation hooks.
git clone https://github.com/drQedwards/RTM.git
cd RTM
unzip recursive_transformer.zip -d rtm_src
pip install -r requirements.txtThe benchmarks/arc/ module provides:
- Task loading
- Model ↔ ARC adapters
- Scoring
- Recursion-depth analysis
- Memory hit-rate analysis
Run:
python benchmarks/arc/run_arc.py --model rtm --config configs/arc/rtm_default.yaml- Automated ARC reporting
- Memory graph visualizer
- Docker reproducibility
- TechRxiv whitepaper
MIT License. See LICENSE for details.