---
pretty_name: RE-PoLar
license: cc-by-nc-4.0
language:
- en
tags:
- llm
- layer-skipping
- layer-repetition
- programs-of-layers
- mcts
- routing
- reproduction
- math-reasoning
task_categories:
- text-generation
size_categories:
- 10M
## Explore the search trees
The dataset viewer above shows the searches as tables: pick `programs_` for the
programs and verdicts of each question (split = search seed), `answers_` for the
generated answers, `polar_split_programs_` for the PoLar split. The search trees
themselves, node by node, are on the
[project page's interactive explorer](https://datexis.github.io/RE-PoLar/).
## Layout
```
mcts_results//seed/dart-math-diff-/merged_mcts_samples.json.gz programs + verdicts per question
generated_answers//seed/diff.jsonl.gz one generated answer per evaluation
router_checkpoints//seed/diff.pt trained routers (weights only)
router_results//seed/diff.json router test results, per question
fixed_program//seed/diff.json fixed-program baseline, per question
menu_crossexec//diff.json.gz top-100 programs x 2,000 questions
menu_crossexec_heldout//diff.json.gz top-100 by train+val, run on the 500 test questions
polar_split/... same artifacts under //seed/
cross_checks/{their_search_our_split,our_search_polar_split}/...
DATA.md full schema of every file
```
``: `qwen15_moe_a27b`, `qwen25_3b`, `qwen25_7b`, `qwen3_8b`, `qwen3_32b`, `llama32_3b`;
``: search seed 42, 1, 7; ``: difficulty level 1-5. [`DATA.md`](DATA.md) documents every
field, the search configurations and which runs have no answer texts.
## Download and use
The code expects the files under `data/` of a clone of the repository:
```bash
git clone https://github.com/DATEXIS/RE-PoLar && cd RE-PoLar
pip install -U huggingface_hub
hf download SWAMBIT/re-polar --repo-type dataset --local-dir data # everything, ~6 GB
hf download SWAMBIT/re-polar --repo-type dataset --local-dir data --include "router_results/*" "fixed_program/*"
```
One file with the `datasets` library, or directly:
```python
from datasets import load_dataset
programs = load_dataset("SWAMBIT/re-polar", "programs_qwen3_8b", split="seed42")
print(programs[0]["sample_info"]["query_id"], len(programs[0]["final_valid_transitions"]))
import gzip, json
router = json.load(open("data/router_results/qwen3_8b/seed42/diff1.json"))
print(router["overall"]) # Base tau=0, router p@1 and p@5 on the 500 test questions
with gzip.open("data/generated_answers/qwen3_8b/seed42/diff1.jsonl.gz", "rt") as f:
print(json.loads(next(f)))
```
## Questions are not included
No file holds question text or reference answers, only `query_id`s. The MATH half of the
DART-Math pool traces back to the delisted `hendrycks/competition_math`, so the questions are
rebuilt locally from the public pool with the repository's code and joined on `query_id`
(`re_polar.datasets.dart_math`, `re_polar.datasets.polar_split`,
`re_polar.datasets.attach_mcts_questions`; see the repository README). The models sometimes
restate their question in a generated answer; such restatements are replaced by
`[question]` (DATA.md, "Generated text").
## Citation
```bibtex
@article{westerhoff2026repolar,
title={Programs-of-Layers in LLMs through the Lens of Cortical Areas},
author={Westerhoff, Justus and Olbrich, Stephan and Oraby, Hatem and Senn, Walter and Larkum, Matthew Evan and Gers, Felix Alexander},
journal={arXiv preprint arXiv:2609.31360},
year={2026}
}
```
## License
**CC BY-NC 4.0.** The generated answers and verdicts are outputs of the models above and
also fall under their licenses: Qwen1.5-MoE-A2.7B-Chat (Tongyi Qianwen License),
Qwen2.5-3B-Instruct (Qwen Research License), Qwen2.5-7B-Instruct, Qwen3-8B and Qwen3-32B
(Apache 2.0), LLaMA-3.2-3B-Instruct (Llama 3.2 Community License; Built with Llama). The routers embed
questions with Qwen3-Embedding-0.6B (Apache 2.0). The code is MIT-licensed, see the repository.