SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.00195 · ICML · 2023

Data-Driven Subgroup Identification for Linear Regression

James Zou, Zachary Izzo, Ruishan Liu

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 3 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/2305.00195.json · badge: /api/ran/2305.00195.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
zleizzo/DDGroup canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
zleizzo/ddgroup canonical (classifier label)
classifier basis: classifier_2025
2 ran · 3 no recorded run
FunctionStatusWhere it lives
directed_infty_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zleizzo/ddgroup/src/utils/methods.py
code served (permissive licence) · get_code("5f8bea0e892b439a")
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 float, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - x: indexed with j, elements are multiplied by scalars from S[j]
# - S: indexed with j, each S[j] is a set (can be empty or contain scalars)
# - The function computes max of products x[j] * s for all j where S[j] is non-empty

# x should be a list or array-like of length n, with numeric values
# S should be a list of sets, same length as x

x = [2.5, 3.0, 1.5, 4.0]  # List of 4 numeric values

S = [
    {0.5, 1.0, 2.0},      # Non-empty set for x[0]
    set(),                  # Empty set for x[1] (skipped in calculation)
    {0.8, 1.2},            # Non-empty set for x[2]
    {0.3, 0.6, 1.5}        # Non-empty set for x[3]
]

ARGS = {
    "x": x,
    "S": S
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
find_core Ran
ran; our contract draft was wrong, not the code
zleizzo/ddgroup/src/utils/methods.py
code served (permissive licence) · get_code("10e004d99c866235")
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) 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

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data
# X should be (n_samples, n_features)
# Y should be (n_samples,)
n_samples = 20
n_features = 4

X = np.random.randn(n_samples, n_features)
Y = np.random.randn(n_samples)

ARGS = {
    'X': X,
    'Y': Y,
    'frac': 0.1,
    'stop_criterion': 0.001,
    'max_iter': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy, sklearn, 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
find_core Ran
ran on a synthesized input
zleizzo/DDGroup/src/utils/methods.py
code served (permissive licence) · get_code("94df95305777302f")
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

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data
n_samples = 20  # total number of samples
n_features = 4  # number of features

# Generate synthetic X and Y for regression
X = np.random.randn(n_samples, n_features)
Y = np.random.randn(n_samples)

# Construct ARGS dictionary with all parameters for find_core
ARGS = {
    "X": X,
    "Y": Y,
    "frac": 0.1,
    "stop_criterion": 0.001,
    "max_iter": 10
}
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 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_clss_data Ran
ran on a synthesized input
zleizzo/DDGroup/src/utils/data_loader.py
code served (permissive licence) · get_code("0f8e2c19065fc212")
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 pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler

# Create sample data
np.random.seed(42)
n_samples = 10

# Create a DataFrame with continuous, categorical, and objective columns
data = pd.DataFrame({
    'cont1': np.random.randn(n_samples),
    'cont2': np.random.randn(n_samples),
    'cat1': np.random.choice(['A', 'B', 'C'], n_samples),
    'cat2': np.random.choice(['X', 'Y'], n_samples),
    'target': np.random.choice(['class0', 'class1', 'class2'], n_samples)
})

ARGS = {
    'data': data,
    'covariates_continuous': ['cont1', 'cont2'],
    'covariates_categorical': ['cat1', 'cat2'],
    'objective': 'target'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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_regr_data Ran
ran on a synthesized input
zleizzo/DDGroup/src/utils/data_loader.py
code served (permissive licence) · get_code("6b537d56e82ea5a5")
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 pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler

# Create a small test dataset with continuous and categorical features
np.random.seed(0)

# Create a pandas DataFrame with sample data
data = pd.DataFrame({
    'continuous_1': np.random.randn(10),
    'continuous_2': np.random.randn(10),
    'categorical_1': np.random.choice(['A', 'B', 'C'], 10),
    'categorical_2': np.random.choice(['X', 'Y'], 10),
    'target': np.random.randn(10)
})

covariates_continuous = ['continuous_1', 'continuous_2']
covariates_categorical = ['categorical_1', 'categorical_2']
objective = 'target'

ARGS = {
    'data': data,
    'covariates_continuous': covariates_continuous,
    'covariates_categorical': covariates_categorical,
    'objective': objective
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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
neighbor_core Ran
ran on a synthesized input
zleizzo/DDGroup/src/utils/methods.py
code served (permissive licence) · get_code("063f3568eba03070")
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

np.random.seed(0)

# X is a feature matrix: shape (n_samples, n_features)
# Y is a target vector: shape (n_samples,) or (n_samples, 1)
# k is the number of neighbors

n_samples = 5
n_features = 3

X = np.random.randn(n_samples, n_features).astype(np.float64)
Y = np.random.randn(n_samples).astype(np.float64)
k = 3

ARGS = {
    "X": X,
    "Y": Y,
    "k": k
}
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 — 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
res Ran
ran on a synthesized input
zleizzo/DDGroup/src/utils/methods.py
code served (permissive licence) · get_code("e81169bbb6fb38ee")
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; 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

# Construct arguments for the res function
x = np.array([1.0, 2.0, 3.0, 4.0])  # 1D array of features
y = 5.5  # scalar target value
beta = np.array([0.5, 0.3, 0.2, 0.1])  # 1D array of coefficients

ARGS = {
    'x': x,
    'y': y,
    'beta': beta
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
hard_grow_region Not yet run
unverified (harvested, no recorded run)
zleizzo/ddgroup/src/utils/methods.py
code served (permissive licence) · get_code("87b2991fe2f63fa6")
How it ran

no invocation recorded.

neighbor_core Not yet run
unverified (harvested, no recorded run)
zleizzo/ddgroup/src/utils/methods.py
code served (permissive licence) · get_code("dd1ada9d5fa20645")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

res Not yet run
unverified (harvested, no recorded run)
zleizzo/ddgroup/src/utils/methods.py
code served (permissive licence) · get_code("f05b8eb58946ed9e")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

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

Medical studies frequently require to extract the relationship between each covariate and the outcome with statistical confidence measures. To do this, simple parametric models are frequently used (e.g. coefficients of linear regression) but usually fitted on the whole dataset. However, it is common that the covariates may not have a uniform effect over the whole population and thus a unified simple model can miss the heterogeneous signal. For example, a linear model may be able to explain a subset of the data but fail on the rest due to the nonlinearity and heterogeneity in the data. In this paper, we propose DDGroup (datadriven group discovery), a data-driven method to effectively identify subgroups in the data with a uniform linear relationship between the features and the label. DDGroup outputs an interpretable region in which the linear model is expected to hold. It is simple to implement and computationally tractable for use. We show theoretically that, given a large enough sample, DDGroup recovers a region where a single linear model with low variance is well-specified (if one exists), and experiments on real-world medical datasets confirm that it can discover regions where a local linear model has improved performance. Our experiments also show that DDGroup can uncover subgroups with qualitatively different relationships which are missed by simply applying parametric approaches to the whole dataset.

For agents

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

get_harvested_code_for_paper("2305.00195")
get_code_for_paper("2305.00195")
have("2305.00195")

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

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

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

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

Connect an agent — have() is free.