SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.09543 · 2023

Latent State Models of Training Dynamics

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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 0 have no contract verdict; 5 failures of our instrument; 3 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/2308.09543.json · badge: /api/ran/2308.09543.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
michahu/modeling-training canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
distance Ran
ran; our contract draft was wrong, not the code
michahu/modeling-training/src/data.py
code served (permissive licence) · get_code("a5330d2e9abcc8f6")
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 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

torch.manual_seed(0)

# Create two small tensors with shape (2, 4)
x = torch.randn(2, 4)
y = torch.randn(2, 4)

ARGS = {
    "x": x,
    "y": y,
}
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 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
get_markov_chain Ran
ran; our contract draft was wrong, not the code
michahu/modeling-training/src/utils.py
code served (permissive licence) · get_code("62de75d5b60ef7ed")
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 Digraph. 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)

# Create a valid transition matrix for a Markov chain
# Shape should be (n, n) where n is the number of states
# Values should be probabilities (between 0 and 1)
# Each row should sum to 1 (or at least have some positive values)

matrix = np.array([
    [0.5, 0.3, 0.2],
    [0.0, 0.6, 0.4],
    [0.1, 0.1, 0.8]
], dtype=np.float32)

ARGS = {
    'matrix': matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
graphviz, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Digraph — a Digraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Digraph 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
make_hmm_data Ran
ran; our contract draft was wrong, not the code
michahu/modeling-training/src/utils.py
code served (permissive licence) · get_code("f643b738733925a8")
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
import tempfile
import os

# Create temporary directory with CSV files
temp_dir = tempfile.mkdtemp()

# Create sample CSV files
np.random.seed(0)

for i in range(5):
    data = {
        'step': np.arange(1, 101),
        'feature_a': np.random.randn(100),
        'feature_b': np.random.randn(100),
        'feature_c': np.random.randn(100)
    }
    df = pd.DataFrame(data)
    csv_path = os.path.join(temp_dir, f'data_{i}.csv')
    df.to_csv(csv_path, index=False)

# Define ARGS
ARGS = {
    'data_dir': temp_dir + '/',
    'cols': ['feature_a', 'feature_b', 'feature_c'],
    'sort': True,
    'first_n': 50
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, scipy, 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
unpack_biases_transformer Ran
ran; our contract draft was wrong, not the code
michahu/modeling-training/src/metrics.py
code served (permissive licence) · get_code("82b70fe3a513f175")
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)

class MLP(nn.Module):
    def __init__(self):
        super().__init__()
        self.b_in = nn.Parameter(torch.randn(4))
        self.b_out = nn.Parameter(torch.randn(3))

class TransformerLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.mlp = MLP()

layer = TransformerLayer()

ARGS = {
    "layer": layer
}
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
unpack_weights_transformer Ran
ran; our contract draft was wrong, not the code
michahu/modeling-training/src/metrics.py
code served (permissive licence) · get_code("109a27e98c8e8ed7")
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)

class AttentionModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.W_K = nn.Parameter(torch.randn(4, 3))
        self.W_Q = nn.Parameter(torch.randn(4, 5))
        self.W_V = nn.Parameter(torch.randn(4, 6))
        self.W_O = nn.Parameter(torch.randn(7, 8))

class MLPModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.W_in = nn.Parameter(torch.randn(9, 10))
        self.W_out = nn.Parameter(torch.randn(11, 12))

class TransformerLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.attn = AttentionModule()
        self.mlp = MLPModule()

layer = TransformerLayer()

ARGS = {
    "layer": layer
}
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
get_stats_for_run Not yet run
unverified (harvested, no recorded run)
michahu/modeling-training/src/utils.py
code served (permissive licence) · get_code("b835b29572e2af0e")
How it ran

no invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
michahu/modeling-training/src/compute_cka.py
code served (permissive licence) · get_code("d2caf6b967cb24fb")
How it ran

no invocation recorded.

patch_attention Not yet run
unverified (harvested, no recorded run)
michahu/modeling-training/src/metrics.py
code served (permissive licence) · get_code("79a7f3d9dbd168e1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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.

FunctionAlso present inEarliest-datedOthers named
distance 1 other paper
1 dated earlier
2205.10343 (2022-05)
Towards Understanding Grokking: An Effective Theory of Representation Learning

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

The impact of randomness on model training is poorly understood. How do differences in data order and initialization actually manifest in the model, such that some training runs outperform others or converge faster? Furthermore, how can we interpret the resulting training dynamics and the phase transitions that characterize different trajectories? To understand the effect of randomness on the dynamics and outcomes of neural network training, we train models multiple times with different random seeds and compute a variety of metrics throughout training, such as the $L_2$ norm, mean, and variance of the neural network's weights. We then fit a hidden Markov model (HMM) over the resulting sequences of metrics. The HMM represents training as a stochastic process of transitions between latent states, providing an intuitive overview of significant changes during training. Using our method, we produce a low-dimensional, discrete representation of training dynamics on grokking tasks, image classification, and masked language modeling. We use the HMM representation to study phase transitions and identify latent "detour" states that slow down convergence.

For agents

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

get_harvested_code_for_paper("2308.09543")
get_code_for_paper("2308.09543")
have("2308.09543")

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

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

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

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

Connect an agent — have() is free.