SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.07075 · 2021

Deep Learning on a Data Diet: Finding Important Examples Early in Training

arXiv · PDF · Open in the Atlas

Code that ran

19 of 24 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 15 have no contract verdict; 2 failures of our instrument; 5 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/2107.07075.json · badge: /api/ran/2107.07075.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
mansheej/data_diet canonical (classifier label)
classifier basis: census
19 ran · 5 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran on a synthesized input
mansheej/data_diet/data_diet/metrics.py
code served (permissive licence) · get_code("9303a55485ebdf1b")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# Create small test data
batch_size = 2
num_classes = 4

# Create logits: shape (batch_size, num_classes)
logits = jnp.array([
    [0.1, 0.5, 0.2, 0.2],
    [0.3, 0.1, 0.4, 0.2]
], dtype=jnp.float32)

# Create labels: shape (batch_size, num_classes) - one-hot encoded
labels = jnp.array([
    [0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
compute_mean_logit_gradients Ran
ran on a synthesized input
mansheej/data_diet/data_diet/gradients.py
code served (permissive licence) · get_code("8a4a165bf94a5845")
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 (3, 15) 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
import jax.numpy as jnp
from jax import jacrev, jit, vmap
from jax.tree_util import tree_flatten, tree_map

# Define a simple model function that takes params, state, and X and returns logits
def simple_model_fn(params, state, X):
    """
    Simple model function: params, state, X -> logits
    params: dict with 'weight' and 'bias'
    state: dict with 'scale'
    X: array of shape (batch_size, input_dim)
    Returns: logits of shape (batch_size, num_classes)
    """
    # X @ params['weight'] + params['bias'] scaled by state['scale']
    logits = jnp.dot(X, params['weight']) + params['bias']
    logits = logits * state['scale']
    return logits

# Create params pytree - a dict with weight matrix and bias
# weight: (input_dim=4, num_classes=3)
# bias: (num_classes=3,)
params = {
    'weight': jnp.ones((4, 3)) * 0.1,
    'bias': jnp.zeros(3)
}

# Create state pytree - a dict with scale
state = {
    'scale': jnp.array(1.0)
}

# Create X - batch of images/data points
# shape: (n=8, input_dim=4)
X = np.random.randn(8, 4).astype(np.float32)

# batch_sz for processing
batch_sz = 2

ARGS = {
    'fn': simple_model_fn,
    'params': params,
    'state': state,
    'X': X,
    'batch_sz': batch_sz
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy, tqdm — 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 (3, 15) — shape (3, 15) 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
correct Ran
ran on a synthesized input
mansheej/data_diet/data_diet/metrics.py
code served (permissive licence) · get_code("3d3a57e4ec59a580")
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 ArrayImpl, ndim 1, dtype family float, shape (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 jax.numpy as jnp
import numpy as np

# Create small logits and labels tensors
# logits: shape (batch_size=2, num_classes=4)
# labels: shape (batch_size=2, num_classes=4)
batch_size = 2
num_classes = 4

logits = jnp.array([
    [0.1, 0.5, 0.2, 0.1],
    [0.3, 0.1, 0.4, 0.2]
], dtype=jnp.float32)

labels = jnp.array([
    [0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (2,) — shape (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
cross_entropy_loss Ran
ran on a synthesized input
mansheej/data_diet/data_diet/metrics.py
code served (permissive licence) · get_code("b9fe6d146beff6d7")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# Create small tensors for cross_entropy_loss
batch_size = 2
num_classes = 4

# logits: shape (batch_size, num_classes) - raw model outputs
logits = jnp.array([
    [2.0, 1.0, 0.5, -1.0],
    [1.5, 2.5, 0.1, -0.5]
], dtype=jnp.float32)

# labels: shape (batch_size, num_classes) - one-hot or soft labels
labels = jnp.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0]
], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "labels": labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
flatten_jacobian Ran
ran, honoured the contract we drafted
mansheej/data_diet/data_diet/gradients.py
code served (permissive licence) · get_code("9c77ed5f1b2a5cb5")
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 ArrayImpl, ndim 2, dtype family float, shape (2, 27) 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 jax
import jax.numpy as jnp
from jax import jacrev, vmap
from jax.tree_util import tree_flatten, tree_map

# Create a simple function to compute jacobians from
def simple_fn(x):
    """A simple function that returns a pytree of jacobians"""
    # Returns a dict of arrays (simulating a jacobian pytree structure)
    return {
        'layer1': jnp.array([[1.0, 2.0], [3.0, 4.0]]),
        'layer2': jnp.array([[5.0, 6.0, 7.0], [8.0, 9.0, 10.0]])
    }

# Create a jacobian pytree by calling the function
# The jacobian pytree should be a nested structure of arrays
# where each array has a batch dimension that can be vmapped over
J = {
    'layer1': jnp.ones((2, 4, 3)),  # batch=2, output_dim=4, input_dim=3
    'layer2': jnp.ones((2, 5, 3)),  # batch=2, output_dim=5, input_dim=3
}

ARGS = {
    'J': J
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (2, 27) — shape (2, 27) 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_apply_fn_test Ran
ran; our contract draft was wrong, not the code
mansheej/data_diet/data_diet/models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ucsc-real/fairnesswithoutharm, is pointer only (licence: NONE) · get_code("c231223cd0275ac9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ucsc-real/fairnesswithoutharm, 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.

get_grad_norm_fn Ran
ran on a synthesized input
mansheej/data_diet/data_diet/scores.py
code served (permissive licence) · get_code("9c1e915d16795b09")
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 function. 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 jax
import jax.numpy as jnp
import numpy as np
from functools import partial

# Define a minimal cross_entropy_loss function that works with JAX
def cross_entropy_loss(logits, labels):
    """Simple cross entropy loss for JAX"""
    log_softmax = jax.nn.log_softmax(logits)
    return -jnp.sum(log_softmax * labels)

# Define a minimal flatten_jacobian function
def flatten_jacobian(jacobian):
    """Flatten jacobian from shape (batch, ...) to (batch, -1)"""
    batch_size = jacobian.shape[0]
    return jacobian.reshape(batch_size, -1)

# Define a simple neural network function
def simple_model(params, state, x):
    """Simple model that applies linear transformation"""
    # params is a dict with 'w' key, state is unused
    # x shape: (batch, input_dim)
    # returns logits of shape (batch, output_dim)
    w = params['w']
    b = params['b']
    logits = jnp.dot(x, w) + b
    return logits

# Create small test data
batch_size = 2
input_dim = 4
output_dim = 3

# Initialize parameters as a dict (JAX style)
key = jax.random.PRNGKey(0)
params = {
    'w': jax.random.normal(key, (input_dim, output_dim)) * 0.1,
    'b': jnp.zeros(output_dim)
}

# Create a dummy state (unused but required by function signature)
state = {}

# Create small test inputs and targets
X = jax.random.normal(jax.random.PRNGKey(1), (batch_size, input_dim))
Y = jax.nn.one_hot(np.array([0, 1]), output_dim)

# Package into ARGS
ARGS = {
    'fn': simple_model,
    'params': params,
    'state': state
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_mean_logit_gradients_fn Ran
ran on a synthesized input
mansheej/data_diet/data_diet/gradients.py
code served (permissive licence) · get_code("49a24aaf4e850cdd")
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 function. 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 jax
import jax.numpy as jnp
from jax import jacrev, jit, vmap
from jax.tree_util import tree_flatten, tree_map

# Define a simple neural network function that takes params, state, and input x
def simple_fn(params, state, x):
    """
    A simple function that takes params (pytree), state (dict), and input x.
    Returns logits of shape (batch_size, num_classes).
    
    params is expected to be a dict with 'w' and 'b' keys
    state is a dict (unused in this simple version)
    x is input of shape (batch_size, input_dim)
    """
    w = params['w']  # shape (input_dim, num_classes)
    b = params['b']  # shape (num_classes,)
    return jnp.dot(x, w) + b

# Create parameters as a pytree (dict of arrays)
input_dim = 4
num_classes = 3
params = {
    'w': jnp.ones((input_dim, num_classes)),
    'b': jnp.zeros((num_classes,))
}

# Create state dict
state = {'dummy_key': jnp.array(1.0)}

# Create function reference
fn = simple_fn

ARGS = {
    'fn': fn,
    'params': params,
    'state': state
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_model Ran
ran on a synthesized input
mansheej/data_diet/data_diet/models.py
code served (permissive licence) · get_code("dcfbe7124e3a346a")
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 ResNet. 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 jax
import jax.numpy as jnp
from flax import linen as nn

class Args:
    def __init__(self, model, num_classes):
        self.model = model
        self.num_classes = num_classes

ARGS = {
    "args": Args(model='resnet18_lowres', num_classes=10)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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_num_params Ran
ran, honoured the contract we drafted
mansheej/data_diet/data_diet/models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ucsc-real/fairnesswithoutharm, is pointer only (licence: NONE) · get_code("63410cdc89b2ca7a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ucsc-real/fairnesswithoutharm, 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.

init_forget_stats Ran
ran on a synthesized input
mansheej/data_diet/data_diet/forgetting.py
code served (permissive licence) · get_code("ef7abf4c30fab72e")
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 SimpleNamespace. 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 types import SimpleNamespace

ARGS = {
    "args": SimpleNamespace(
        num_train_examples=42
    )
}
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 SimpleNamespace — a SimpleNamespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleNamespace 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
load_forget_scores Ran
ran on a synthesized input
mansheej/data_diet/data_diet/forgetting.py
code served (permissive licence) · get_code("d22d21e9bebc00c3")
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 (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
import tempfile
import os

# Create a temporary directory structure to simulate the expected file layout
temp_dir = tempfile.mkdtemp()
forget_scores_dir = os.path.join(temp_dir, 'forget_scores')
os.makedirs(forget_scores_dir, exist_ok=True)

# Create a sample forget_scores numpy file for ckpt_0
sample_scores = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
np.save(os.path.join(forget_scores_dir, 'ckpt_0.npy'), sample_scores)

ARGS = {
    'load_dir': temp_dir,
    'ckpt': 0
}
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 1, dtype family float, shape (4,) — shape (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
normalize_cifar100_images Ran
ran on a synthesized input
mansheej/data_diet/data_diet/data.py
code served (permissive licence) · get_code("fe13472aca3d2b25")
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 4, dtype family float, shape (2, 4, 4, 3) 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 a small batch of CIFAR-10 style images
# CIFAR images are 32x32 RGB, so shape should be (batch, height, width, channels)
# Using batch size 2, height 4, width 4 for small size
batch_size = 2
height = 4
width = 4
channels = 3

# Create random image data with values in typical uint8 range (0-255)
X = np.random.randint(0, 256, size=(batch_size, height, width, channels), dtype=np.uint8)

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 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 4, 3) 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
normalize_cifar10_images Ran
ran on a synthesized input
mansheej/data_diet/data_diet/data.py
code served (permissive licence) · get_code("a3ec54a961982702")
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 4, dtype family float, shape (2, 4, 4, 3) 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 a small batch of CIFAR-10 style images
# CIFAR-10 images are 32x32 RGB, so shape is (batch, height, width, channels)
# Using batch_size=2, height=4, width=4, channels=3 for tiny test data
X = np.random.randint(0, 256, size=(2, 4, 4, 3), dtype=np.uint8)

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 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 4, 3) 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
one_hot Ran
ran on a synthesized input
mansheej/data_diet/data_diet/data.py
code served (permissive licence) · get_code("f8f057d94b1824fe")
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

# Analyze the function:
# - labels: array-like, indexed with [:, None], compared with np.arange(num_classes)
# - num_classes: int, used in np.arange(num_classes)
# - dtype: numpy dtype, used in .astype(dtype)

# Create a small labels array with batch size 2
labels = np.array([0, 2], dtype=np.int64)

# num_classes should be greater than max label value
num_classes = 4

# dtype parameter
dtype = np.float32

ARGS = {
    "labels": labels,
    "num_classes": num_classes,
    "dtype": dtype,
}
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
record_ckpt Ran
ran; our contract draft was wrong, not the code
mansheej/data_diet/data_diet/recorder.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ucsc-real/fairnesswithoutharm, is pointer only (licence: NONE) · get_code("1250d55ffe8b6887")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ucsc-real/fairnesswithoutharm, 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.

record_test_stats Ran
ran on a synthesized input
mansheej/data_diet/data_diet/recorder.py
code served (permissive licence) · get_code("3410e08123d11a74")
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 TestRecorder. 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
import torch.nn as nn

torch.manual_seed(0)

class TestRecorder:
    def __init__(self):
        self.test_step = []
        self.test_loss = []
        self.test_acc = []

rec = TestRecorder()
step = 5
loss = 0.42
acc = 0.95

ARGS = {
    "rec": rec,
    "step": step,
    "loss": loss,
    "acc": acc
}
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 TestRecorder — a TestRecorder output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TestRecorder 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
record_train_stats Ran
ran on a synthesized input
mansheej/data_diet/data_diet/recorder.py
code served (permissive licence) · get_code("c9266e79ba8131c8")
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 SimpleRecorder. 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
import numpy as np

# Create a minimal recorder object that has the required attributes
class SimpleRecorder:
    def __init__(self):
        self.train_step = []
        self.train_loss = []
        self.train_acc = []
        self.lr = []

# Set seed for reproducibility
torch.manual_seed(0)

# Construct arguments
rec = SimpleRecorder()
step = 1
loss = 0.5234
acc = 0.92
lr = 0.001

ARGS = {
    "rec": rec,
    "step": step,
    "loss": loss,
    "acc": acc,
    "lr": lr,
}
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 SimpleRecorder — a SimpleRecorder output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleRecorder 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
save_args Ran
ran on a synthesized input
mansheej/data_diet/data_diet/utils.py
code served (permissive licence) · get_code("2c63f727aab9dd2b")
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 str. 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
import tempfile
import os

# Create a temporary directory for saving
temp_dir = tempfile.mkdtemp()

# Create a simple args object that has vars() callable on it
class Args:
    def __init__(self):
        self.learning_rate = 0.001
        self.batch_size = 32
        self.epochs = 10
        self.model_name = "test_model"
        self.use_cuda = False
        self.hidden_dim = 128

args = Args()

ARGS = {
    'args': args,
    'save_dir': temp_dir,
    'verbose': True
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_fn_params_state Not yet run
unverified (harvested, no recorded run)
mansheej/data_diet/data_diet/utils.py
code served (permissive licence) · get_code("139e98d082836d96")
How it ran

no invocation recorded.

get_lord_error_fn Not yet run
unverified (harvested, no recorded run)
mansheej/data_diet/data_diet/scores.py
code served (permissive licence) · get_code("54b551623acee6e1")
How it ran

no invocation recorded.

get_margin_error Not yet run
unverified (harvested, no recorded run)
mansheej/data_diet/data_diet/scores.py
code served (permissive licence) · get_code("1ed5a333966e05bc")
How it ran

no invocation recorded.

load_args Not yet run
unverified (harvested, no recorded run)
mansheej/data_diet/data_diet/utils.py
code served (permissive licence) · get_code("28495435e5b289bd")
How it ran

no invocation recorded.

update_forget_stats Not yet run
unverified (harvested, no recorded run)
mansheej/data_diet/data_diet/forgetting.py
code served (permissive licence) · get_code("067a8c8180f18f38")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 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 20 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
flatten_jacobian 1 other paper
1 later
2206.15437 (2022-06)
Understanding Instance-Level Impact of Fairness Constraints
get_apply_fn_test 1 other paper
1 later
2402.12789 (2024-02)
Fairness Without Harm: An Influence-Guided Active Sampling Approach
get_num_params 1 other paper
1 later
2402.12789 (2024-02)
Fairness Without Harm: An Influence-Guided Active Sampling Approach
record_ckpt 1 other paper
1 later
2402.12789 (2024-02)
Fairness Without Harm: An Influence-Guided Active Sampling Approach

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

Recent success in deep learning has partially been driven by training increasingly overparametrized networks on ever larger datasets. It is therefore natural to ask: how much of the data is superfluous, which examples are important for generalization, and how do we find them? In this work, we make the striking observation that, in standard vision datasets, simple scores averaged over several weight initializations can be used to identify important examples very early in training. We propose two such scores -- the Gradient Normed (GraNd) and the Error L2-Norm (EL2N) scores -- and demonstrate their efficacy on a range of architectures and datasets by pruning significant fractions of training data without sacrificing test accuracy. In fact, using EL2N scores calculated a few epochs into training, we can prune half of the CIFAR10 training set while slightly improving test accuracy. Furthermore, for a given dataset, EL2N scores from one architecture or hyperparameter configuration generalize to other configurations. Compared to recent work that prunes data by discarding examples that are rarely forgotten over the course of training, our scores use only local information early in training. We also use our scores to detect noisy examples and study training dynamics through the lens of important examples -- we investigate how the data distribution shapes the loss surface and identify subspaces of the model's data representation that are relatively stable over training.

For agents

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

get_harvested_code_for_paper("2107.07075")
get_code_for_paper("2107.07075")
have("2107.07075")

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

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

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

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

Connect an agent — have() is free.