# yifanzhang-pro/recurrent-looped-tranformer architecture

> Architecture diagram of the GitHub repository yifanzhang-pro/recurrent-looped-tranformer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yifanzhang-pro/recurrent-looped-tranformer
- Repository: https://github.com/yifanzhang-pro/recurrent-looped-tranformer

## Overview

This repository is a research-paper and results showcase for Recurrent Looped Transformer, not an implementation package. Its reader workflow is to learn the model’s token-update architecture, compare feedback variants, then inspect benchmark and generalization results. The README documents the model relationships; no source-code excerpts were provided, so the graph represents documented behavior rather than verified runtime calls.

Main entry points: [`README.md`](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md) (Project overview), [`assets/experiments-depth8/README.md`](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/experiments-depth8/README.md) (Depth-eight results), [`assets/results-refresh-20260920/README.md`](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/results-refresh-20260920/README.md) (Depth-sixteen results), [`Recurrent_Looped_Transformer.pdf`](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/Recurrent_Looped_Transformer.pdf) (Research paper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_architecture["RLT Architecture"]
  node_encoder["Causal encoder<br/>[README.md]"]
  node_global_memory[("Global KV memory<br/>[README.md]")]
  node_gated_merge["Gated merge<br/>[README.md]"]
  node_decoder["Recurrent decoder<br/>[README.md]"]
  node_swa_cache[("Layerwise SWA cache<br/>[README.md]")]
  node_feedback["Hidden-state feedback<br/>[README.md]"]
end

subgraph group_variants["Feedback Variants"]
  node_rlt0["RLT-0 control<br/>[README.md]"]
  node_rlt2["RLT-2 chunks<br/>[README.md]"]
end

subgraph group_experiments["Experiments"]
  node_depth8["Depth-eight results<br/>[README.md]"]
  node_depth16["Depth-sixteen results<br/>[README.md]"]
  node_mod5["Mod-5 variants<br/>[README.md]"]
end

subgraph group_publications["Research Materials"]
  node_readme["Project overview<br/>[README.md]"]
  node_paper["Research paper"]
  node_architecture_detail["Architecture diagrams"]
  node_chunk_schedule["Chunk schedule<br/>[chunk-schedule.pdf]"]
end

node_reader(("Research reader"))

node_reader -->|"reads overview"| node_readme
node_readme -->|"links paper"| node_paper
node_readme -->|"documents architecture"| node_architecture_detail
node_encoder -->|"projects KV"| node_global_memory
node_encoder -->|"provides representation"| node_gated_merge
node_feedback -->|"provides prior state"| node_gated_merge
node_gated_merge -->|"feeds decoder"| node_decoder
node_global_memory -->|"supplies context"| node_decoder
node_swa_cache -->|"retains local KV"| node_decoder
node_decoder -->|"updates state"| node_feedback
node_readme -->|"describes control"| node_rlt0
node_readme -->|"describes chunks"| node_rlt2
node_rlt2 -->|"illustrated by"| node_chunk_schedule
node_readme -->|"reports experiments"| node_depth8
node_readme -->|"reports results"| node_depth16
node_readme -->|"reports variants"| node_mod5

click node_readme "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_encoder "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_global_memory "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_gated_merge "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_decoder "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_swa_cache "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_feedback "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_rlt0 "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_rlt2 "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md"
click node_depth8 "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/experiments-depth8/README.md"
click node_depth16 "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/results-refresh-20260920/README.md"
click node_mod5 "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/results-refresh-20260920/README.md"
click node_paper "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/Recurrent_Looped_Transformer.pdf"
click node_architecture_detail "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/architecture-detail.pdf"
click node_chunk_schedule "https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/rlt2/chunk-schedule.pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_encoder,node_global_memory,node_gated_merge,node_decoder,node_swa_cache,node_feedback toneBlue
class node_rlt0,node_rlt2 toneAmber
class node_depth8,node_depth16,node_mod5 toneMint
class node_readme,node_paper,node_architecture_detail,node_chunk_schedule toneRose
class node_reader toneIndigo
```

## Components

### RLT Architecture

- [Causal encoder](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [Global KV memory](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [Gated merge](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [Recurrent decoder](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [Layerwise SWA cache](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [Hidden-state feedback](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`

### Feedback Variants

- [RLT-0 control](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [RLT-2 chunks](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`

### Experiments

- [Depth-eight results](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/experiments-depth8/README.md): `assets/experiments-depth8/README.md`
- [Depth-sixteen results](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/results-refresh-20260920/README.md): `assets/results-refresh-20260920/README.md`
- [Mod-5 variants](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/results-refresh-20260920/README.md): `assets/results-refresh-20260920/README.md`

### Research Materials

- [Project overview](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/README.md): `README.md`
- [Research paper](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/Recurrent_Looped_Transformer.pdf): `Recurrent_Looped_Transformer.pdf`
- [Architecture diagrams](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/architecture-detail.pdf): `assets/architecture-detail.pdf`
- [Chunk schedule](https://github.com/yifanzhang-pro/recurrent-looped-tranformer/blob/master/assets/rlt2/chunk-schedule.pdf): `assets/rlt2/chunk-schedule.pdf`

### Other components

- **Research reader**

## Connections

- Research reader → Project overview: reads overview (evidence: `README.md`)
- Project overview → Research paper: links paper (evidence: `README.md`)
- Project overview → Architecture diagrams: documents architecture (evidence: `README.md`)
- Causal encoder → Global KV memory: projects KV (evidence: `README.md`)
- Causal encoder → Gated merge: provides representation (evidence: `README.md`)
- Hidden-state feedback → Gated merge: provides prior state (evidence: `README.md`)
- Gated merge → Recurrent decoder: feeds decoder (evidence: `README.md`)
- Global KV memory → Recurrent decoder: supplies context (evidence: `README.md`)
- Layerwise SWA cache → Recurrent decoder: retains local KV (evidence: `README.md`)
- Recurrent decoder → Hidden-state feedback: updates state (evidence: `README.md`)
- Project overview → RLT-0 control: describes control (evidence: `README.md`)
- Project overview → RLT-2 chunks: describes chunks (evidence: `README.md`)
- RLT-2 chunks → Chunk schedule: illustrated by (evidence: `README.md`)
- Project overview → Depth-eight results: reports experiments (evidence: `README.md`)
- Project overview → Depth-sixteen results: reports results (evidence: `README.md`)
- Project overview → Mod-5 variants: reports variants (evidence: `README.md`)
