The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
n_total: int64
n_token_misaligned: int64
token_misaligned_indices: list<item: int64>
child 0, item: int64
n_after_alignment_filter: int64
clean_accuracy: double
corrupted_accuracy: double
both_correct_accuracy: double
n_both_correct: int64
both_correct_indices: list<item: int64>
child 0, item: int64
not_both_correct_indices: list<item: int64>
child 0, item: int64
clean_baseline: double
corrupted_baseline: double
num_layers: int64
num_units: int64
total_units: int64
to
{'total_units': Value('int64'), 'num_layers': Value('int64'), 'num_units': Value('int64')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
n_total: int64
n_token_misaligned: int64
token_misaligned_indices: list<item: int64>
child 0, item: int64
n_after_alignment_filter: int64
clean_accuracy: double
corrupted_accuracy: double
both_correct_accuracy: double
n_both_correct: int64
both_correct_indices: list<item: int64>
child 0, item: int64
not_both_correct_indices: list<item: int64>
child 0, item: int64
clean_baseline: double
corrupted_baseline: double
num_layers: int64
num_units: int64
total_units: int64
to
{'total_units': Value('int64'), 'num_layers': Value('int64'), 'num_units': Value('int64')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Per-task neuron attribution scores for Modular Cognitive Architecture Emerges in Large Language Models
Code and analysis pipeline: https://github.com/Pengrui-Han/LLM_Modularity
This dataset contains the raw attribution-patching tensors that the GitHub release omits (they are ~6 GB). With these files you can run every overlap / ablation / statistics script in the repo without re-running attribution patching on a GPU.
Layout
results/<model>/<domain>/<task>/
neuron_attribution.pt float32 tensor, shape [num_layers, intermediate_size]
sorted_indices_positive.npy int array, shape [n_positive, 2] (layer, unit), best first
attribution_meta.json {"total_units", "num_layers", "num_units"}
baselines.json clean / corrupted baselines, both-correct accuracy, example indices
<model> is the HuggingFace id with / and . replaced by _ and -
(e.g. Qwen_Qwen2-5-32B-Instruct). <domain> is one of Lan, MD,
ToM, phys.
Models: Qwen2.5-32B-Instruct, Qwen2.5-72B-Instruct, OLMo-2-0325-32B-Instruct, Llama-3.1-70B-Instruct, Mistral-Large-Instruct-2407, Mistral-Small-24B-Instruct-2501 (the six models in the paper's main analysis).
Only tasks that passed the 60% both-correct inclusion filter have a
neuron_attribution.pt for a given model, so the task set differs slightly
per model (35–46 tasks). The task set is exactly the one in the GitHub
release (every task that has an attribution_meta.json there).
What the numbers are
For each MLP neuron i (the input to mlp.down_proj, i.e. the
post-activation hidden of size intermediate_size), evaluated at the final
prompt token with full-sequence teacher forcing:
attribution_i = (clean_act_i − corrupted_act_i) · ∂ metric / ∂ act_i
where the gradient is taken on the corrupted-prompt forward pass and the metric is the normalized log-probability of the correct answer (1 = clean baseline, 0 = corrupted baseline). Positive values mean that restoring the clean activation moves the model toward its clean behaviour. Scores are summed over the both-correct examples of a task.
Selecting a task circuit
The paper uses the top 0.1% positively attributed neurons:
import torch, numpy as np
attr = torch.load("results/<model>/<domain>/<task>/neuron_attribution.pt").numpy()
L, U = attr.shape
k = max(1, int(L * U * 0.1 / 100)) # 0.1 % ; use 1.0 for 1 %
idx = np.load("results/<model>/<domain>/<task>/sorted_indices_positive.npy")[:k] # (layer, unit) pairs
Equivalently, flatten attr, keep entries > 0, sort descending, take the
first k. sorted_indices_positive.npy is just that ordering precomputed.
Download
from huggingface_hub import snapshot_download
snapshot_download("barryhpr/LLM_Modularity_attribution", repo_type="dataset",
local_dir="LLM_Modularity") # drops files into results/…
Or a single model: add allow_patterns=["results/allenai_OLMo-2-0325-32B-Instruct/**"].
Citation
See the GitHub repository; citation will be added upon publication.
- Downloads last month
- 20