SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.08690 · ICML · 2020

Generalized and Scalable Optimal Sparse Decision Trees

Jimmy Lin, Chudi Zhong, Diane Hu, Cynthia Rudin, Margo Seltzer

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 5 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2006.08690.json · badge: /api/ran/2006.08690.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
zhichen96/interpretable_ml_metamaterials community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
bg_existence_labels Ran
ran on a synthesized input
zhichen96/interpretable_ml_metamaterials/utils.py
code served (permissive licence) · get_code("269762112549ddc2")
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 (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 numpy as np

# Create sample dispersion curves
# Shape: (batch_size, num_bands, num_k_points)
# batch_size=2, num_bands=4, num_k_points=5
np.random.seed(0)
batch_size = 2
num_bands = 4
num_k_points = 5

# Create realistic dispersion data with some band gaps
# Values should be frequency-like (positive, increasing with k-points)
dispersion = np.zeros((batch_size, num_bands, num_k_points))
for b in range(batch_size):
    for band in range(num_bands):
        # Create bands that increase with k-point index
        base = band * 2.0
        dispersion[b, band, :] = base + np.linspace(0, 2, num_k_points) + np.random.normal(0, 0.1, num_k_points)

# Create frequency ranges to check for band gaps
# Shape: (K, 2) where K is number of target frequency ranges
# Each row is [freq_lower, freq_upper]
freq_ranges = np.array([
    [0.5, 1.5],
    [2.5, 3.5],
    [4.5, 5.5],
    [6.5, 7.5]
])

# Minimum size threshold for band gaps
size_min = 0.01

ARGS = {
    "dispersion": dispersion,
    "freq_ranges": freq_ranges,
    "size_min": size_min
}
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 (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
binarize Ran
ran on a synthesized input
zhichen96/interpretable_ml_metamaterials/create_bin_datasets.py
code served (permissive licence) · get_code("9e227a78a07c0705")
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 simple DataFrame with continuous features and a target column
np.random.seed(0)
df = pd.DataFrame({
    'feature1': [1.0, 2.0, 3.0, 4.0, 5.0],
    'feature2': [10.0, 20.0, 30.0, 40.0, 50.0],
    'target': [0, 1, 0, 1, 1]
})

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 int 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
cart Ran
ran on a synthesized input
zhichen96/interpretable_ml_metamaterials/gosdt/osdt_sup.py
code served (permissive licence) · get_code("0b07f21520e6f2be")
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, 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 numpy as np
import math
import sklearn.tree
import sklearn.metrics

# Create synthetic binary classification data
np.random.seed(0)
n_samples = 20
n_features = 4

# Generate features
x = np.random.randn(n_samples, n_features).astype(np.float32)

# Generate binary labels
y = np.random.randint(0, 2, n_samples)

# Count positive and negative samples
P = np.sum(y == 1)
N = np.sum(y == 0)

# Define parameters
name = 'acc'  # metric name
n = n_samples
lamb = 0.1  # regularization parameter
w = 2.0  # weight for false negatives
theta = 0.1  # threshold for partial AUC
MAXDEPTH = 5

ARGS = {
    'x': x,
    'y': y,
    'name': name,
    'n': n,
    'P': P,
    'N': N,
    'lamb': lamb,
    'w': w,
    'theta': theta,
    'MAXDEPTH': MAXDEPTH
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_false Ran
ran, honoured the contract we drafted
zhichen96/interpretable_ml_metamaterials/gosdt/osdt_imb_v9.py
pointer only (licence: MIT); the stored copy get_code serves, from ruizhang1996/optimal-sparse-survival-trees-public, is pointer only (licence: NOASSERTION) · get_code("6378f6dece0a3ee1")
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 ruizhang1996/optimal-sparse-survival-trees-public, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

get_fixed_false Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhichen96/interpretable_ml_metamaterials/gosdt/osdt_imb_v9.py
pointer only (licence: MIT); the stored copy get_code serves, from ruizhang1996/optimal-sparse-survival-trees-public, is pointer only (licence: NOASSERTION) · get_code("91a29b5d2f76fec8")
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 ruizhang1996/optimal-sparse-survival-trees-public, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

get_split Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhichen96/interpretable_ml_metamaterials/gosdt/osdt_imb_v9.py
pointer only (licence: MIT); the stored copy get_code serves, from ruizhang1996/optimal-sparse-survival-trees-public, is pointer only (licence: NOASSERTION) · get_code("3124c55e58633650")
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 ruizhang1996/optimal-sparse-survival-trees-public, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

shape_frequency_features Ran
ran on a synthesized input
zhichen96/interpretable_ml_metamaterials/utils.py
code served (permissive licence) · get_code("268422e08b9dd3d2")
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 (2, 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 to understand what's needed:
# - x: n*n_unique numpy array of raw features
# - windows: tuple of k sliding windows (shapes), each window is a 2D numpy array
# 
# The function:
# 1. Calls vector2symmatrix(x) which expects x to be n * (d/2*(d/2+1)/2)
# 2. Iterates over windows, accessing window.shape[0] and window.shape[1]
# 3. Uses windows as 2D arrays in slicing operations with * operator

# For d=4, we have d/2*(d/2+1)/2 = 2*3/2 = 3 unique pixels
# For d=6, we have d/2*(d/2+1)/2 = 3*4/2 = 6 unique pixels

# Let's use d=4, so n_unique=3
n = 2  # batch size
n_unique = 3  # for d=4: 2*(2+1)/2 = 3

# Create raw features x: shape (n, n_unique)
x = np.random.randn(n, n_unique).astype(np.float32)

# Create windows - these are sliding window patterns (2D arrays)
# For a d=4 unit cell, we can use various window sizes
# Let's create two windows of different sizes
window1 = np.array([[1, 0], [0, 1]], dtype=np.float32)  # 2x2 window
window2 = np.array([[1, 1, 0], [0, 1, 1]], dtype=np.float32)  # 2x3 window

windows = (window1, window2)

ARGS = {
    'x': x,
    'windows': windows
}
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 (2, 2) — shape (2, 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
vector2symmatrix Ran
ran on a synthesized input
zhichen96/interpretable_ml_metamaterials/utils.py
code served (permissive licence) · get_code("f59d159f610c50ed")
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 3, dtype family float, shape (2, 4, 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 numpy as np

# For a symmetric unit cell matrix of size d x d,
# the number of unique pixels is d/2 * (d/2 + 1) / 2
# We need to find d such that n_unique = d/2 * (d/2 + 1) / 2

# Let's use d = 4
# n_unique = 4/2 * (4/2 + 1) / 2 = 2 * 3 / 2 = 3

d = 4
n_unique = (d // 2) * (d // 2 + 1) // 2  # = 2 * 3 / 2 = 3

# Create batch size 2 with 3 unique pixel values
batch_size = 2
x = np.random.randn(batch_size, n_unique).astype(np.float32)

ARGS = {
    "x": x
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 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
get_z Not yet run
unverified (harvested, no recorded run)
zhichen96/interpretable_ml_metamaterials/gosdt/osdt_sup.py
pointer only (licence: MIT); the stored copy get_code serves, from ruizhang1996/optimal-sparse-survival-trees-public, is pointer only (licence: NOASSERTION) · get_code("853df50d15ebc2ef")
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 ruizhang1996/optimal-sparse-survival-trees-public, and GitHub could not classify the licence of that repository (NOASSERTION). 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 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 4 later) and 5 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
get_false 1 other paper
1 later
2401.15330 (2024-01)
Optimal Sparse Survival Trees
get_fixed_false 1 other paper
1 later
2401.15330 (2024-01)
Optimal Sparse Survival Trees
get_split 1 other paper
1 later
2401.15330 (2024-01)
Optimal Sparse Survival Trees
get_z 1 other paper
1 later
2401.15330 (2024-01)
Optimal Sparse Survival Trees

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-22.

Repositories linked to this paper

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

Abstract

Decision tree optimization is notoriously difficult from a computational perspective but essential for the field of interpretable machine learning. Despite efforts over the past 40 years, only recently have optimization breakthroughs been made that have allowed practical algorithms to find optimal decision trees. These new techniques have the potential to trigger a paradigm shift where it is possible to construct sparse decision trees to efficiently optimize a variety of objective functions without relying on greedy splitting and pruning heuristics that often lead to suboptimal solutions. The contribution in this work is to provide a general framework for decision tree optimization that addresses the two significant open problems in the area: treatment of imbalanced data and fully optimizing over continuous variables. We present techniques that produce optimal decision trees over a variety of objectives including F-score, AUC, and partial area under the ROC convex hull. We also introduce a scalable algorithm that produces provably optimal results in the presence of continuous variables and speeds up decision tree construction by several orders of magnitude relative to the stateof-the art.

For agents

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

get_harvested_code_for_paper("2006.08690")
get_code_for_paper("2006.08690")
have("2006.08690")

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

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

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

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

Connect an agent — have() is free.