SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.05960 · NeurIPS · 2021

Imitating Deep Learning Dynamics via Locally Elastic Stochastic Differential Equations

Hua Wang, Weijie Su, Jiayao Zhang

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 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/2110.05960.json · badge: /api/ran/2110.05960.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
zjiayao/le_sde canonical (classifier label)
classifier basis: classifier_2025
6 ran · 1 no recorded run
FunctionStatusWhere it lives
estimate_AB_I Ran
ran; our contract draft was wrong, not the code
zjiayao/le_sde/src/utils.py
code served (permissive licence) · get_code("1da543d1d44ea8a4")
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 2, 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 small DataFrame with the required structure
np.random.seed(0)
nc = 3  # number of classes

# Create sample data with logit columns for each class
data = []
for class_idx in range(nc):
    # Create 2 samples per class
    for sample_idx in range(2):
        row = {'y': class_idx}
        # Create logit columns for each class
        for logit_idx in range(nc):
            row[f'y_logit{logit_idx}'] = np.random.randn()
        data.append(row)

df = pd.DataFrame(data)

ARGS = {
    'df': df,
    'nc': nc
}
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 2, 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
fwd_euler Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zjiayao/le_sde/src/utils.py
code served (permissive licence) · get_code("ce0415511522e308")
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, 5, 3, 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

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

# Define the arguments for fwd_euler

# x0: initial state - 3x3 array (3 components, each 3-dimensional)
x0 = np.array([
    np.array([1.0, 0.5, 0.3]),
    np.array([0.2, 1.2, 0.4]),
    np.array([0.6, 0.1, 0.9])
])

# n_trial: number of trials to simulate
n_trial = 2

# T: time steps
T = 5

# f_ahat: function that takes time index and returns a scalar
def f_ahat(idx):
    return 0.5 + 0.1 * idx

# f_bhat: function that takes time index and returns a scalar
def f_bhat(idx):
    return 0.3 + 0.05 * idx

# noise_scale: scaling factor for noise
noise_scale = 1.0

ARGS = {
    'x0': x0,
    'n_trial': n_trial,
    'T': T,
    'f_ahat': f_ahat,
    'f_bhat': f_bhat,
    'noise_scale': noise_scale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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 4, dtype family float, shape (2, 5, 3, 3) — shape (2, 5, 3, 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
gen_model Ran
ran; our contract draft was wrong, not the code
zjiayao/le_sde/src/models.py
code served (permissive licence) · get_code("00754237fa5f561a")
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, 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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

def get_ortho_mat(n):
    """Generate a random orthogonal matrix"""
    q, _ = np.linalg.qr(np.random.randn(n, n))
    return q

# Define ARGS dict with all parameters for gen_model
ARGS = {
    "data_shape": (1, 32, 32),  # Single channel, 32x32 image
    "n_classes": 5,              # 5 output classes
    "lr": 0.005,                 # Learning rate
    "model_func": nn.Module,     # Default model function (will use SimpleConv in actual call)
    "rand_H": False              # Whether to use random orthogonal pre-softmax layer
}

# Override model_func to be SimpleConv for proper execution
class SimpleConv(nn.Module):
    def __init__(self, input_shape, n_classes, has_pre_softmax_ly=False, **kwargs):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 6, 5)
        self.pool = nn.MaxPool2d(2, 2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.fc3 = nn.Linear(84, n_classes)
        self.has_pre_softmax_ly = has_pre_softmax_ly
        if has_pre_softmax_ly:
            self.pre_softmax_ly = nn.Linear(n_classes, n_classes, bias=False)

    def forward(self, x):
        x = self.pool(torch.nn.functional.relu(self.conv1(x)))
        x = self.pool(torch.nn.functional.relu(self.conv2(x)))
        x = x.view(-1, 16 * 5 * 5)
        x = torch.nn.functional.relu(self.fc1(x))
        x = torch.nn.functional.relu(self.fc2(x))
        x = self.fc3(x)
        if self.has_pre_softmax_ly:
            x = self.pre_softmax_ly(x)
        return x

ARGS["model_func"] = SimpleConv
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
get_ABab Ran
ran; our contract draft was wrong, not the code
zjiayao/le_sde/src/utils.py
code served (permissive licence) · get_code("6f3bc22c4d782e02")
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
import pandas as pd

class MockExpData:
    def __init__(self):
        self.n_classes = 3
        self.hists = self._create_hists()
    
    def _create_hists(self):
        # Create a dataframe with logits columns for 3 classes
        data = []
        for itr in range(2):
            for y in range(3):
                for _ in range(2):
                    row = {'itr': itr, 'y': y}
                    for c in range(3):
                        row[f'y_logit{c}'] = np.random.randn()
                    data.append(row)
        return pd.DataFrame(data)

class MockModel:
    def upper(self):
        return 'I'

def mock_diff_handle(x):
    return np.diff(x) if hasattr(x, '__len__') and len(x) > 1 else x

exp_data = MockExpData()
query = "itr >= 0"
model = "I"
diff_handle = mock_diff_handle

ARGS = {
    'exp_data': exp_data,
    'query': query,
    'model': model,
    'diff_handle': diff_handle,
    'clean_cache': False
}
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 — 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
hash_pd Ran
ran; our contract draft was wrong, not the code
zjiayao/le_sde/src/utils.py
code served (permissive licence) · get_code("cf17d8204dc2e8c3")
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 pandas as pd
import hashlib

# Create a small pandas DataFrame to pass to hash_pd
df = pd.DataFrame({
    'col1': [1, 2, 3],
    'col2': [4.5, 5.5, 6.5],
    'col3': ['a', 'b', 'c']
})

ARGS = {
    'df': df
}
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 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
simluate_leode Ran
ran, honoured the contract we drafted
zjiayao/le_sde/src/utils.py
code served (permissive licence) · get_code("35cdaeb83a89f39c")
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 ndarray, ndim 4, dtype family float, shape (2, 4, 3, 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
import pandas as pd
import types as _types

# Create a minimal ExperimentResult class
class ExperimentResult:
    def __init__(self, n_classes, T, hists):
        self.n_classes = n_classes
        self.T = T
        self.hists = hists

# Create minimal stub functions for data_analyzer namespace
def df_add_smp(df):
    return df

def df_to_logits(df):
    return df

def diff(x):
    if isinstance(x, np.ndarray):
        return np.diff(x)
    return x

def estimate_tail_idx(x):
    return 1.0

def estimate_tail_r(x):
    return 1.0

def get_normal(x):
    return x

def get_xyz(x):
    return x

def load_cifar10_K(k):
    return None

def load_geom_N(n):
    return None

def load_geom_p(p):
    return None

def load_geom_rd_p(p):
    return None

def merge_hists(h1, h2):
    return h1

def merge_hists_K(h, k):
    return h

def min_max(x):
    return x

def moving_average(x, w):
    return x

def nanmean(x):
    return np.nanmean(x)

def savgol_di(x):
    return x

# Build data_analyzer namespace
data_analyzer = _types.SimpleNamespace(**{
    'ExperimentResult': ExperimentResult,
    'df_add_smp': df_add_smp,
    'df_to_logits': df_to_logits,
    'diff': diff,
    'estimate_AB_I': lambda df, nc: (1.0, 1.0),
    'estimate_AB_L': lambda df, nc: (np.ones(5), np.ones(5), np.ones(5), 1.0),
    'estimate_tail_idx': estimate_tail_idx,
    'estimate_tail_r': estimate_tail_r,
    'get_ABab': lambda exp_data, query, est_model, diff_handle=None: (np.ones(5), np.ones(5), np.ones(5), np.ones(5)),
    'get_normal': get_normal,
    'get_xyz': get_xyz,
    'hash_pd': lambda df: "test_hash",
    'load_cifar10_K': load_cifar10_K,
    'load_geom_N': load_geom_N,
    'load_geom_p': load_geom_p,
    'load_geom_rd_p': load_geom_rd_p,
    'merge_hists': merge_hists,
    'merge_hists_K': merge_hists_K,
    'min_max': min_max,
    'moving_average': moving_average,
    'nanmean': nanmean,
    'savgol_di': savgol_di,
})

# Create sample data for exp_data
n_classes = 3
T = 5
n_samples = 10

# Create a DataFrame with the required structure
data_rows = []
for itr in range(T):
    for y in range(n_classes):
        row = {'itr': itr, 'y': y}
        for c in range(n_classes):
            row[f'y_logit{c}'] = np.random.randn()
        data_rows.append(row)

hists_df = pd.DataFrame(data_rows)

exp_data = ExperimentResult(
    n_classes=n_classes,
    T=T,
    hists=hists_df
)

# Create a simple diff_handle function
def diff_handle(x):
    if isinstance(x, np.ndarray) and len(x) > 1:
        return np.diff(x)
    return x

ARGS = {
    'exp_data': exp_data,
    'query': 'itr >= 0',
    'est_model': 'L',
    'diff_handle': diff_handle,
    'n_trials': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas, tqdm — 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, 3, 3) — shape (2, 4, 3, 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
estimate_AB_L Not yet run
unverified (harvested, no recorded run)
zjiayao/le_sde/src/utils.py
code served (permissive licence) · get_code("e2821d69ec4ba7ec")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-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

Understanding the training dynamics of deep learning models is perhaps a necessary step toward demystifying the effectiveness of these models. In particular, how do data from different classes gradually become separable in their feature spaces when training neural networks using stochastic gradient descent? In this study, we model the evolution of features during deep learning training using a set of stochastic differential equations (SDEs) that each corresponds to a training sample. As a crucial ingredient in our modeling strategy, each SDE contains a drift term that reflects the impact of backpropagation at an input on the features of all samples. Our main finding uncovers a sharp phase transition phenomenon regarding the intra-class impact: if the SDEs are locally elastic [19] in the sense that the impact is more significant on samples from the same class as the input, the features of the training data become linearly separable, meaning vanishing training loss; otherwise, the features are not separable, regardless of how long the training time is. Moreover, in the presence of local elasticity, an analysis of our SDEs shows that the emergence of a simple geometric structure called the neural collapse of the features. Taken together, our results shed light on the decisive role of local elasticity in the training dynamics of neural networks. We corroborate our theoretical analysis with experiments on a synthesized dataset of geometric shapes and CIFAR-10.

For agents

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

get_harvested_code_for_paper("2110.05960")
get_code_for_paper("2110.05960")
have("2110.05960")

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

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

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

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

Connect an agent — have() is free.