SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.16495 · ICML · 2021

Guarantees for Tuning the Step Size using a Learning-to-Learn Approach

Rong Ge, Xiang Wang, Shuai Yuan, Chenwei Wu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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; 2 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/2006.16495.json · badge: /api/ran/2006.16495.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
Kolin96/learning-to-learn canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
FunctionStatusWhere it lives
create_local_state_variable_name Ran
ran on a synthesized input
Kolin96/learning-to-learn/optimizer/trainable_optimizer.py
code served (permissive licence) · get_code("bc792625bf192273")
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 torch
import numpy as np

# Mock TensorFlow-like tensor object
class MockTensor:
    def __init__(self, shape, dtype_name='float32'):
        self.shape = shape
        self.dtype_name = dtype_name
        self._dtype = MockDType(dtype_name)
    
    def get_shape(self):
        return self
    
    def is_fully_defined(self):
        return all(dim is not None for dim in self.shape)
    
    def as_list(self):
        return list(self.shape)
    
    @property
    def dtype(self):
        return self._dtype

class MockDType:
    def __init__(self, name):
        self.name = name

# Create a mock tensor with fully defined shape
tensor = MockTensor(shape=[2, 4, 3], dtype_name='float32')

ARGS = {
    'tensor': tensor
}
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 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
inner_gradient Ran
ran on a synthesized input
Kolin96/learning-to-learn/learn_eta_quadratic.py
code served (permissive licence) · get_code("a29e2c66eec87988")
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 1, dtype family float, shape (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 numpy as np

torch_seed = 0

# inner_gradient takes w and H
# It calls H.dot(w), so H needs a .dot() method
# This is consistent with numpy arrays or similar objects

# Create a small numpy array for H (Hessian-like matrix)
H = np.array([[1.0, 0.5, 0.2, 0.1],
              [0.5, 2.0, 0.3, 0.4],
              [0.2, 0.3, 1.5, 0.6],
              [0.1, 0.4, 0.6, 2.5]])

# Create a small numpy array for w (weight vector)
w = np.array([1.0, 2.0, 3.0, 4.0])

ARGS = {
    "w": w,
    "H": H,
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
inner_gradient Ran
ran on a synthesized input
Kolin96/learning-to-learn/grid_search_eta_lr.py
code served (permissive licence) · get_code("66f59cb96df39435")
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 1, dtype family float, shape (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 numpy as np

class Dataset:
    def __init__(self, data, labels, size):
        self.data = data
        self.labels = labels
        self.size = size

# Create small dataset with distinct dimensions
# data: 2 samples × 4 features
# labels: 2 samples
data = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float64)

labels = np.array([1.0, 0.0], dtype=np.float64)

dataset = Dataset(
    data=data,
    labels=labels,
    size=2
)

# weight vector: 4 features
w = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float64)

ARGS = {
    "w": w,
    "dataset": dataset
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
inner_objective Ran
ran on a synthesized input
Kolin96/learning-to-learn/learn_eta_quadratic.py
code served (permissive licence) · get_code("a568c027ca2040e4")
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 2, dtype family float, shape (1, 1) 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

torch_seed = 0

# inner_objective takes w and H
# w.T.dot(H).dot(w) suggests both are numpy arrays or similar with .dot() method
# w should be 1D or 2D, H should be 2D (since it's used as middle term in chain)
# Let's make w a column vector and H a square matrix

w = np.array([[1.0], [2.0], [3.0], [4.0]])  # shape (4, 1)
H = np.array([
    [1.0, 0.5, 0.2, 0.1],
    [0.5, 2.0, 0.3, 0.2],
    [0.2, 0.3, 1.5, 0.4],
    [0.1, 0.2, 0.4, 2.5]
])  # shape (4, 4)

ARGS = {
    "w": w,
    "H": H
}
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 ndarray, ndim 2, dtype family float, shape (1, 1) — shape (1, 1) 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
inner_objective Ran
ran on a synthesized input
Kolin96/learning-to-learn/grid_search_eta_lr.py
code served (permissive licence) · get_code("a32163d6a503ce8d")
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

class Dataset:
    def __init__(self, data, labels):
        self.data = data
        self.labels = labels

# Create small dataset
# data: 2 samples, 4 features
# labels: 2 samples
data = np.array([[1.0, 2.0, 3.0, 4.0],
                  [5.0, 6.0, 7.0, 8.0]], dtype=np.float64)
labels = np.array([10.0, 20.0], dtype=np.float64)

dataset = Dataset(data, labels)

# Create weight vector matching number of features
w = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float64)

ARGS = {
    "w": w,
    "dataset": dataset
}
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
is_local_state_variable Ran
ran on a synthesized input
Kolin96/learning-to-learn/optimizer/trainable_optimizer.py
code served (permissive licence) · get_code("225d57d7b5d99342")
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 bool, 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 torch.nn as nn

# Mock TensorFlow operation object
class MockNodeDef:
    def __init__(self, op):
        self.op = op

class MockOp:
    def __init__(self, name, op_type):
        self.name = name
        self.node_def = MockNodeDef(op_type)

# Create a mock op that satisfies the conditions:
# - op.node_def.op in ['Variable', 'VariableV2']
# - op.name.startswith('LOL/local_state_')
mock_op = MockOp('LOL/local_state_my_variable', 'Variable')

ARGS = {
    'op': mock_op
}
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 bool, 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
local_state_variables Ran
ran on a synthesized input
Kolin96/learning-to-learn/optimizer/trainable_optimizer.py
code served (permissive licence) · get_code("cd9d0fc29f961374")
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 tensorflow as tf
import collections

# Enable TF 1.x compatibility mode
tf.compat.v1.disable_eager_execution()

# Reset the default graph to ensure clean state
tf.compat.v1.reset_default_graph()

# Create a TensorFlow session
session = tf.compat.v1.Session()

# Create some small test tensors with fully-defined shapes
init_value_1 = tf.constant([[1.0, 2.0], [3.0, 4.0]], dtype=tf.float32)
init_value_2 = tf.constant([5.0, 6.0, 7.0], dtype=tf.float32)
init_values = [init_value_1, init_value_2]

# Create a boolean tensor to control which values are returned
return_init_values = tf.constant(True, dtype=tf.bool)

ARGS = {
    'init_values': init_values,
    'return_init_values': return_init_values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
make_finite Ran
ran on a synthesized input
Kolin96/learning-to-learn/optimizer/utils.py
code served (permissive licence) · get_code("4000108ebc38f439")
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 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

# Create a small tensor with mixed finite and non-finite values
t = tf.constant([
    [1.0, 2.0, np.inf, 4.0],
    [5.0, np.nan, 7.0, 8.0]
], dtype=tf.float32)

# Create a replacement scalar value
replacement = tf.constant(-999.0, dtype=tf.float32)

ARGS = {
    "t": t,
    "replacement": replacement
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
rmse Ran
ran on a synthesized input
Kolin96/learning-to-learn/grid_search_eta_lr.py
code served (permissive licence) · get_code("3c2bdf1f52efa337")
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

class Dataset:
    def __init__(self, data, labels):
        self.data = data
        self.labels = labels

# Create small dataset
# data shape: (2, 4) - 2 samples, 4 features
# labels shape: (2,) - 2 labels
data = np.array([[1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0]])
labels = np.array([10.0, 20.0])

dataset = Dataset(data, labels)

# Create weight vector matching number of features
w = np.array([0.1, 0.2, 0.3, 0.4])

ARGS = {
    "w": w,
    "dataset": dataset
}
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
sample_numiter Ran
ran on a synthesized input
Kolin96/learning-to-learn/metaopt.py
code served (permissive licence) · get_code("ba86381f60535ae6")
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 numpy as np

ARGS = {
    "scale": 2.5,
    "min_steps": 50,
}
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 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
affine Not yet run
unverified (harvested, no recorded run)
Kolin96/learning-to-learn/optimizer/utils.py
code served (permissive licence) · get_code("2dfc94f8071b57a4")
How it ran

no invocation recorded.

asinh Not yet run
unverified (harvested, no recorded run)
Kolin96/learning-to-learn/optimizer/utils.py
code served (permissive licence) · get_code("050bfd9dcf7081fb")
How it ran

no invocation recorded.

Also present in other papers' code

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

Choosing the right parameters for optimization algorithms is often the key to their success in practice. Solving this problem using a learning-to-learn approach-using meta-gradient descent on a meta-objective based on the trajectory that the optimizer generates-was recently shown to be effective. However, the meta-optimization problem is difficult. In particular, the meta-gradient can often explode/vanish, and the learned optimizer may not have good generalization performance if the meta-objective is not chosen carefully. In this paper we give meta-optimization guarantees for the learning-to-learn approach on a simple problem of tuning the step size for quadratic loss. Our results show that the naïve objective suffers from meta-gradient explosion/vanishing problem. Although there is a way to design the meta-objective so that the meta-gradient remains polynomially bounded, computing the meta-gradient directly using backpropagation leads to numerical issues. We also characterize when it is necessary to compute the meta-objective on a separate validation set to ensure the generalization performance of the learned optimizer. Finally, we verify our results empirically and show that a similar phenomenon appears even for more complicated learned optimizers parametrized by neural networks.

For agents

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

get_harvested_code_for_paper("2006.16495")
get_code_for_paper("2006.16495")
have("2006.16495")

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

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

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

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

Connect an agent — have() is free.