# arena-education/arena_materials architecture

> Architecture diagram of the GitHub repository arena-education/arena_materials, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arena-education/arena_materials
- Repository: https://github.com/arena-education/arena_materials

## Overview

ARENA is an educational repository of machine-learning exercises and Streamlit course pages. A learner selects a chapter, studies its instructional material, implements or runs exercises, and observes model behavior or evaluation results. The graph preserves the README’s major chapter capabilities and the sampled Streamlit chat helpers; it does not imply a single runtime pipeline across exercises. Most exercise-to-exercise wiring was not sampled, so chapter capability links are documented at the chapter level.

Main entry points: [`chapter1_transformer_interp/instructions/Home.py`](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/instructions/Home.py) (Transformer lessons), [`chapter2_rl/instructions/Home.py`](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/instructions/Home.py) (RL lessons), [`chapter2_rl/exercises/part3_ppo/solutions.py`](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part3_ppo/solutions.py) (PPO training), [`chapter3_llm_evals/instructions/Home.py`](https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/instructions/Home.py) (Evaluation lessons)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fundamentals["ML Fundamentals"]
  node_fund_page["Fundamentals lessons<br/>[Home.py]"]
  node_fund_exercises["Core ML exercises<br/>[solutions.py]"]
  node_fund_utils["Fundamentals utilities"]
end

subgraph group_interpretability["Transformer Interpretability"]
  node_transformer_lessons["Transformer lessons<br/>[Home.py]"]
  node_transformer_build["Transformer construction<br/>[solutions.py]"]
  node_mechanistic_interp["Mechanistic interpretability<br/>[solutions.py]"]
  node_linear_probes["Probes and steering<br/>[solutions.py]"]
  node_sae_interp["SAE interpretation<br/>[solutions.py]"]
  node_sae_circuits["SAE circuits<br/>[solutions.py]"]
  node_toy_saes["Toy models and SAEs<br/>[solutions.py]"]
end

subgraph group_rl["Reinforcement Learning"]
  node_rl_lessons["RL lessons<br/>[Home.py]"]
  node_rl_intro["Bandit foundations<br/>[solutions.py]"]
  node_ppo["PPO training<br/>[solutions.py]"]
  node_gpu_envs["GPU environments<br/>[gpu_env.py]"]
  node_rlhf["RLHF<br/>[solutions.py]"]
  node_alphazero["MCTS and AlphaZero<br/>[solutions.py]"]
end

subgraph group_evals["LLM Evaluations"]
  node_eval_lessons["Evaluation lessons<br/>[Home.py]"]
  node_dataset_generation["Eval dataset design<br/>[solutions.py]"]
  node_inspect_evals["Run evaluations<br/>[solutions.py]"]
  node_llm_agents["LLM agent tasks<br/>[solutions.py]"]
  node_ai_control["AI control<br/>[solutions.py]"]
end

subgraph group_alignment["Alignment Science"]
  node_alignment_lessons["Alignment lessons<br/>[Home.py]"]
  node_misalignment["Emergent misalignment<br/>[solutions.py]"]
  node_reasoning_interp["Reasoning interpretation<br/>[solutions.py]"]
  node_persona_vectors["Persona vectors<br/>[solutions.py]"]
  node_investigator_agents["Investigator agents<br/>[solutions.py]"]
end

node_learner(("Learner"))
node_chat_helpers["Course chat helpers<br/>[st_chat.py]"]
node_streamlit_helpers["Page utilities<br/>[st_dependencies.py]"]
node_plot_utils["Plot utilities<br/>[plotly_utils.py]"]
node_rl_utils["RL utilities<br/>[rl_utils.py]"]
node_gpu_probe["GPU probe environments<br/>[gpu_probe.py]"]

node_learner -->|"opens lessons"| node_fund_page
node_learner -->|"opens lessons"| node_transformer_lessons
node_learner -->|"opens lessons"| node_rl_lessons
node_learner -->|"opens lessons"| node_eval_lessons
node_learner -->|"opens lessons"| node_alignment_lessons
node_fund_page -->|"uses chat"| node_chat_helpers
node_fund_page -->|"uses page utilities"| node_streamlit_helpers
node_transformer_lessons -->|"uses chat"| node_chat_helpers
node_transformer_lessons -->|"uses page utilities"| node_streamlit_helpers
node_rl_lessons -->|"uses chat"| node_chat_helpers
node_rl_lessons -->|"uses page utilities"| node_streamlit_helpers
node_fund_page -.->|"introduces"| node_fund_exercises
node_fund_exercises -->|"uses utilities"| node_fund_utils
node_transformer_lessons -.->|"introduces"| node_transformer_build
node_transformer_lessons -.->|"introduces"| node_mechanistic_interp
node_transformer_lessons -.->|"introduces"| node_linear_probes
node_transformer_lessons -.->|"introduces"| node_sae_interp
node_transformer_lessons -.->|"introduces"| node_sae_circuits
node_transformer_lessons -.->|"introduces"| node_toy_saes
node_rl_lessons -.->|"introduces"| node_rl_intro
node_rl_lessons -.->|"introduces"| node_ppo
node_rl_lessons -.->|"introduces"| node_rlhf
node_rl_lessons -.->|"introduces"| node_alphazero
node_ppo -->|"uses environments"| node_gpu_envs
node_ppo -->|"uses helpers"| node_rl_utils
node_ppo -->|"uses environments"| node_gpu_probe
node_ppo -->|"uses plots"| node_plot_utils
node_eval_lessons -.->|"introduces"| node_dataset_generation
node_eval_lessons -.->|"introduces"| node_inspect_evals
node_eval_lessons -.->|"introduces"| node_llm_agents
node_eval_lessons -.->|"introduces"| node_ai_control
node_alignment_lessons -.->|"introduces"| node_misalignment
node_alignment_lessons -.->|"introduces"| node_reasoning_interp
node_alignment_lessons -.->|"introduces"| node_persona_vectors
node_alignment_lessons -.->|"introduces"| node_investigator_agents

click node_fund_page "https://github.com/arena-education/arena_materials/blob/main/chapter0_fundamentals/instructions/Home.py"
click node_fund_exercises "https://github.com/arena-education/arena_materials/blob/main/chapter0_fundamentals/exercises/part2_cnns/solutions.py"
click node_fund_utils "https://github.com/arena-education/arena_materials/blob/main/chapter0_fundamentals/exercises/fundamentals_utils.py"
click node_transformer_lessons "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/instructions/Home.py"
click node_transformer_build "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part1_transformer_from_scratch/solutions.py"
click node_mechanistic_interp "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part2_intro_to_mech_interp/solutions.py"
click node_linear_probes "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part31_linear_probes/solutions.py"
click node_sae_interp "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part33_interp_with_saes/solutions.py"
click node_sae_circuits "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part42_sae_circuits/solutions.py"
click node_toy_saes "https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part54_toy_models_of_superposition_and_saes/solutions.py"
click node_rl_lessons "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/instructions/Home.py"
click node_rl_intro "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part1_intro_to_rl/solutions.py"
click node_ppo "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part3_ppo/solutions.py"
click node_gpu_envs "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/gpu_env.py"
click node_rlhf "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part4_rlhf/solutions.py"
click node_alphazero "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part5_mcts_alphazero/solutions.py"
click node_eval_lessons "https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/instructions/Home.py"
click node_dataset_generation "https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part2_dataset_generation/solutions.py"
click node_inspect_evals "https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part3_running_evals_with_inspect/solutions.py"
click node_llm_agents "https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part4_llm_agents/solutions.py"
click node_ai_control "https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part5_ai_control/solutions.py"
click node_alignment_lessons "https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/instructions/Home.py"
click node_misalignment "https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part1_emergent_misalignment/solutions.py"
click node_reasoning_interp "https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part3_interpreting_reasoning_models/solutions.py"
click node_persona_vectors "https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part4_persona_vectors/solutions.py"
click node_investigator_agents "https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part5_investigator_agents/solutions.py"
click node_chat_helpers "https://github.com/arena-education/arena_materials/blob/main/st_chat.py"
click node_streamlit_helpers "https://github.com/arena-education/arena_materials/blob/main/st_dependencies.py"
click node_plot_utils "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/plotly_utils.py"
click node_rl_utils "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/rl_utils.py"
click node_gpu_probe "https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/gpu_probe.py"

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_fund_page,node_fund_exercises,node_fund_utils toneBlue
class node_transformer_lessons,node_transformer_build,node_mechanistic_interp,node_linear_probes,node_sae_interp,node_sae_circuits,node_toy_saes toneAmber
class node_rl_lessons,node_rl_intro,node_ppo,node_gpu_envs,node_rlhf,node_alphazero toneMint
class node_eval_lessons,node_dataset_generation,node_inspect_evals,node_llm_agents,node_ai_control toneRose
class node_alignment_lessons,node_misalignment,node_reasoning_interp,node_persona_vectors,node_investigator_agents,node_learner toneIndigo
class node_chat_helpers,node_streamlit_helpers,node_plot_utils,node_rl_utils,node_gpu_probe toneTeal
```

## Components

### ML Fundamentals

- [Fundamentals lessons](https://github.com/arena-education/arena_materials/blob/main/chapter0_fundamentals/instructions/Home.py): `chapter0_fundamentals/instructions/Home.py`
- [Core ML exercises](https://github.com/arena-education/arena_materials/blob/main/chapter0_fundamentals/exercises/part2_cnns/solutions.py): `chapter0_fundamentals/exercises/part2_cnns/solutions.py`
- [Fundamentals utilities](https://github.com/arena-education/arena_materials/blob/main/chapter0_fundamentals/exercises/fundamentals_utils.py): `chapter0_fundamentals/exercises/fundamentals_utils.py`

### Transformer Interpretability

- [Transformer lessons](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/instructions/Home.py): `chapter1_transformer_interp/instructions/Home.py`
- [Transformer construction](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part1_transformer_from_scratch/solutions.py): `chapter1_transformer_interp/exercises/part1_transformer_from_scratch/solutions.py`
- [Mechanistic interpretability](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part2_intro_to_mech_interp/solutions.py): `chapter1_transformer_interp/exercises/part2_intro_to_mech_interp/solutions.py`
- [Probes and steering](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part31_linear_probes/solutions.py): `chapter1_transformer_interp/exercises/part31_linear_probes/solutions.py`
- [SAE interpretation](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part33_interp_with_saes/solutions.py): `chapter1_transformer_interp/exercises/part33_interp_with_saes/solutions.py`
- [SAE circuits](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part42_sae_circuits/solutions.py): `chapter1_transformer_interp/exercises/part42_sae_circuits/solutions.py`
- [Toy models and SAEs](https://github.com/arena-education/arena_materials/blob/main/chapter1_transformer_interp/exercises/part54_toy_models_of_superposition_and_saes/solutions.py): `chapter1_transformer_interp/exercises/part54_toy_models_of_superposition_and_saes/solutions.py`

### Reinforcement Learning

- [RL lessons](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/instructions/Home.py): `chapter2_rl/instructions/Home.py`
- [Bandit foundations](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part1_intro_to_rl/solutions.py): `chapter2_rl/exercises/part1_intro_to_rl/solutions.py`
- [PPO training](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part3_ppo/solutions.py): `chapter2_rl/exercises/part3_ppo/solutions.py`
- [GPU environments](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/gpu_env.py): `chapter2_rl/exercises/gpu_env.py`
- [RLHF](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part4_rlhf/solutions.py): `chapter2_rl/exercises/part4_rlhf/solutions.py`
- [MCTS and AlphaZero](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/part5_mcts_alphazero/solutions.py): `chapter2_rl/exercises/part5_mcts_alphazero/solutions.py`

### LLM Evaluations

- [Evaluation lessons](https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/instructions/Home.py): `chapter3_llm_evals/instructions/Home.py`
- [Eval dataset design](https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part2_dataset_generation/solutions.py): `chapter3_llm_evals/exercises/part2_dataset_generation/solutions.py`
- [Run evaluations](https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part3_running_evals_with_inspect/solutions.py): `chapter3_llm_evals/exercises/part3_running_evals_with_inspect/solutions.py`
- [LLM agent tasks](https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part4_llm_agents/solutions.py): `chapter3_llm_evals/exercises/part4_llm_agents/solutions.py`
- [AI control](https://github.com/arena-education/arena_materials/blob/main/chapter3_llm_evals/exercises/part5_ai_control/solutions.py): `chapter3_llm_evals/exercises/part5_ai_control/solutions.py`

### Alignment Science

- [Alignment lessons](https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/instructions/Home.py): `chapter4_alignment_science/instructions/Home.py`
- [Emergent misalignment](https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part1_emergent_misalignment/solutions.py): `chapter4_alignment_science/exercises/part1_emergent_misalignment/solutions.py`
- [Reasoning interpretation](https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part3_interpreting_reasoning_models/solutions.py): `chapter4_alignment_science/exercises/part3_interpreting_reasoning_models/solutions.py`
- [Persona vectors](https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part4_persona_vectors/solutions.py): `chapter4_alignment_science/exercises/part4_persona_vectors/solutions.py`
- [Investigator agents](https://github.com/arena-education/arena_materials/blob/main/chapter4_alignment_science/exercises/part5_investigator_agents/solutions.py): `chapter4_alignment_science/exercises/part5_investigator_agents/solutions.py`

### Other components

- **Learner**
- [Course chat helpers](https://github.com/arena-education/arena_materials/blob/main/st_chat.py): `st_chat.py`
- [Page utilities](https://github.com/arena-education/arena_materials/blob/main/st_dependencies.py): `st_dependencies.py`
- [Plot utilities](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/plotly_utils.py): `chapter2_rl/exercises/plotly_utils.py`
- [RL utilities](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/rl_utils.py): `chapter2_rl/exercises/rl_utils.py`
- [GPU probe environments](https://github.com/arena-education/arena_materials/blob/main/chapter2_rl/exercises/gpu_probe.py): `chapter2_rl/exercises/gpu_probe.py`

## Connections

- Learner → Fundamentals lessons: opens lessons (evidence: `README.md`)
- Learner → Transformer lessons: opens lessons (evidence: `README.md`)
- Learner → RL lessons: opens lessons (evidence: `README.md`)
- Learner → Evaluation lessons: opens lessons (evidence: `README.md`)
- Learner → Alignment lessons: opens lessons (evidence: `README.md`)
- Fundamentals lessons → Course chat helpers: uses chat (evidence: `chapter0_fundamentals/instructions/Home.py`)
- Fundamentals lessons → Page utilities: uses page utilities (evidence: `chapter0_fundamentals/instructions/Home.py`)
- Transformer lessons → Course chat helpers: uses chat (evidence: `chapter1_transformer_interp/instructions/Home.py`)
- Transformer lessons → Page utilities: uses page utilities (evidence: `chapter1_transformer_interp/instructions/Home.py`)
- RL lessons → Course chat helpers: uses chat (evidence: `chapter2_rl/instructions/Home.py`)
- RL lessons → Page utilities: uses page utilities (evidence: `chapter2_rl/instructions/Home.py`)
- Fundamentals lessons → Core ML exercises: introduces (evidence: `README.md`)
- Core ML exercises → Fundamentals utilities: uses utilities (evidence: `chapter0_fundamentals/exercises/part2_cnns/solutions.py`)
- Transformer lessons → Transformer construction: introduces (evidence: `README.md`)
- Transformer lessons → Mechanistic interpretability: introduces (evidence: `README.md`)
- Transformer lessons → Probes and steering: introduces (evidence: `README.md`)
- Transformer lessons → SAE interpretation: introduces (evidence: `README.md`)
- Transformer lessons → SAE circuits: introduces (evidence: `README.md`)
- Transformer lessons → Toy models and SAEs: introduces (evidence: `README.md`)
- RL lessons → Bandit foundations: introduces (evidence: `README.md`)
- RL lessons → PPO training: introduces (evidence: `README.md`)
- RL lessons → RLHF: introduces (evidence: `README.md`)
- RL lessons → MCTS and AlphaZero: introduces (evidence: `README.md`)
- PPO training → GPU environments: uses environments (evidence: `chapter2_rl/exercises/part3_ppo/solutions.py`)
- PPO training → RL utilities: uses helpers (evidence: `chapter2_rl/exercises/part3_ppo/solutions.py`)
- PPO training → GPU probe environments: uses environments (evidence: `chapter2_rl/exercises/part3_ppo/solutions.py`)
- PPO training → Plot utilities: uses plots (evidence: `chapter2_rl/exercises/part3_ppo/solutions.py`)
- Evaluation lessons → Eval dataset design: introduces (evidence: `README.md`)
- Evaluation lessons → Run evaluations: introduces (evidence: `README.md`)
- Evaluation lessons → LLM agent tasks: introduces (evidence: `README.md`)
- Evaluation lessons → AI control: introduces (evidence: `README.md`)
- Alignment lessons → Emergent misalignment: introduces
- Alignment lessons → Reasoning interpretation: introduces
- Alignment lessons → Persona vectors: introduces
- Alignment lessons → Investigator agents: introduces
