SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.01952 · 2023

On a continuous time model of gradient descent dynamics and instability in deep learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 10 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/2302.01952.json · badge: /api/ran/2302.01952.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
deepmind/dd_two_player_games community (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
binary_cross_entropy_loss Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/losses.py
code served (permissive licence) · get_code("8ee04e47cc8ffe35")
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 logits: shape (2, 1) - batch size 2, single output per sample
logits = jnp.array([[0.5], [-0.3]], dtype=jnp.float32)

# Create targets: shape (2, 1) - binary targets matching logits shape
targets = jnp.array([[1.0], [0.0]], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "targets": targets,
}
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
calculate_frechet_distance_with_error_bars Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/metric_utils.py
code served (permissive licence) · get_code("d217f26096c77c6d")
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 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 numpy as np
import jax.numpy as jnp

np.random.seed(0)

# Create a pool of features for multiple splits
# Shape: (num_samples, feature_dim)
# We need enough samples to split into num_splits chunks
num_splits = 3
feature_dim = 4
samples_per_split = 2
total_samples = num_splits * samples_per_split

pool = np.random.randn(total_samples, feature_dim).astype(np.float32)

# Create data_mus: list of mean vectors for each split
data_mus = [np.random.randn(feature_dim).astype(np.float32) for _ in range(num_splits)]

# Create data_sigmas: list of covariance matrices for each split
# Covariance matrices must be symmetric positive semi-definite
data_sigmas = []
for _ in range(num_splits):
    # Create a random matrix and multiply by its transpose to ensure positive semi-definite
    A = np.random.randn(feature_dim, feature_dim).astype(np.float32)
    cov = np.matmul(A, A.T)
    data_sigmas.append(cov)

ARGS = {
    "pool": pool,
    "data_mus": data_mus,
    "data_sigmas": data_sigmas,
    "use_jax": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy, scipy — 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
calculate_inception_score Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/metric_utils.py
code served (permissive licence) · get_code("91a2171efdef64bc")
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 float32, 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 a small pred array with shape (batch_size, num_classes)
# The function uses exp, log, mean, sum, expand_dims operations on this
np.random.seed(0)
pred = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "pred": pred,
    "use_jax": False
}
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 float32, 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
filter_out_new_training_state Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/gan.py
code served (permissive licence) · get_code("0c0abb6ad51c15e5")
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 collections
import haiku as hk
import jax
import jax.numpy as jnp

# Create sample state dictionaries with haiku-compatible structure
# The function checks for 'batch_norm' in module names and handles state accordingly

# Create new_state with both batch_norm and non-batch_norm modules
new_state = {
    'batch_norm_layer': {'scale': jnp.array([1.0, 2.0, 3.0, 4.0]), 'bias': jnp.array([0.1, 0.2, 0.3, 0.4])},
    'dense_layer': {'w': jnp.array([[1.0, 2.0], [3.0, 4.0]]), 'b': jnp.array([0.5, 0.6])},
    'conv_batch_norm': {'mean': jnp.array([0.5, 0.5, 0.5, 0.5]), 'var': jnp.array([0.1, 0.1, 0.1, 0.1])}
}

# Create old_state with the same keys but different values
old_state = {
    'batch_norm_layer': {'scale': jnp.array([2.0, 3.0, 4.0, 5.0]), 'bias': jnp.array([0.2, 0.3, 0.4, 0.5])},
    'dense_layer': {'w': jnp.array([[2.0, 3.0], [4.0, 5.0]]), 'b': jnp.array([0.7, 0.8])},
    'conv_batch_norm': {'mean': jnp.array([0.6, 0.6, 0.6, 0.6]), 'var': jnp.array([0.2, 0.2, 0.2, 0.2])}
}

ARGS = {
    'new_state': new_state,
    'old_state': old_state
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
haiku, jax — 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
get_player_fn Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/gan.py
code served (permissive licence) · get_code("0465af73b2877578")
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 torch
import torch.nn as nn

torch.manual_seed(0)

class SimplePlayer(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(4, hidden_dim)
    
    def forward(self, x, y=None):
        return self.linear(x)

class PlayerWrapper(nn.Module):
    def __init__(self, base_model, config=None):
        super().__init__()
        self.base_model = base_model
        self.config = config or {}
    
    def forward(self, x, y=None):
        return self.base_model(x, y)

player = PlayerWrapper
player_kwargs = {
    'base_model': SimplePlayer(hidden_dim=4),
    'config': {'learning_rate': 0.01, 'epochs': 10}
}

ARGS = {
    'player': player,
    'player_kwargs': player_kwargs
}
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 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
image_postprocess Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/data_utils.py
code served (permissive licence) · get_code("960e1119c4129674")
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 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 torch

torch.manual_seed(0)

# The function takes an image tensor and applies a simple normalization:
# (image + 1.0) / 2
# This suggests the input is expected to be in range [-1, 1] and converts to [0, 1]
# We'll create a small tensor in the expected range

image = torch.randn(2, 3, 4, 4)  # batch=2, channels=3, height=4, width=4

ARGS = {
    "image": image
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
image_preprocess Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/data_utils.py
code served (permissive licence) · get_code("801251546afebbdc")
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 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 tensorflow as tf
import numpy as np

# Create a small image tensor (batch_size=2, height=4, width=3, channels=3)
# with uint8 values in [0, 255] range
image_data = np.random.randint(0, 256, size=(2, 4, 3, 3), dtype=np.uint8)
image_tensor = tf.constant(image_data)

# Construct the input dict with 'image' key as expected by the function
image_dict = {'image': image_tensor}

ARGS = {
    'image': image_dict
}
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 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
sn_dict_for_logging Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/experiment.py
code served (permissive licence) · get_code("f870d8d7e9089108")
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 torch
import numpy as np

torch.manual_seed(0)

# The function iterates over items in sn_dict, looking for keys containing 'sn_params_tree'
# and accesses v['sigma'] for each value
# So sn_dict needs to be a dict where values are dicts with a 'sigma' key

sn_dict = {
    'module.layer1.sn_params_tree.weight': {'sigma': torch.tensor(0.5)},
    'module.layer2.sn_params_tree.bias': {'sigma': torch.tensor(0.3)},
    'other_key': {'sigma': torch.tensor(0.7)},
}

ARGS = {
    'sn_dict': sn_dict,
}
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 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
square_loss Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/losses.py
code served (permissive licence) · get_code("f63e9d5b08ab1779")
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 logits and targets
logits = jnp.array([[0.1, 0.2, 0.3, 0.4],
                     [0.5, 0.6, 0.7, 0.8]], dtype=jnp.float32)

targets = jnp.array([[0.0, 0.1, 0.2, 0.3],
                      [0.4, 0.5, 0.6, 0.7]], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "targets": targets
}
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
square_loss_with_sigmoid_logits Ran
ran on a synthesized input
deepmind/dd_two_player_games/dd_two_player_games/losses.py
code served (permissive licence) · get_code("daddd6a303235a22")
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
import jax.numpy as jnp

# Create small test tensors for logits and targets
logits = jnp.array([[0.5, -0.3, 1.2, -0.8],
                     [0.1, 0.4, -0.5, 0.9]], dtype=jnp.float32)

targets = jnp.array([[0.9, 0.2, 0.8, 0.1],
                      [0.3, 0.7, 0.4, 0.6]], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "targets": targets,
}
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 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
calculate_inception_scores_with_error_bars Not yet run
unverified (harvested, no recorded run)
deepmind/dd_two_player_games/dd_two_player_games/metric_utils.py
code served (permissive licence) · get_code("e1191eecfa7fae5f")
How it ran

no invocation recorded.

Also present in other papers' code

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

The recipe behind the success of deep learning has been the combination of neural networks and gradient-based optimization. Understanding the behavior of gradient descent however, and particularly its instability, has lagged behind its empirical success. To add to the theoretical tools available to study gradient descent we propose the principal flow (PF), a continuous time flow that approximates gradient descent dynamics. To our knowledge, the PF is the only continuous flow that captures the divergent and oscillatory behaviors of gradient descent, including escaping local minima and saddle points. Through its dependence on the eigendecomposition of the Hessian the PF sheds light on the recently observed edge of stability phenomena in deep learning. Using our new understanding of instability we propose a learning rate adaptation method which enables us to control the trade-off between training stability and test set evaluation performance.

For agents

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

get_harvested_code_for_paper("2302.01952")
get_code_for_paper("2302.01952")
have("2302.01952")

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

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

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

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

Connect an agent — have() is free.