SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.01321 · 2019

Less Is Better: Unweighted Data Subsampling via Influence Function

arXiv · PDF · Open in the Atlas

Code that ran

9 of 14 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 9 have no contract verdict; 0 failures of our instrument; 5 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/1912.01321.json · badge: /api/ran/1912.01321.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
RyanWangZf/Influence_Subsampling canonical (classifier label)
classifier basis: census
9 ran · 5 no recorded run
FunctionStatusWhere it lives
batch_grad_hinge_loss Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/grad_hinge.py
code served (permissive licence) · get_code("d5642c8420f7bba8")
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 csr_matrix. 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 import sparse

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

# Create small test data
batch_size = 2
num_features = 4

# label: binary labels (-1 or 1), shape (batch_size,)
label = np.array([1, -1], dtype=np.float32)

# ypred: predicted scores, shape (batch_size,)
ypred = np.array([0.5, -0.3], dtype=np.float32)

# x: feature matrix, shape (batch_size, num_features)
# Use dense array that will be converted to sparse inside the function
x = np.random.randn(batch_size, num_features).astype(np.float32)

ARGS = {
    "label": label,
    "ypred": ypred,
    "x": x,
}
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 csr_matrix — a csr_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csr_matrix 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
batch_grad_logloss_lr Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/grad_utils.py
code served (permissive licence) · get_code("7ad9eacf99eab2a0")
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
from scipy import sparse

np.random.seed(0)

# Construct arguments for batch_grad_logloss_lr
batch_size = 2
n_features = 4

# label: array of shape [batch_size,]
label = np.array([0.0, 1.0])

# ypred: array of shape [batch_size,]
ypred = np.array([0.3, 0.8])

# x: array or sparse.csc_matrix with shape [batch_size, n_features]
# Using dense numpy array
x = np.random.randn(batch_size, n_features).astype(np.float64)

# weight_ar: optional array for L2 regularization
weight_ar = np.random.randn(n_features).astype(np.float64)

# C: regularization parameter
C = 0.03

# has_l2: boolean flag
has_l2 = True

# scale_factor: scaling multiplier
scale_factor = 1.0

ARGS = {
    "label": label,
    "ypred": ypred,
    "x": x,
    "weight_ar": weight_ar,
    "C": C,
    "has_l2": has_l2,
    "scale_factor": scale_factor,
}
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 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
grad_logloss_theta_lr Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/grad_utils.py
code served (permissive licence) · get_code("3233bd109d1f909c")
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
from scipy import sparse

# Create small test data
np.random.seed(0)

# label: scalar or array of shape [None,]
label = np.array([0, 1])

# ypred: scalar or array of shape [None,]
ypred = np.array([0.2, 0.8])

# x: array with shape [None, n] or sparse.csc_matrix
# Using 2 samples, 4 features
x = sparse.csc_matrix(np.array([
    [1.0, 0.5, 0.2, 0.1],
    [0.3, 0.9, 0.4, 0.7]
]))

# weight_ar: array with shape [n,]
weight_ar = np.array([0.1, 0.2, 0.15, 0.25])

# C: regularization parameter (scalar)
C = 0.03

# has_l2: boolean flag for L2 regularization
has_l2 = True

# scale_factor: scalar multiplier
scale_factor = 1.0

ARGS = {
    "label": label,
    "ypred": ypred,
    "x": x,
    "weight_ar": weight_ar,
    "C": C,
    "has_l2": has_l2,
    "scale_factor": scale_factor
}
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 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
grad_logloss_theta_lr_weighted Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/grad_utils.py
code served (permissive licence) · get_code("dca49c84f049b50f")
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
from scipy import sparse

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

# Create small sample data
batch_size = 2
n_features = 4

# Create label and ypred as arrays
label = np.array([0, 1], dtype=np.float32)
ypred = np.array([0.2, 0.8], dtype=np.float32)

# Create x as a dense array [batch_size, n_features]
x = np.random.randn(batch_size, n_features).astype(np.float32)

# Create weight_ar with shape [n_features]
weight_ar = np.random.randn(n_features).astype(np.float32)

# Create weights for samples
weights = np.array([1.0, 1.0], dtype=np.float32)

# Define ARGS dict with all parameters
ARGS = {
    'label': label,
    'ypred': ypred,
    'x': x,
    'weight_ar': weight_ar,
    'C': 0.03,
    'has_l2': True,
    'scale_factor': 1.0,
    'weights': weights
}
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 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
hessian_vector_product_hinge Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/grad_hinge.py
code served (permissive licence) · get_code("05e08969eeda4bf5")
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

# Create small numpy arrays for the function parameters
# The function uses:
# - label: array for masking and dot products
# - ypred: array for masking condition
# - x: 2D array with .dot() and .T methods
# - v: vector for x.dot(v)
# - scale_factor: float multiplier

np.random.seed(0)

# Create sample data
batch_size = 2
feature_dim = 4

# label: 1D array of labels
label = np.array([1.0, -1.0])

# ypred: 1D array of predictions (same shape as label)
ypred = np.array([0.5, -0.5])

# x: 2D array (batch_size x feature_dim)
x = np.random.randn(batch_size, feature_dim)

# v: 1D vector of same dimension as features
v = np.random.randn(feature_dim)

# scale_factor: float
scale_factor = 2.0

ARGS = {
    "label": label,
    "ypred": ypred,
    "x": x,
    "v": v,
    "scale_factor": scale_factor
}
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
parse_line_ffm Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/process_data.py
code served (permissive licence) · get_code("53cd1d2e64bc0a52")
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

def parse_line_ffm(line):
    line = line.strip().split()
    if len(line) <= 1:
        return (None, None, None, None)
    label = np.float32(line[0])
    line_data = np.array([l.split(':') for l in line[1:]])
    field_idx = line_data[:, 0].astype(np.int32)
    feat_idx = line_data[:, 1].astype(np.int32)
    vals = line_data[:, 2].astype(np.float32)
    return (field_idx, feat_idx, vals, label)

# Valid FFM format line: label field1:feature1:value1 field2:feature2:value2 ...
line_valid = "1 0:1:0.5 1:2:0.3 2:3:0.8"

ARGS = {
    "line": line_valid
}
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
parse_line_fm Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/process_data.py
code served (permissive licence) · get_code("fd5dfd221bd89479")
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

def parse_line_fm(line):
    line = line.strip().split()
    if len(line) <= 1:
        return (None, None, None, None)
    label = np.float32(line[0])
    line_data = np.array([l.split(':') for l in line[1:]])
    feat_idx = line_data[:, 0].astype(np.int32)
    vals = line_data[:, 1].astype(np.float32)
    return (None, feat_idx, vals, label)

# Create a valid line string in the format expected by parse_line_fm
# Format: "label feat_idx:value feat_idx:value ..."
line = "1.5 0:0.2 2:0.8 5:0.3"

ARGS = {
    "line": line
}
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
select_from_one_class Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/dataset.py
code served (permissive licence) · get_code("899d22e360be7246")
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 int, 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

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

# Create y_train: array of class labels
# Let's create a dataset with 20 samples, 3 classes
y_train = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 0, 0, 1, 1, 2])

# Create prob_pi: probability array with same length as y_train
# Values should be between 0 and 1 for the comparison with rand_prob
prob_pi = np.random.rand(y_train.shape[0])

# Set label to select from
label = 0

# Set ratio for sampling (between 0 and 1)
ratio = 0.6

ARGS = {
    'y_train': y_train,
    'prob_pi': prob_pi,
    'label': label,
    'ratio': ratio
}
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 int, 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
wrap_function Ran
ran on a synthesized input
RyanWangZf/Influence_Subsampling/optimize/optimize.py
code served (permissive licence) · get_code("63fefa1d19885deb")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple test function that will be wrapped
def test_function(x, y):
    return x + y

# Define the wrapper arguments as a tuple
wrapper_args = (torch.tensor([1.0, 2.0, 3.0, 4.0]), torch.tensor([5.0, 6.0, 7.0, 8.0]))

ARGS = {
    "function": test_function,
    "args": wrapper_args
}
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 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
approx_fhess_p Not yet run
unverified (harvested, no recorded run)
RyanWangZf/Influence_Subsampling/optimize/optimize.py
code served (permissive licence) · get_code("2e20937cad0ddd9a")
How it ran

no invocation recorded.

hessian_hingle_loss_theta Not yet run
unverified (harvested, no recorded run)
RyanWangZf/Influence_Subsampling/grad_hinge.py
code served (permissive licence) · get_code("cbdcf53d06b53bfe")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
RyanWangZf/Influence_Subsampling/dataset.py
code served (permissive licence) · get_code("bdbef0cefef7dced")
How it ran

no invocation recorded.

load_data_v1 Not yet run
unverified (harvested, no recorded run)
RyanWangZf/Influence_Subsampling/dataset.py
code served (permissive licence) · get_code("b6da66a26efe3379")
How it ran

no invocation recorded.

work Not yet run
unverified (harvested, no recorded run)
RyanWangZf/Influence_Subsampling/process_data.py
code served (permissive licence) · get_code("b9278c6ddf04cba8")
How it ran

no invocation recorded.

Also present in other papers' code

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

In the time of Big Data, training complex models on large-scale data sets is challenging, making it appealing to reduce data volume for saving computation resources by subsampling. Most previous works in subsampling are weighted methods designed to help the performance of subset-model approach the full-set-model, hence the weighted methods have no chance to acquire a subset-model that is better than the full-set-model. However, we question that how can we achieve better model with less data? In this work, we propose a novel Unweighted Influence Data Subsampling (UIDS) method, and prove that the subset-model acquired through our method can outperform the full-set-model. Besides, we show that overly confident on a given test set for sampling is common in Influence-based subsampling methods, which can eventually cause our subset-model's failure in out-of-sample test. To mitigate it, we develop a probabilistic sampling scheme to control the worst-case risk over all distributions close to the empirical distribution. The experiment results demonstrate our methods superiority over existed subsampling methods in diverse tasks, such as text classification, image classification, click-through prediction, etc.

For agents

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

get_harvested_code_for_paper("1912.01321")
get_code_for_paper("1912.01321")
have("1912.01321")

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

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

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

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

Connect an agent — have() is free.