The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
config: struct<outdir: string, seeds: int64, d: int64, n: int64, steps: int64, batch: int64, device: string>
child 0, outdir: string
child 1, seeds: int64
child 2, d: int64
child 3, n: int64
child 4, steps: int64
child 5, batch: int64
child 6, device: string
per_seed: list<item: struct<seed: int64, family: string, mse_teacher_forced: double, mse_free_running: double, (... 27 chars omitted)
child 0, item: struct<seed: int64, family: string, mse_teacher_forced: double, mse_free_running: double, final_trai (... 15 chars omitted)
child 0, seed: int64
child 1, family: string
child 2, mse_teacher_forced: double
child 3, mse_free_running: double
child 4, final_train_loss: double
summary: struct<glm: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: dou (... 207 chars omitted)
child 0, glm: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: double>
child 0, tf_mean: double
child 1, tf_std: double
child 2, fr_mean: double
child 3, fr_std: double
child 4, fr_over_tf: double
child 1, ridge: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: double>
child 0, tf_mean: double
child 1, tf_std: double
child 2, fr_mean: double
child 3, fr_std: double
child 4, fr_over_tf: double
child 2, lasso: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: doub
...
int64
child 3, device: string
child 4, R: int64
child 5, exponent_matrices: double
child 6, exponent_width: double
child 7, exponent_flops: double
child 8, exponent_wallclock: double
child 9, n_timed: int64
child 10, max_dim: int64
C_cost: struct<rows: list<item: struct<N: int64, R_ours: int64, D_prior: int64, timed: bool, matrices_ours: (... 374 chars omitted)
child 0, rows: list<item: struct<N: int64, R_ours: int64, D_prior: int64, timed: bool, matrices_ours: int64, matric (... 175 chars omitted)
child 0, item: struct<N: int64, R_ours: int64, D_prior: int64, timed: bool, matrices_ours: int64, matrices_prior: i (... 163 chars omitted)
child 0, N: int64
child 1, R_ours: int64
child 2, D_prior: int64
child 3, timed: bool
child 4, matrices_ours: int64
child 5, matrices_prior: int64
child 6, matrices_ratio: double
child 7, width_ratio: double
child 8, flops_ours: int64
child 9, flops_prior: int64
child 10, flops_ratio: double
child 11, ms_ours: double
child 12, ms_prior: double
child 13, ms_ratio: double
child 1, d: int64
child 2, n_ctx: int64
child 3, device: string
child 4, R: int64
child 5, exponent_matrices: double
child 6, exponent_width: double
child 7, exponent_flops: double
child 8, exponent_wallclock: double
child 9, n_timed: int64
child 10, max_dim: int64
to
{'A_masking_rule': {'table_match': Value('bool'), 'rows': List({'t': Value('int64'), 'paper_block': Value('string'), 'repro_block': Value('string'), 'paper_pair': List(Value('string')), 'repro_pair': List(Value('string')), 'match': Value('bool')}), 'unhandled_invalid_indices': List(Value('null')), 'invalid_only_in_special_cases': Value('bool')}, 'B_semantic_sufficiency': {'max_abs_error_forward': Value('float64'), 'max_abs_error_backward': Value('float64'), 'max_abs_reconstruction_error': Value('float64'), 'n_checks': Value('int64'), 'exact': Value('bool')}, 'C_cost': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value('int64'), 'matrices_ratio': Value('float64'), 'width_ratio': Value('float64'), 'flops_ours': Value('int64'), 'flops_prior': Value('int64'), 'flops_ratio': Value('float64'), 'ms_ours': Value('float64'), 'ms_prior': Value('float64'), 'ms_ratio': Value('float64')}), 'd': Value('int64'), 'n_ctx': Value('int64'), 'device': Value('string'), 'R': Value('int64'), 'exponent_matrices': Value('float64'), 'exponent_width': Value('float64'), 'exponent_flops': Value('float64'), 'exponent_wallclock': Value('float64'), 'n_timed': Value('int64'), 'max_dim': Value('int64')}, 'C_cost_sweep': {'5': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value
...
': Value('int64')}, '32': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value('int64'), 'matrices_ratio': Value('float64'), 'width_ratio': Value('float64'), 'flops_ours': Value('int64'), 'flops_prior': Value('int64'), 'flops_ratio': Value('float64'), 'ms_ours': Value('float64'), 'ms_prior': Value('float64'), 'ms_ratio': Value('float64')}), 'd': Value('int64'), 'n_ctx': Value('int64'), 'device': Value('string'), 'R': Value('int64'), 'exponent_matrices': Value('float64'), 'exponent_width': Value('float64'), 'exponent_flops': Value('float64'), 'exponent_wallclock': Value('float64'), 'n_timed': Value('int64'), 'max_dim': Value('int64')}, '64': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value('int64'), 'matrices_ratio': Value('float64'), 'width_ratio': Value('float64'), 'flops_ours': Value('int64'), 'flops_prior': Value('int64'), 'flops_ratio': Value('float64'), 'ms_ours': Value('float64'), 'ms_prior': Value('float64'), 'ms_ratio': Value('float64')}), 'd': Value('int64'), 'n_ctx': Value('int64'), 'device': Value('string'), 'R': Value('int64'), 'exponent_matrices': Value('float64'), 'exponent_width': Value('float64'), 'exponent_flops': Value('float64'), 'exponent_wallclock': Value('float64'), 'n_timed': Value('int64'), 'max_dim': Value('int64')}}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
config: struct<outdir: string, seeds: int64, d: int64, n: int64, steps: int64, batch: int64, device: string>
child 0, outdir: string
child 1, seeds: int64
child 2, d: int64
child 3, n: int64
child 4, steps: int64
child 5, batch: int64
child 6, device: string
per_seed: list<item: struct<seed: int64, family: string, mse_teacher_forced: double, mse_free_running: double, (... 27 chars omitted)
child 0, item: struct<seed: int64, family: string, mse_teacher_forced: double, mse_free_running: double, final_trai (... 15 chars omitted)
child 0, seed: int64
child 1, family: string
child 2, mse_teacher_forced: double
child 3, mse_free_running: double
child 4, final_train_loss: double
summary: struct<glm: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: dou (... 207 chars omitted)
child 0, glm: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: double>
child 0, tf_mean: double
child 1, tf_std: double
child 2, fr_mean: double
child 3, fr_std: double
child 4, fr_over_tf: double
child 1, ridge: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: double>
child 0, tf_mean: double
child 1, tf_std: double
child 2, fr_mean: double
child 3, fr_std: double
child 4, fr_over_tf: double
child 2, lasso: struct<tf_mean: double, tf_std: double, fr_mean: double, fr_std: double, fr_over_tf: doub
...
int64
child 3, device: string
child 4, R: int64
child 5, exponent_matrices: double
child 6, exponent_width: double
child 7, exponent_flops: double
child 8, exponent_wallclock: double
child 9, n_timed: int64
child 10, max_dim: int64
C_cost: struct<rows: list<item: struct<N: int64, R_ours: int64, D_prior: int64, timed: bool, matrices_ours: (... 374 chars omitted)
child 0, rows: list<item: struct<N: int64, R_ours: int64, D_prior: int64, timed: bool, matrices_ours: int64, matric (... 175 chars omitted)
child 0, item: struct<N: int64, R_ours: int64, D_prior: int64, timed: bool, matrices_ours: int64, matrices_prior: i (... 163 chars omitted)
child 0, N: int64
child 1, R_ours: int64
child 2, D_prior: int64
child 3, timed: bool
child 4, matrices_ours: int64
child 5, matrices_prior: int64
child 6, matrices_ratio: double
child 7, width_ratio: double
child 8, flops_ours: int64
child 9, flops_prior: int64
child 10, flops_ratio: double
child 11, ms_ours: double
child 12, ms_prior: double
child 13, ms_ratio: double
child 1, d: int64
child 2, n_ctx: int64
child 3, device: string
child 4, R: int64
child 5, exponent_matrices: double
child 6, exponent_width: double
child 7, exponent_flops: double
child 8, exponent_wallclock: double
child 9, n_timed: int64
child 10, max_dim: int64
to
{'A_masking_rule': {'table_match': Value('bool'), 'rows': List({'t': Value('int64'), 'paper_block': Value('string'), 'repro_block': Value('string'), 'paper_pair': List(Value('string')), 'repro_pair': List(Value('string')), 'match': Value('bool')}), 'unhandled_invalid_indices': List(Value('null')), 'invalid_only_in_special_cases': Value('bool')}, 'B_semantic_sufficiency': {'max_abs_error_forward': Value('float64'), 'max_abs_error_backward': Value('float64'), 'max_abs_reconstruction_error': Value('float64'), 'n_checks': Value('int64'), 'exact': Value('bool')}, 'C_cost': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value('int64'), 'matrices_ratio': Value('float64'), 'width_ratio': Value('float64'), 'flops_ours': Value('int64'), 'flops_prior': Value('int64'), 'flops_ratio': Value('float64'), 'ms_ours': Value('float64'), 'ms_prior': Value('float64'), 'ms_ratio': Value('float64')}), 'd': Value('int64'), 'n_ctx': Value('int64'), 'device': Value('string'), 'R': Value('int64'), 'exponent_matrices': Value('float64'), 'exponent_width': Value('float64'), 'exponent_flops': Value('float64'), 'exponent_wallclock': Value('float64'), 'n_timed': Value('int64'), 'max_dim': Value('int64')}, 'C_cost_sweep': {'5': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value
...
': Value('int64')}, '32': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value('int64'), 'matrices_ratio': Value('float64'), 'width_ratio': Value('float64'), 'flops_ours': Value('int64'), 'flops_prior': Value('int64'), 'flops_ratio': Value('float64'), 'ms_ours': Value('float64'), 'ms_prior': Value('float64'), 'ms_ratio': Value('float64')}), 'd': Value('int64'), 'n_ctx': Value('int64'), 'device': Value('string'), 'R': Value('int64'), 'exponent_matrices': Value('float64'), 'exponent_width': Value('float64'), 'exponent_flops': Value('float64'), 'exponent_wallclock': Value('float64'), 'n_timed': Value('int64'), 'max_dim': Value('int64')}, '64': {'rows': List({'N': Value('int64'), 'R_ours': Value('int64'), 'D_prior': Value('int64'), 'timed': Value('bool'), 'matrices_ours': Value('int64'), 'matrices_prior': Value('int64'), 'matrices_ratio': Value('float64'), 'width_ratio': Value('float64'), 'flops_ours': Value('int64'), 'flops_prior': Value('int64'), 'flops_ratio': Value('float64'), 'ms_ours': Value('float64'), 'ms_prior': Value('float64'), 'ms_ratio': Value('float64')}), 'd': Value('int64'), 'n_ctx': Value('int64'), 'device': Value('string'), 'R': Value('int64'), 'exponent_matrices': Value('float64'), 'exponent_width': Value('float64'), 'exponent_flops': Value('float64'), 'exponent_wallclock': Value('float64'), 'n_timed': Value('int64'), 'max_dim': Value('int64')}}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Reproduction bundle — Chain-of-Thought Gradient Descent (ICML 2026, submission #443)
OpenReview: https://openreview.net/forum?id=uZ8JZ1Lw9a
An independent reproduction. No official code, checkpoints, or data were released with the paper, so everything here is implemented from the paper text (Definitions 2.2–2.3, 4.3–4.4; Theorems 4.1–4.2; Propositions 4.1–4.4; Appendix D and E).
What is here
scripts/
common.py N-layer FFN forward/backprop (Def 2.2/2.3), CoT block
formats F_i, B_i, X_l, Y_l (Def 4.3), dynamic-masking
rule M(t) (Def 4.4)
exp1_statistical.py Appendix E.1 — ICGD of GLM / ridge / lasso
exp2_operators.py Appendix E.2 — separate forward + backward ICGD operators
exp3_endtoend.py Appendix E.3 — end-to-end ICGD of a 3-layer FFN, and the
10-round rollout of Figure 5
exp4_masking_and_cost.py Claim 2 — masking-rule correctness vs. the Appendix D
table, block-reconstruction exactness, and the O(N) cost
benchmark against the Wu et al. (2025) packing
run_all.py driver used for the Hugging Face GPU Job
make_figures.py Plotly figures + raw CSVs from the result JSONs
make_poster_embed.py builds the logbook `poster_embed.html` from a rendered poster
outputs/ result JSONs from the GPU Job (+ run_manifest.json)
figures/ Plotly HTML figures and their raw CSVs
poster/ posterly poster source, rendered PDF/PNG, gate report
Rerun
pip install torch numpy plotly
cd scripts
# Claim 2 — structural checks + cost sweep (seconds, CPU is fine)
python exp4_masking_and_cost.py --outdir ../outputs
# Claim 1 — the three Appendix E experiments (GPU recommended)
python exp1_statistical.py --outdir ../outputs --seeds 10 --steps 4000
python exp2_operators.py --outdir ../outputs --K 400 --epochs 20 --rounds 5
python exp3_endtoend.py --outdir ../outputs --seeds 10 --steps 4000
# everything at once, exactly as the GPU Job ran it
python run_all.py --outdir ../outputs # add --quick for a smoke test
python make_figures.py --indir ../outputs --outdir ../figures
On a CPU box, export TORCH_THREADS=4 first — these are very small tensors and PyTorch's
default thread count causes severe oversubscription (measured ~16x slowdown at 16 threads).
Choices the paper leaves unspecified
The paper's Appendix E omits several settings. These are ours, and are held fixed across all runs:
| Setting | Paper | Here |
|---|---|---|
d in E.1 and E.3 |
not stated | 5 (matches E.2's stated d = 5) |
in-context examples n in E.1 |
not stated | 20 |
| optimizer / schedule | not stated | Adam, lr 1e-3, cosine decay |
| training steps (E.1, E.3) | not stated | 4000, batch 64 |
K teacher networks (E.2) |
not stated | 400 |
GD step size eta for the FFN |
not stated | 0.05 |
| activation | ReLU (from the Limitations section) | ReLU |
| loss on the FFN output | not stated | squared loss |
| block as a token | blocks are R x d (Def 4.3) |
one token of width R |
The last row matters. Every block in Definition 4.3 has the form (vector) * 1_{1xd}, so
all d of its columns are identical and it carries R = 1 + 3d + d^2 numbers rather than
R * d. We therefore represent a block as a single token of width R, which is also what
Figure 1 depicts ("only 2 tokens processed").
Definition 4.3 also writes X_l with a 0_{(3d+d^2) x d} filler and Y_l with a
0_{(2d+d^2) x d} filler, which give inconsistent row counts (4d+d^2+1 vs 3d+d^2+1).
We pad both to the common R and use a distinct scalar tag in the final row to mark the
four routed input types that Proposition 4.3 requires.
Hub artifacts
- Code: https://huggingface.co/datasets/JG1310/repro-chain-of-thought-gradient-descent-code
- Logbook Space:
JG1310/repro-chain-of-thought-gradient-descent
- Downloads last month
- 41