SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.20420 · 2026

Concept Component Analysis: A Principled Approach for Concept Extraction in LLMs

Dong Gong, Yuhang Liu, Javen Shi, Anton Van Den Hengel, Erdun Gao

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2601.20420.json · badge: /api/ran/2601.20420.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
JoshEngels/SAE-Probes canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
get_sae_paths Ran
ran; our contract draft was wrong, not the code
JoshEngels/SAE-Probes/train_sae_probes.py
code served (permissive licence) · get_code("21a977e12f63a277")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'dataset': 'openwebtext',
    'layer': 12,
    'sae_id': 'model/16384/8.5',
    'reg_type': 'l1',
    'binarize': False,
    'model_name': 'gemma-2-9b',
    'setting': 'normal',
    'extra_string': '_'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_sorted_indices Ran
ran; our contract draft was wrong, not the code
JoshEngels/SAE-Probes/train_sae_probes.py
code served (permissive licence) · get_code("2ad2be813aadb8fa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# X_train_sae is a 2D tensor where:
# - First dimension is batch size
# - Second dimension is feature/SAE dimension
# The function indexes it with y_train == 1 and y_train == 0, so we need samples of both classes
X_train_sae = torch.randn(4, 5)

# y_train is a 1D tensor of binary labels (0 or 1)
# Must have same length as X_train_sae batch dimension
y_train = torch.tensor([0, 1, 0, 1])

ARGS = {
    "X_train_sae": X_train_sae,
    "y_train": y_train,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int, shape (5,) — shape (5,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_activations Ran
ran, honoured the contract we drafted
JoshEngels/SAE-Probes/train_sae_probes.py
code served (permissive licence) · get_code("00330f81f32ca750")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory and file for the sparse tensor
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "activations.pt")

# Create a small sparse tensor
dense_tensor = torch.randn(2, 4)
sparse_tensor = dense_tensor.to_sparse()

# Save it
torch.save(sparse_tensor, temp_path)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_activations Ran
ran, honoured the contract we drafted
JoshEngels/SAE-Probes/generate_sae_activations.py
code served (permissive licence) · get_code("6331194a2c955ad8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import tempfile
import os

torch.manual_seed(0)

# Create a sparse tensor and save it to a temporary file
sparse_tensor = torch.sparse_coo_tensor(
    indices=torch.tensor([[0, 1, 2], [0, 1, 2]]),
    values=torch.tensor([1.0, 2.0, 3.0]),
    size=(3, 4)
)

# Create a temporary file to store the sparse tensor
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "activations.pt")
torch.save(sparse_tensor, temp_path)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (3, 4) — shape (3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_files Ran
ran; our contract draft was wrong, not the code
JoshEngels/SAE-Probes/combine_results.py
code served (permissive licence) · get_code("40ff4e9796e62e46")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
import os

# Create a temporary pickle file with valid metrics data
def create_test_metrics_file():
    metrics = [
        {
            'sae_id': ('id0', 'id1', 'gemma_2b_layer5/sae_model', '0.95'),
            'other_field': 'value1'
        },
        {
            'sae_id': ('id0', 'id1', 'gemma_2b_layer10/sae_model', '1.23'),
            'other_field': 'value2'
        }
    ]
    
    # Create a temporary file
    fd, path = tempfile.mkstemp(suffix='.pkl')
    os.close(fd)
    
    with open(path, 'wb') as f:
        pickle.dump(metrics, f)
    
    return path

# Create test files
file1 = create_test_metrics_file()
file2 = create_test_metrics_file()

files = [file1, file2]
model_name = 'gemma-2-2b'

ARGS = {
    'files': files,
    'model_name': model_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_metrics Ran
ran; our contract draft was wrong, not the code
JoshEngels/SAE-Probes/combine_results.py
code served (permissive licence) · get_code("ccb36f354da64a43")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
import os

# Create a temporary pickle file with valid metrics data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'metrics.pkl')

# Create sample metrics data matching the expected structure
metrics_data = [
    {
        'sae_id': ('prefix', 'middle', 'layer_5_transformer/blocks_2_attention', '0.8'),
        'other_field': 'value1'
    },
    {
        'sae_id': ('prefix', 'middle', 'layer_10_mlp/neurons_3_output', '1.5'),
        'other_field': 'value2'
    }
]

with open(temp_file, 'wb') as f:
    pickle.dump(metrics_data, f)

ARGS = {
    'file': temp_file,
    'model_name': 'gemma-2-2b'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_sae_features Not yet run
unverified (harvested, no recorded run)
JoshEngels/SAE-Probes/combine_results.py
code served (permissive licence) · get_code("76a9c6fb15db6ba3")
How it ran

no invocation recorded.

get_sae_paths Not yet run
unverified (harvested, no recorded run)
JoshEngels/SAE-Probes/generate_model_and_sae_multi_token_acts.py
code served (permissive licence) · get_code("8f4af087abfa3069")
How it ran

no invocation recorded.

get_sae_paths_normal Not yet run
unverified (harvested, no recorded run)
JoshEngels/SAE-Probes/generate_sae_activations.py
code served (permissive licence) · get_code("5bcb0fa4d70ed492")
How it ran

no invocation recorded.

get_sae_paths_scarcity Not yet run
unverified (harvested, no recorded run)
JoshEngels/SAE-Probes/generate_sae_activations.py
code served (permissive licence) · get_code("bb473dd1d109dda0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Developing human understandable interpretation of large language models (LLMs) becomes increasingly critical for their deployment in essential domains. Mechanistic interpretability seeks to mitigate the issues through extracts humaninterpretable process and concepts from LLMs' activations. Sparse autoencoders (SAEs) have emerged as a popular approach for extracting interpretable and monosemantic concepts by decomposing the LLM internal representations into a dictionary. Despite their empirical progress, SAEs suffer from a fundamental theoretical ambiguity: the well-defined correspondence between LLM representations and human-interpretable concepts remains unclear. This lack of theoretical grounding gives rise to several methodological challenges, including difficulties in principled method design and evaluation criteria. In this work, we show that, under mild assumptions, LLM representations can be approximated as a linear mixture of the log-posteriors over concepts given the input context, through the lens of a latent variable model where concepts are treated as latent variables. This motivates a principled framework for concept extraction, namely Concept Component Analysis (ConCA), which aims to recover the log-posterior of each concept from LLM representations through a unsupervised linear unmixing process. We explore a specific variant, termed sparse ConCA, which leverages a sparsity prior to address the inherent ill-posedness of the unmixing problem. We implement 12 sparse ConCA variants and demonstrate their ability to extract meaningful concepts across multiple LLMs, offering theory-backed advantages over SAEs.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2601.20420")
get_code_for_paper("2601.20420")
have("2601.20420")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2601.20420.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2601.20420.svg)](https://syntology.ai/paper/2601.20420)

Connect an agent — have() is free.