SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.10795 · EMNLP · 2020

Dataset Cartography: Mapping and Diagnosing Datasets with Training Dynamics

Swabha Swayamdipta, Yejin Choi, Hannaneh Hajishirzi, Roy Schwartz, Noah Smith, Yizhong Wang, Nicholas Lourie

arXiv · PDF · Open in the Atlas

Code that ran

12 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 6 have no contract verdict; 4 failures of our instrument; 4 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/2009.10795.json · badge: /api/ran/2009.10795.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
allenai/cartography canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
szhang42/uneven_training_data community
Papers with Code archive
3 ran · 0 no recorded run
beyondguo/TrainingDynamics community
Papers with Code archive
3 ran · 0 no recorded run
eliorc/tavolo community
Papers with Code archive
1 ran · 0 no recorded run
dyahadila/ood_cartography community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
DataMapCallback Ran
ran on a synthesized input · constructed an object; no result was computed
eliorc/tavolo/tavolo/learning.py
code served (permissive licence) · get_code("63892da82b9ce195")
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 an instance of its own class, DataMapCallback: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np

# Create a minimal TensorFlow dataset
def create_test_dataset():
    # Create small sample data: 4 samples, 3 features each
    features = np.random.randn(4, 3).astype(np.float32)
    # Binary classification labels (one-hot encoded)
    labels = np.array([[1, 0], [0, 1], [1, 0], [0, 1]], dtype=np.float32)
    
    dataset = tf.data.Dataset.from_tensor_slices((features, labels))
    dataset = dataset.batch(2)
    return dataset

# Create a minimal model
class SimpleModel(tf.keras.Model):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.dense = tf.keras.layers.Dense(2, activation=None)
    
    def call(self, x):
        return self.dense(x)

# Build arguments
dataset = create_test_dataset()

# outputs_to_probabilities: callable to convert logits to probabilities
outputs_to_probabilities = tf.nn.softmax

# sparse_labels: boolean flag
sparse_labels = False

ARGS = {
    "dataset": dataset,
    "outputs_to_probabilities": outputs_to_probabilities,
    "sparse_labels": sparse_labels
}
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 DataMapCallback — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DataMapCallback 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
adapted_glue_compute_metrics Ran
ran on a synthesized input
allenai/cartography/cartography/classification/glue_utils.py
code served (permissive licence) · get_code("c1dc8ee8436bbb66")
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 dict. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:33Z. 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
from transformers import glue_compute_metrics

torch.manual_seed(0)

# The function takes task_name, preds, and labels
# glue_compute_metrics expects:
# - task_name: str (one of the GLUE tasks)
# - preds: numpy array of shape (num_examples,) with predictions
# - labels: numpy array of shape (num_examples,) with ground truth labels

# For MNLI-like tasks (which includes SNLI, winogrande, toxic via the adapter),
# we need classification predictions and labels
# MNLI is a 3-class task (entailment, neutral, contradiction)

num_examples = 8

# Create prediction probabilities/logits and convert to class predictions
# For MNLI: 3 classes
preds = np.array([0, 1, 2, 0, 1, 2, 0, 1], dtype=np.int64)

# Create corresponding labels
labels = np.array([0, 1, 2, 1, 1, 2, 0, 2], dtype=np.int64)

ARGS = {
    "task_name": "snli",  # This will trigger the KeyError path and use 'mnli'
    "preds": preds,
    "labels": labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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_correctness Ran
ran, violated the contract we drafted
szhang42/uneven_training_data/cartography/selection/train_dy_filtering.py
code served (permissive licence) · get_code("b53e0e5cc0667b0b")
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
from typing import List

torch.manual_seed(0)

# The function compute_correctness takes a trend parameter which is a List[float]
# It simply sums all the values in the list
# So we need to provide a list of floats representing correctness values across epochs

trend = [0.85, 0.90, 0.88, 0.92, 0.95]

ARGS = {
    "trend": trend
}
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
compute_correctness Ran
ran, violated the contract we drafted
beyondguo/TrainingDynamics/dy_filtering.py
pointer only (licence: NONE) · get_code("ebca92d1e4b67794")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, beyondguo/TrainingDynamics 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.

compute_forgetfulness Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
szhang42/uneven_training_data/cartography/selection/train_dy_filtering.py
code served (permissive licence) · get_code("bd88c7f0a36c7e6a")
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

# Read the function body to understand what's needed
# compute_forgetfulness takes correctness_trend: List[float]
# It iterates through the list checking boolean conditions
# Each element should be a float that can be used in boolean context

# Create a valid correctness_trend list
# This represents epoch-wise correctness predictions (True/False or 1.0/0.0)
# Pattern: correct, correct, incorrect (forgotten), correct, incorrect (forgotten)
correctness_trend = [1.0, 1.0, 0.0, 1.0, 0.0]

ARGS = {
    "correctness_trend": correctness_trend
}
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
compute_forgetfulness Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
beyondguo/TrainingDynamics/dy_filtering.py
pointer only (licence: NONE) · get_code("270d424da751f2cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, beyondguo/TrainingDynamics 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.

compute_train_dy_metrics Ran
ran; our contract draft was wrong, not the code
szhang42/uneven_training_data/cartography/selection/train_dy_filtering.py
code served (permissive licence) · get_code("9aac3b7014417968")
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 torch
import numpy as np
import pandas as pd

torch.manual_seed(0)

# Create a small stand-in args class
class Args:
    def __init__(self):
        self.include_ci = False
        self.burn_out = 3

# Create training dynamics data structure
# Format: {guid: {'logits': [[...], [...], ...], 'gold': label}}
# We need multiple epochs and multiple training examples
training_dynamics = {}

# Create 5 training examples
num_examples = 5
num_epochs = 3
num_classes = 4

for guid in range(num_examples):
    logits_per_epoch = []
    for epoch in range(num_epochs):
        # Create logits for this epoch (num_classes values)
        epoch_logits = np.random.randn(num_classes).astype(np.float32)
        logits_per_epoch.append(epoch_logits)
    
    gold_label = np.random.randint(0, num_classes)
    training_dynamics[guid] = {
        'logits': logits_per_epoch,
        'gold': gold_label
    }

ARGS = {
    'training_dynamics': training_dynamics,
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas, torch, 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
compute_train_dy_metrics Ran
ran; our contract draft was wrong, not the code
beyondguo/TrainingDynamics/dy_filtering.py
pointer only (licence: NONE) · get_code("fbb1ac1ee7b9badd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, beyondguo/TrainingDynamics 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.

convert_string_to_unique_number Ran
ran on a synthesized input
allenai/cartography/cartography/data_utils_glue.py
code served (permissive licence) · get_code("18829c005e571204")
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 logging
import random
import re

logger = logging.getLogger(__name__)

def convert_string_to_unique_number(string: str) -> int:
    """
    Hack to convert SNLI ID into a unique integer ID, for tensorizing.
    """
    id_map = {'e': '0', 'c': '1', 'n': '2'}
    if string.startswith('vg_len'):
        code = '555'
    elif string.startswith('vg_verb'):
        code = '444'
    else:
        code = '000'
    try:
        number = int(code + re.sub('\\D', '', string) + id_map.get(string[-1], '3'))
    except:
        number = random.randint(10000, 99999)
        logger.info(f'Cannot find ID for {string}, using random number {number}.')
    return number


ARGS = {
    'string': 'vg_len_123_456e'
}
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 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
convert_tsv_entries_to_dataframe Ran
ran on a synthesized input
allenai/cartography/cartography/data_utils.py
code served (permissive licence) · get_code("d976a22c80de6352")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd

# Construct the arguments for convert_tsv_entries_to_dataframe

# tsv_dict: a dictionary where keys are line identifiers and values are TSV-formatted strings
tsv_dict = {
    "line1": "col1_val1\tcol2_val1\tcol3_val1",
    "line2": "col1_val2\tcol2_val2\tcol3_val2",
    "line3": "col1_val3\tcol2_val3\tcol3_val3",
}

# header: a tab-separated string of column names
header = "column1\tcolumn2\tcolumn3"

ARGS = {
    "tsv_dict": tsv_dict,
    "header": header,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family 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
label_balance Ran
ran on a synthesized input
allenai/cartography/cartography/classification/diagnostics_evaluation.py
code served (permissive licence) · get_code("17a0e1fc45469b30")
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
from collections import defaultdict

def label_balance(label_list):
    distribution = defaultdict(int)
    for label in label_list:
        distribution[label] += 1
    for label in distribution:
        distribution[label] /= len(label_list)
    return np.std(list(distribution.values()))

# The function takes a label_list parameter
# It iterates through the labels, counts them, normalizes by total length,
# and returns the standard deviation of the normalized distribution

# Construct a simple label list with multiple distinct labels
label_list = [0, 1, 0, 2, 1, 0, 3, 2]

ARGS = {
    "label_list": label_list
}
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
read_jsonl Ran
ran on a synthesized input
allenai/cartography/cartography/data_utils.py
code served (permissive licence) · get_code("d4036398be7d8fc9")
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 dict. 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 logging
import pandas as pd
import tempfile
import json
import os

logger = logging.getLogger(__name__)

# Create a temporary JSONL file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write test JSONL data
test_records = [
    {"pairID": "pair_1", "text": "hello", "score": 0.5},
    {"pairID": "pair_2", "text": "world", "score": 0.8},
    {"pairID": "pair_3", "text": "test", "score": 0.3},
]

with open(temp_file, 'w') as f:
    for record in test_records:
        f.write(json.dumps(record) + '\n')

ARGS = {
    'file_path': temp_file,
    'key': 'pairID'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
compute_train_dy_metrics_per_epoch Not yet run
unverified (harvested, no recorded run)
dyahadila/ood_cartography/cartography/selection/train_dy_filtering.py
code served (permissive licence) · get_code("13e0257678f83c36")
How it ran

no invocation recorded.

convert_mc_examples_to_features Not yet run
unverified (harvested, no recorded run)
allenai/cartography/cartography/classification/multiple_choice_utils.py
code served (permissive licence) · get_code("0356041f7d4f1629")
How it ran

no invocation recorded.

determine_categories_by_fields Not yet run
unverified (harvested, no recorded run)
allenai/cartography/cartography/classification/diagnostics_evaluation.py
code served (permissive licence) · get_code("8668f4254aab1786")
How it ran

no invocation recorded.

read_glue_tsv Not yet run
unverified (harvested, no recorded run)
allenai/cartography/cartography/data_utils_glue.py
code served (permissive licence) · get_code("b03cdf908937ca31")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 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-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

Large datasets have become commonplace in NLP research. However, the increased emphasis on data quantity has made it challenging to assess the quality of data. We introduce Data Maps-a model-based tool to characterize and diagnose datasets. We leverage a largely ignored source of information: the behavior of the model on individual instances during training (training dynamics) for building data maps. This yields two intuitive measures for each example-the model's confidence in the true class, and the variability of this confidence across epochs-obtained in a single run of training. Experiments across four datasets show that these model-dependent measures reveal three distinct regions in the data map, each with pronounced characteristics. First, our data maps show the presence of ambiguous regions with respect to the model, which contribute the most towards out-of-distribution generalization. Second, the most populous regions in the data are easy to learn for the model, and play an important role in model optimization. Finally, data maps uncover a region with instances that the model finds hard to learn; these often correspond to labeling errors. Our results indicate that a shift in focus from quantity to quality of data could lead to robust models and improved out-ofdistribution generalization.

For agents

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

get_harvested_code_for_paper("2009.10795")
get_code_for_paper("2009.10795")
have("2009.10795")

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

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

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

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

Connect an agent — have() is free.