SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1905.07631 · 2019

Disentangled Attribution Curves for Interpreting Random Forests and Boosted Trees

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 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/1905.07631.json · badge: /api/ran/1905.07631.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
csinva/disentangled-attribution-curves canonical (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
FunctionStatusWhere it lives
dac Ran
ran; our contract draft was wrong, not the code
csinva/disentangled-attribution-curves/dac/dac.py
code served (permissive licence) · get_code("ed67d72d4f7f7347")
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 ndarray, ndim 1, dtype family float, shape (1,) 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 numpy as np
from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier
from sklearn.datasets import make_regression, make_classification

np.random.seed(0)

# Create a small dataset
X_train, y_train = make_regression(n_samples=20, n_features=4, random_state=0)
X_train = X_train.astype(np.float32)
y_train = y_train.astype(np.float32)

# Train a random forest model
forest = RandomForestRegressor(n_estimators=2, max_depth=3, random_state=0)
forest.fit(X_train, y_train)

# Create input and outcome spaces
input_space_x = X_train[:10].astype(np.float32)  # Shape: (10, 4)
outcome_space_y = y_train[:10].astype(np.float32)  # Shape: (10,)

# Create an assignment (a single sample point)
assignment = np.array([[1.0, -0.5, 0.3, 0.8]], dtype=np.float32)  # Shape: (1, 4)

# Create a binary selection vector S (which features are relevant)
S = np.array([1, 1, 0, 1], dtype=int)  # Shape: (4,)

ARGS = {
    'forest': forest,
    'input_space_x': input_space_x,
    'outcome_space_y': outcome_space_y,
    'assignment': assignment,
    'S': S,
    'continuous_y': True,
    'class_id': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (1,) — shape (1,) 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
fast_interactions Ran
ran; our contract draft was wrong, not the code
csinva/disentangled-attribution-curves/dac/dac.py
code served (permissive licence) · get_code("c9e08c023d88b607")
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 float64, ndim 0, dtype family float, shape () 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 numpy as np
from sklearn.tree import DecisionTreeClassifier

# Create a simple decision tree model
X_train = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [2.0, 3.0, 4.0, 5.0],
    [3.0, 4.0, 5.0, 6.0],
    [4.0, 5.0, 6.0, 7.0],
    [5.0, 6.0, 7.0, 8.0]
])
y_train = np.array([0, 1, 0, 1, 0])

model = DecisionTreeClassifier(max_depth=2, random_state=42)
model.fit(X_train, y_train)

# Create input space with 2 samples and 4 features
input_space_x = np.array([
    [1.5, 2.5, 3.5, 4.5],
    [2.5, 3.5, 4.5, 5.5]
])

# Create outcome space with 2 outcomes
outcome_space_y = np.array([0, 1])

# Create assignment (single sample with 4 features)
assignment = np.array([[2.0, 3.0, 4.0, 5.0]])

# Create S - binary mask indicating which features are relevant (4 features)
S = np.array([1, 1, 0, 1])

ARGS = {
    'model': model,
    'input_space_x': input_space_x,
    'outcome_space_y': outcome_space_y,
    'assignment': assignment,
    'S': S,
    'continuous_y': False,
    'class_id': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () 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
fix_shape Ran
ran, honoured the contract we drafted
csinva/disentangled-attribution-curves/dac/dac.py
code served (permissive licence) · get_code("f8621e328b9a6e08")
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 ndarray, ndim 2, dtype family float, shape (4, 2) 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 numpy as np

# Analyze the function:
# - distribution: a 2D numpy array with shape (n, 2) where first column has values, second has probabilities
# - unique_Y: a 1D numpy array of unique labels/values
# 
# The function checks if distribution.shape[0] == len(unique_Y)
# If not, it reshapes unique_Y to (-1, 1), creates a zeros array for probs,
# concatenates them, then matches values from distribution to unique_Y

# Create a distribution array: shape (3, 2) - 3 entries with value and probability
distribution = np.array([
    [1.0, 0.5],
    [3.0, 0.3],
    [2.0, 0.2]
], dtype=np.float32)

# Create unique_Y array with 4 unique values (different from distribution.shape[0]=3)
# This will trigger the reshape logic
unique_Y = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float32)

ARGS = {
    "distribution": distribution,
    "unique_Y": unique_Y
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 2) — shape (4, 2) 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
get_means_and_cov Ran
ran; our contract draft was wrong, not the code
csinva/disentangled-attribution-curves/experiments/simulation/run_sim_synthetic.py
code served (permissive licence) · get_code("e2a9697f7b97b23b")
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 numpy as np
from scipy.stats import random_correlation

np.random.seed(0)

ARGS = {
    "num_vars": 5,
    "fix_eigs": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
generate_y Not yet run
unverified (harvested, no recorded run)
csinva/disentangled-attribution-curves/experiments/simulation/run_sim_synthetic.py
code served (permissive licence) · get_code("d31ae2cc3537a9fb")
How it ran

no invocation recorded.

get_X_y Not yet run
unverified (harvested, no recorded run)
csinva/disentangled-attribution-curves/experiments/simulation/run_sim_synthetic.py
code served (permissive licence) · get_code("3f8351cd8ac08770")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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

Tree ensembles, such as random forests and AdaBoost, are ubiquitous machine learning models known for achieving strong predictive performance across a wide variety of domains. However, this strong performance comes at the cost of interpretability (i.e. users are unable to understand the relationships a trained random forest has learned and why it is making its predictions). In particular, it is challenging to understand how the contribution of a particular feature, or group of features, varies as their value changes. To address this, we introduce Disentangled Attribution Curves (DAC), a method to provide interpretations of tree ensemble methods in the form of (multivariate) feature importance curves. For a given variable, or group of variables, DAC plots the importance of a variable(s) as their value changes. We validate DAC on real data by showing that the curves can be used to increase the accuracy of logistic regression while maintaining interpretability, by including DAC as an additional feature. In simulation studies, DAC is shown to out-perform competing methods in the recovery of conditional expectations. Finally, through a case-study on the bike-sharing dataset, we demonstrate the use of DAC to uncover novel insights into a dataset.

For agents

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

get_harvested_code_for_paper("1905.07631")
get_code_for_paper("1905.07631")
have("1905.07631")

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

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

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

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

Connect an agent — have() is free.