explaingit

tonyxichen/oasr

Analysis updated 2026-05-18

6PythonAudience · researcher

TLDR

Official code for an ICML 2026 paper showing that a single LLM task can be solved by multiple structurally distinct internal circuits, not just one.

Mindmap

mindmap
  root((OASR))
    What it does
      Circuit discovery
      Sheaf repulsion
      LLM interpretability
    Tech stack
      Python
      PyTorch
      transformer-lens
    Use cases
      Reproduce paper results
      Run circuit algorithms
      Compare circuit overlap
    Audience
      ML researchers
      Interpretability researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Reproduce the paper's OASR experiments showing competing circuits for the same LLM task.

USE CASE 2

Run ACDC, EAP, Edge Pruning, or DiscoGP circuit discovery on GPT-2 or Pythia.

USE CASE 3

Compare discovered circuits' overlap using the bundled IoU and visualization tools.

USE CASE 4

Study mechanistic interpretability benchmarks like IOI, BLiMP, and Docstring.

What is it built with?

PythonPyTorchtransformer-lensJupyter

How does it compare?

tonyxichen/oasrashishdevasia/ha-proton-drive-backupbenchflow-ai/skillsbench-trajectories
Stars666
LanguagePythonPythonPython
Last pushed2026-06-14
MaintenanceMaintained
Setup difficultymoderateeasy
Complexity2/51/5
Audienceresearcherops devopsresearcher

Figures from each repo's GitHub metadata at analysis time.

In plain English

OASR is the official code release for the ICML 2026 paper All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMs. It accompanies research into how large language models implement specific tasks internally. Researchers studying LLMs often look for circuits, small subsets of connections inside the model responsible for a particular behavior. A common assumption, the Functional Anisotropy Hypothesis, is that each task maps to one unique or nearly unique circuit. This paper challenges that by showing empirically that the same task can be handled by multiple distinct circuits sharing almost no internal structure, yet each working faithfully on its own. To find these competing circuits systematically, the paper introduces Overlap-Aware Sheaf Repulsion, or OASR, a method that adds a penalty discouraging newly found circuits from reusing edges already identified in previous runs. This surfaces structurally different solutions rather than rediscovering the same one. The experiments run across several circuit discovery algorithms, ACDC, EAP, Edge Pruning, and DiscoGP, and benchmark tasks including IOI, BLiMP, and Docstring. One notable finding is an ultra sparse three edge circuit for the IOI task that reaches 86.7 percent accuracy on its own, yet none of its three edges turns out to be strictly required once the task is broken into its underlying template variants. The paper explains this by proposing that many low overlap, faithful circuits can exist for the same behavior once a model represents information in a high dimensional, overlapping way. The repository contains Python implementations of all four algorithms, shared utility code for loading models and datasets, Jupyter notebooks that reproduce each paper experiment, and saved circuit artifacts. It requires Python 3.10 or later, with PyTorch and the transformer-lens library as key dependencies. Supported models include GPT-2 small and Pythia. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Walk me through installing OASR and running the notebook API on GPT-2.
Prompt 2
Explain what Overlap-Aware Sheaf Repulsion does and why it finds multiple circuits.
Prompt 3
How do I reproduce the ACDC traversal sensitivity experiment from the paper?
Prompt 4
What is the Functional Anisotropy Hypothesis this paper argues against?

Frequently asked questions

What is oasr?

Official code for an ICML 2026 paper showing that a single LLM task can be solved by multiple structurally distinct internal circuits, not just one.

What language is oasr written in?

Mainly Python. The stack also includes Python, PyTorch, transformer-lens.

Who is oasr for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.