SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.06349 · 2019

Slice-based Learning: A Programming Model for Residual Learning in Critical Data Slices

arXiv · PDF · Open in the Atlas

Code that ran

9 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 9 have no contract verdict; 0 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/1909.06349.json · badge: /api/ran/1909.06349.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
snorkel-team/snorkel-tutorials canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
bilstm Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/spouse/tf_model.py
code served (permissive licence) · get_code("1b33659fda6fb25d")
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 EagerTensor, ndim 2, dtype family float, shape (2, 128) 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 tensorflow as tf
import numpy as np

# Create a small batch of token strings
# The function expects tf.Tensor of strings
batch_size = 2
sequence_length = 4
tokens = tf.constant([
    ["hello", "world", "foo", "bar"],
    ["test", "string", "data", "here"]
], dtype=tf.string)

# Define ARGS dictionary with all parameters
ARGS = {
    "tokens": tokens,
    "rnn_state_size": 64,
    "num_buckets": 40000,
    "embed_dim": 36
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 128) — shape (2, 128) 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
crop_img_arr Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/visual_relation/model.py
code served (permissive licence) · get_code("ffa6ecdde4fa2112")
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 (5, 5, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small test image array with shape (height, width, channels)
# Using distinct dimensions: height=10, width=8, channels=3
img_arr = np.random.rand(10, 8, 3).astype(np.float32)

# Define bounding box coordinates: [y_start, y_end, x_start, x_end]
bbox = [2, 7, 1, 6]

ARGS = {
    "img_arr": img_arr,
    "bbox": bbox,
}
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 ndarray, ndim 3, dtype family float, shape (5, 5, 3) — shape (5, 5, 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
get_feature_arrays Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/spouse/tf_model.py
code served (permissive licence) · get_code("f01e0cb2f41ce3de")
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 3, 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 pandas as pd

# Create a minimal DataFrame with the required columns and structure
# The function expects:
# - df.between_tokens: list-like of token lists
# - df.tokens: list-like of token lists
# - df.person1_word_idx: list-like of tuples/lists with at least one element
# - df.person2_right_tokens: list-like of token lists

data = {
    'between_tokens': [
        ['word1', 'word2', 'word3'],
        ['token1', 'token2']
    ],
    'tokens': [
        ['a', 'b', 'c', 'd', 'e', 'f', 'word1', 'word2', 'word3'],
        ['x', 'y', 'z', 'token1', 'token2']
    ],
    'person1_word_idx': [
        [6],
        [3]
    ],
    'person2_right_tokens': [
        ['right1', 'right2'],
        ['r1', 'r2', 'r3']
    ]
}

df = pd.DataFrame(data)

# Verify the DataFrame has the expected structure
df['between_tokens'] = df['between_tokens'].apply(lambda x: x)
df['tokens'] = df['tokens'].apply(lambda x: x)
df['person1_word_idx'] = df['person1_word_idx'].apply(lambda x: x)
df['person2_right_tokens'] = df['person2_right_tokens'].apply(lambda x: x)

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 tuple, ndim 3, 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
load_celebrity_knowledge_base Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/drybell/drybell_lfs.py
code served (permissive licence) · get_code("3f5e64c950b28d95")
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 list, 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 tempfile
import os

# Create a temporary file with some celebrity knowledge base content
temp_dir = tempfile.mkdtemp()
temp_file_path = os.path.join(temp_dir, 'celebrity_knowledge_base.txt')

with open(temp_file_path, 'w') as f:
    f.write("Celebrity 1: Famous person\n")
    f.write("Celebrity 2: Another famous person\n")
    f.write("Celebrity 3: Yet another celebrity\n")

ARGS = {
    'path': temp_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
make_circle_dataset Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/multitask/utils.py
code served (permissive licence) · get_code("4158af3b070ad02e")
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

ARGS = {
    "n": 100,
    "r": 0.5,
    "splits": (0.8, 0.1, 0.1),
    "seed": 123
}
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
make_inv_circle_dataset Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/multitask/utils.py
code served (permissive licence) · get_code("396134a8f97c18ce")
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

ARGS = {
    "n": 100,
    "r": 0.5,
    "splits": (0.8, 0.1, 0.1),
    "seed": 123
}
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
make_square_dataset Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/multitask/utils.py
code served (permissive licence) · get_code("a6a538bb4423725c")
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

ARGS = {
    'n': 100,
    'r': 0.5,
    'splits': (0.8, 0.1, 0.1),
    'seed': 123
}
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
union Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/visual_relation/model.py
code served (permissive licence) · get_code("374f0cdaed9f408d")
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 list, ndim 1, dtype family int; 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 torch
import numpy as np

torch.manual_seed(0)

# Based on the function signature and implementation:
# - bbox1 and bbox2 are sequences with 4 elements indexed as [0], [1], [2], [3]
# - They represent [y0, y1, x0, x1] coordinates
# - The function uses min/max operations on these elements

bbox1 = [10, 50, 20, 60]
bbox2 = [15, 45, 25, 55]

ARGS = {
    "bbox1": bbox1,
    "bbox2": bbox2,
}
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 list, ndim 1, dtype family int — a list 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
worker_lf Ran
ran on a synthesized input
snorkel-team/snorkel-tutorials/crowdsourcing/crowdsourcing_tutorial.py
code served (permissive licence) · get_code("cd95474a04a1610b")
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 int, ndim 0, dtype family int, 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

class MockTweet:
    def __init__(self, tweet_id):
        self.tweet_id = tweet_id

# Create a sample input object with a tweet_id attribute
x = MockTweet(tweet_id="tweet_123")

# Create a worker_dict that maps tweet_ids to labeling function outputs
worker_dict = {
    "tweet_123": 1,
    "tweet_456": 0,
    "tweet_789": -1,
}

ABSTAIN = -1

ARGS = {
    "x": x,
    "worker_dict": worker_dict,
}
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 int, ndim 0, dtype family int, 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
get_model Not yet run
unverified (harvested, no recorded run)
snorkel-team/snorkel-tutorials/spouse/tf_model.py
code served (permissive licence) · get_code("61451811170bbe5c")
How it ran

no invocation recorded.

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

In real-world machine learning applications, data subsets correspond to especially critical outcomes: vulnerable cyclist detections are safety-critical in an autonomous driving task, and "question" sentences might be important to a dialogue agent's language understanding for product purposes. While machine learning models can achieve high quality performance on coarse-grained metrics like F1-score and overall accuracy, they may underperform on critical subsets---we define these as slices, the key abstraction in our approach. To address slice-level performance, practitioners often train separate "expert" models on slice subsets or use multi-task hard parameter sharing. We propose Slice-based Learning, a new programming model in which the slicing function (SF), a programming interface, specifies critical data subsets for which the model should commit additional capacity. Any model can leverage SFs to learn slice expert representations, which are combined with an attention mechanism to make slice-aware predictions. We show that our approach maintains a parameter-efficient representation while improving over baselines by up to 19.0 F1 on slices and 4.6 F1 overall on datasets spanning language understanding (e.g. SuperGLUE), computer vision, and production-scale industrial systems.

For agents

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

get_harvested_code_for_paper("1909.06349")
get_code_for_paper("1909.06349")
have("1909.06349")

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

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

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

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

Connect an agent — have() is free.