Dataset Viewer
The dataset viewer is not available for this subset.
Cannot get the split names for the config 'default' of the dataset.
Exception:    SplitsNotFoundError
Message:      The split names could not be parsed from the dataset config.
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 286, in get_dataset_config_info
                  for split_generator in builder._split_generators(
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      StreamingDownloadManager(base_path=builder.base_path, download_config=download_config)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 49, in _split_generators
                  import h5py
              ModuleNotFoundError: No module named 'h5py'
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 71, in compute_split_names_from_streaming_response
                  for split in get_dataset_split_names(
                               ~~~~~~~~~~~~~~~~~~~~~~~^
                      path=dataset,
                      ^^^^^^^^^^^^^
                      config_name=config,
                      ^^^^^^^^^^^^^^^^^^^
                      token=hf_token,
                      ^^^^^^^^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 340, in get_dataset_split_names
                  info = get_dataset_config_info(
                      path,
                  ...<6 lines>...
                      **config_kwargs,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 291, in get_dataset_config_info
                  raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
              datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

CSP-Atlas: Concept-Specific Neural Circuits in a Sparse Python Transformer

Frozen experimental artifacts for the paper CSP-Atlas: Concept-Specific Neural Circuits in a Sparse Python Transformer (Wilam, 2026). This repository holds the prompts, masks, and decomposition tables that the paper's figures and numbers are computed from; the model itself is openai/circuit-sparsity on the Hub.

  • Paper code: https://github.com/piotrwilam/AtlasCSP
  • Model used: openai/circuit-sparsity β€” 8-layer sparse Python transformer, 2,048-dim MLP output per layer.
  • Concept space: 106 Python concepts = 43 AST node types + 63 builtin objects.
  • Prompts: 63,800 object prompts (1,276 pairs Γ— 50 variations) + 2,848 checker + 2,861 token-checker.
  • Parameter sweep: Ξ΅ ∈ {0.001, 0.1, 0.5} Γ— C ∈ {20%, 50%, 80%} = 9 settings.

All claims in the paper regenerate from these files via the released code (pytest tests/test_paper_numbers.py).

Layout

CSP-Atlas/
β”œβ”€β”€ 11A_object_prompts.parquet          # 63,800 object prompts (the (AST Γ— builtin) Γ— 50 grid)
β”œβ”€β”€ 11B_checker_prompts.parquet         # 2,848 checker prompts (keyword present, concept absent)
β”œβ”€β”€ token_checker_prompts.parquet       # 2,861 token-checker prompts (broader set, all keyword contexts)
β”‚
β”œβ”€β”€ 12_object_activations.h5            # Raw MLP-output activations, object prompts (optional β€” derivable)
β”œβ”€β”€ 12_checker_activations.h5           # Raw MLP-output activations, checker prompts (optional)
β”‚
β”œβ”€β”€ 13_object_masks_eps{Ξ΅}_cons{C}.h5   # 9 files β€” binarised + marginalised universal masks per (Ξ΅, C)
β”œβ”€β”€ 13_checker_masks_eps{Ξ΅}_cons{C}.h5  # 9 files β€” binarised checker masks per (Ξ΅, C)
β”œβ”€β”€ token_checker_masks.h5              # Token-checker masks (single setting: Ξ΅=0.5, C=0.8)
β”‚
β”œβ”€β”€ 14_summary.csv                              # 9 rows β€” global concept/token fractions per (Ξ΅, C)
β”œβ”€β”€ 14_target_checker_eps{Ξ΅}_cons{C}.csv        # 9 files β€” per-object Γ— per-layer "co / sh / to" decomposition
β”‚
β”œβ”€β”€ relaxed_modularity_scores.csv       # Β§6.1 β€” significant-layer count per concept Γ— trim level p ∈ {0, 0.05, 0.1, 0.25}
β”œβ”€β”€ relaxed_modularity_detail.csv       # Β§6.1 β€” full per-layer Jaccard trim-mean values
β”‚
β”œβ”€β”€ token_independence_summary.csv      # Per-object: concept_fraction, token_fraction, A_size, A∩B, A\B, B\A
β”œβ”€β”€ token_independence_detail.csv       # Per-object Γ— per-layer breakdown
└── token_independence_no_keyword.csv   # The 48 tokenless concepts (no checker confound applies)

File schemas

HDF5 mask files (13_*.h5, token_checker_masks.h5, universal_106x50.h5)

Layer-major group layout. Datasets are boolean vectors of length 2,048 (one bit per MLP-output dimension):

/metadata
    .attrs: {epsilon, consistency_thresh, n_layers=8, n_pairs=1276}
    /ast_nodes        β€” array of 43 AST node names
    /builtin_objs     β€” array of 63 builtin object names
/universal_masks
    /layer_0/{concept_name}      β€” (2048,) bool
    /layer_1/{concept_name}      β€” (2048,) bool
    …
    /layer_7/{concept_name}      β€” (2048,) bool
/pair_masks
    /layer_0/{ast}__{builtin}    β€” (2048,) bool    (e.g. AnnAssign__abs)
    …
/metrics
    aggregate statistics per layer (sizes, intersection counts)

Concept names use the convention ast__<NodeType> or builtin__<object> (double underscore).

Prompt parquets

11A_object_prompts.parquet (63,800 rows):

column type meaning
ast_node str AST node type (e.g. For)
builtin_obj str Builtin name (e.g. bytearray)
variation_id int 0..49 (50 variations per pair)
prompt_text str The Python snippet
sequence_loss float Model's per-token loss on the snippet (used for filtering)
token_length int Tokenizer output length
ast_verified bool True if ast.parse() round-trips with the target node present

11B_checker_prompts.parquet (2,848 rows) and token_checker_prompts.parquet (2,861 rows):

column type meaning
object str Target concept (e.g. ast__Break)
keyword str The bare token under test (e.g. break)
variation_id int 0..49
prompt_text str Python that contains the keyword but excludes the concept (string literal, comment, var name, …)

Decomposition CSVs (14_target_checker_*.csv)

One row per testable concept (58 of them), 8 layer columns (L0–L7). Each cell encodes the three-way decomposition as a string:

co / sh / to

β€” concept-only |A \ B|, shared |A ∩ B|, token-only |B \ A|. From these the concept fraction co / (co + sh) is recovered.

Global summary (14_summary.csv)

One row per (Ξ΅, C) setting. Columns: epsilon, consistency, n_testable, n_ast, n_builtin, mean_concept_fraction, mean_token_fraction, ast_concept_fraction, ast_token_fraction, blt_concept_fraction, blt_token_fraction, mean_A_size, mean_B_size.

Modularity (relaxed_modularity_scores.csv)

column meaning
(index) concept name
type ast or builtin
p=0.0, p=0.05, p=0.1, p=0.25 Number of layers (0–8) at which the concept's mean Jaccard to its k-nearest-neighbour shell, trimmed at trim level p, exceeds the permutation null at significance 0.05. The paper's Β§6.1 Break-at-top result is p=0.0 == 3.

relaxed_modularity_detail.csv is the un-aggregated per-layer per-trim-level Jaccard means feeding the score table.

Token-independence (token_independence_*.csv)

summary.csv is one row per testable object: object, type, keyword, concept_fraction, token_fraction, A_size, A_and_B, A_only, B_only (averaged across layers).

detail.csv breaks the same statistics out by (object, layer).

no_keyword.csv is the 48 concepts (19 tokenless AST + 29 tokenless builtins) for which no checker confound applies β€” included so downstream users can see the full 106-concept universe.

Quickstart

The dataset is normally accessed through the AtlasCSP code repository, which contains loaders that auto-download missing files from this Hub mirror:

from csp_atlas.io import (
    load_universal_masks,        # 13_object_masks_*.h5
    load_pair_masks,             # 13_object_masks_*.h5
    load_concept_inventory,      # the 43 + 63 names
    load_summary,                # 14_summary.csv
    load_target_checker,         # 14_target_checker_*.csv
    load_modularity_scores,      # relaxed_modularity_scores.csv
    load_prompts,                # 11A / 11B / token_checker
)

# Universal mask set at the paper's reference setting:
masks = load_universal_masks(eps=0.5, cons=0.8)        # dict[concept] -> dict[layer] -> set[int]
ast, builtin = load_concept_inventory(eps=0.5, cons=0.8)  # 43, 63
prompts = load_prompts(kind="object")                  # the 63,800-row DataFrame

Direct download with huggingface_hub:

from huggingface_hub import hf_hub_download
path = hf_hub_download(
    repo_id="piotrwilam/CSP-Atlas",
    filename="13_object_masks_eps0.5_cons0.8.h5",
    repo_type="dataset",
)

Or with datasets (parquets only):

from datasets import load_dataset
ds = load_dataset("piotrwilam/CSP-Atlas", data_files="11A_object_prompts.parquet")

Reproducing the paper

The paper's claims are locked in tests/test_paper_numbers.py in the code repo. With the dataset in place at $CSP_ATLAS_DATA_ROOT (or the default local mirror) and a uv venv:

git clone https://github.com/piotrwilam/AtlasCSP
cd AtlasCSP
uv sync
export CSP_ATLAS_DATA_ROOT=/path/to/CSP-Atlas
pytest tests/test_paper_numbers.py -v
python experiments/fig1_atomicity_dendrogram.py

The single dendrogram figure (Figure 1) is produced by experiments/fig1_atomicity_dendrogram.py, driven by configs/paper/figure1_atomicity_dendrogram.yaml.

Generation pipeline

The four-stage extraction (11_ β†’ 12_ β†’ 13_ β†’ 14_) is documented in circuits/README.md in the code repo:

Stage Step Output
11 Prompt generation (circuits/prompts/) 11A, 11B, token_checker parquets
12 Forward-pass extraction (circuits/extraction/) 12_*_activations.h5 (last-token MLP outputs, 8 layers)
13 Binarisation + marginalisation 13_object_masks_*.h5, 13_checker_masks_*.h5 per (Ξ΅, C)
14 Decomposition vs checker masks 14_summary.csv, 14_target_checker_*.csv

The relaxed_modularity_*.csv and token_independence_*.csv are downstream analyses computed on stage 13/14 outputs.

What is not in this repo

  • Model weights β€” openai/circuit-sparsity is loaded from its own Hub repo at runtime; not duplicated here.
  • Pre-paper development snapshots β€” checkpoints/, earlier 115-concept experiments, exploratory runs.
  • Figure PDFs β€” the figure files for the paper live in the AtlasCSP code repo under results/.

Citation

@article{Wilam2026CSPAtlas,
  title   = {CSP-Atlas: Concept-Specific Neural Circuits in a Sparse Python Transformer},
  author  = {Wilam, Piotr},
  year    = {2026},
  url     = {https://github.com/piotrwilam/AtlasCSP}
}

License

Apache-2.0 β€” see LICENSE. The model openai/circuit-sparsity is distributed under its own licence on its own Hub repo and is not redistributed here.

Downloads last month
251