SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.14279 · 2022

Causal Proxy Models for Concept-Based Model Explanations

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2209.14279.json · badge: /api/ran/2209.14279.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
frankaging/causal-proxy-model canonical (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
create_position_ids_from_input_ids Ran
ran; our contract draft was wrong, not the code
frankaging/causal-proxy-model/models/modelings_roberta.py
pointer only (licence: MIT); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("38f46ef4e03fee1c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Kowsher/Propulsion, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

flatten_logits Ran
ran on a synthesized input
frankaging/causal-proxy-model/experiments/libs.py
code served (permissive licence) · get_code("7870de46dfa10c6a")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a small DataFrame with columns containing lists/arrays
data = {
    'logits_a': [
        [0.1, 0.2, 0.3],
        [0.4, 0.5, 0.6]
    ],
    'logits_b': [
        [0.7, 0.8, 0.9],
        [1.0, 1.1, 1.2]
    ]
}

df = pd.DataFrame(data)

col_names = ['logits_a', 'logits_b']

ARGS = {
    'df': df,
    'col_names': col_names
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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_iit_examples Ran
ran on a synthesized input
frankaging/causal-proxy-model/experiments/libs.py
code served (permissive licence) · get_code("fbb97c2606ded64b")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a small dataframe with the required columns
data = {
    'id': [1, 2],
    'original_id': [10, 20],
    'edit_id': [100, 200],
    'is_original': [True, False],
    'edit_goal': ['goal1', 'goal2'],
    'edit_type': ['type1', 'type2'],
    'description': ['desc1', 'desc2'],
    'review_majority': ['pos', 'neg'],
    'food_aspect_majority': ['good', 'bad'],
    'ambiance_aspect_majority': ['cozy', 'loud'],
    'service_aspect_majority': ['fast', 'slow'],
    'noise_aspect_majority': ['quiet', 'noisy'],
    'prediction_model1': [0.8, 0.3],
    'prediction_model2': [0.6, 0.4],
    'extra_column': ['x', 'y']  # This column should be dropped
}

df = pd.DataFrame(data)

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
query_with_aspect_label Ran
ran on a synthesized input
frankaging/causal-proxy-model/experiments/libs.py
code served (permissive licence) · get_code("b22b5b4b99d369e2")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a sample DataFrame with the required columns for aspect-based queries
df = pd.DataFrame({
    'ambiance_aspect_majority': ['Positive', 'Negative', 'Positive', 'Neutral', 'Positive'],
    'service_aspect_majority': ['Positive', 'Positive', 'Negative', 'Positive', 'Positive'],
    'noise_aspect_majority': ['Positive', 'Positive', 'Positive', 'Negative', 'Positive'],
    'food_aspect_majority': ['Positive', 'Positive', 'Positive', 'Positive', 'Negative'],
    'review_id': [1, 2, 3, 4, 5],
    'text': ['great place', 'bad service', 'noisy', 'neutral', 'ok food']
})

ARGS = {
    'df': df,
    'ambiance': 'Positive',
    'service': 'Positive',
    'noise': 'Positive',
    'food': 'Positive'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
load_tf_weights_in_bert Not yet run
unverified (harvested, no recorded run)
frankaging/causal-proxy-model/models/modelings_bert.py
pointer only (licence: MIT); the stored copy get_code serves, from hqsiswiliam/lapdog, is pointer only (licence: NONE) · get_code("d009b630f4496e64")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hqsiswiliam/lapdog, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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.

FunctionAlso present inEarliest-datedOthers named
create_position_ids_from_input_ids 28 other papers
9 dated earlier, 19 later
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2107.14035 (2021-07)
ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback
2201.11732 (2022-01)
IGLUE: A Benchmark for Transfer Learning across Modalities, Tasks, and Languages
and 25 more not named here
load_tf_weights_in_bert 14 other papers
2 dated earlier, 11 later, 1 same year, order not determinable
2112.02505 (2021-12)
Causal Distillation for Language Models
2022.findings-emnlp.24 (2022 (year only))
AssistSR: Task-oriented Video Segment Retrieval for Personal AI Assistant
2206.07699 (2022-06)
Write and Paint: Generative Vision-Language Models are Unified Modal Learners
and 11 more not named here

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

Explainability methods for NLP systems encounter a version of the fundamental problem of causal inference: for a given ground-truth input text, we never truly observe the counterfactual texts necessary for isolating the causal effects of model representations on outputs. In response, many explainability methods make no use of counterfactual texts, assuming they will be unavailable. In this paper, we show that robust causal explainability methods can be created using approximate counterfactuals, which can be written by humans to approximate a specific counterfactual or simply sampled using metadata-guided heuristics. The core of our proposal is the Causal Proxy Model (CPM). A CPM explains a black-box model $\mathcal{N}$ because it is trained to have the same actual input/output behavior as $\mathcal{N}$ while creating neural representations that can be intervened upon to simulate the counterfactual input/output behavior of $\mathcal{N}$. Furthermore, we show that the best CPM for $\mathcal{N}$ performs comparably to $\mathcal{N}$ in making factual predictions, which means that the CPM can simply replace $\mathcal{N}$, leading to more explainable deployed models. Our code is available at https://github.com/frankaging/Causal-Proxy-Model.

For agents

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

get_harvested_code_for_paper("2209.14279")
get_code_for_paper("2209.14279")
have("2209.14279")

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

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

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

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

Connect an agent — have() is free.