SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1606.04474 · 2016

Learning to learn by gradient descent by gradient descent

arXiv · PDF · Open in the Atlas

Code that ran

7 of 13 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 6 no recorded run), measured 2026-11-21; 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/1606.04474.json · badge: /api/ran/1606.04474.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/learning-to-learn canonical (classifier label)
classifier basis: census
3 ran · 4 no recorded run
yangsenius/learning-to-learn-by-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
chenwydj/learning-to-learn-by-gradient-descent-by-gradient-descent community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
FunctionStatusWhere it lives
RMS Ran
ran; our contract draft was wrong, not the code
yangsenius/learning-to-learn-by-pytorch/learning_to_learn.py
code served (permissive licence) · get_code("51aa3978682adacb")
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 2, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

DIM = 10

# Create a small gradient tensor
gradients = torch.randn(DIM)

# Create initial state (None will be handled by the function)
state = None

# Define learning rate and decay rate
learning_rate = 0.01
decay_rate = 0.9

ARGS = {
    "gradients": gradients,
    "state": state,
    "learning_rate": learning_rate,
    "decay_rate": decay_rate,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
SGD Ran
ran, honoured the contract we drafted
yangsenius/learning-to-learn-by-pytorch/learning_to_learn.py
code served (permissive licence) · get_code("5618ad88931a7126")
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. 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)

# Construct arguments for SGD function
gradients = torch.randn(2, 4)  # Small tensor for gradients
state = {}  # Empty state dict (not used in function but required parameter)
learning_rate = 0.001

ARGS = {
    "gradients": gradients,
    "state": state,
    "learning_rate": learning_rate,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
f Ran
ran, honoured the contract we drafted
yangsenius/learning-to-learn-by-pytorch/learning_to_learn.py
code served (permissive licence) · get_code("6f7f03d4cde2161b")
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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# W is used in torch.matmul(W, x.unsqueeze(-1))
# x.unsqueeze(-1) adds a dimension, so if x is shape (4,), it becomes (4, 1)
# torch.matmul(W, (4, 1)) suggests W should be (batch, 4, 4) or similar
# The result is .squeeze() and then subtracted from Y, then squared and summed over dim=1
# This suggests the output of matmul is (batch, something)
# Then .sum(dim=1).mean(dim=0) suggests we have (batch, ...) and sum over dim 1

# Let's work backwards:
# - x is shape (4,) based on the unsqueeze(-1) making it (4, 1)
# - W @ x.unsqueeze(-1) with W shape (batch, 4, 4) gives (batch, 4, 1)
# - .squeeze() gives (batch, 4)
# - Y should be (batch, 4) to subtract
# - (... - Y) ** 2 gives (batch, 4)
# - .sum(dim=1) gives (batch,)
# - .mean(dim=0) gives scalar

batch_size = 2
dim = 4

W = torch.randn(batch_size, dim, dim)
Y = torch.randn(batch_size, dim)
x = torch.randn(dim)

ARGS = {
    "W": W,
    "Y": Y,
    "x": x
}
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 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_default_net_config Ran
ran on a synthesized input
deepmind/learning-to-learn/util.py
code served (permissive licence) · get_code("3b0a626884ce3fe7")
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 os

def get_net_path(name, path):
    return None if path is None else os.path.join(path, name + '.l2l')

def get_default_net_config(name, path):
    return {'net': 'CoordinateWiseDeepLSTM', 'net_options': {'layers': (20, 20), 'preprocess_name': 'LogAndSign', 'preprocess_options': {'k': 5}, 'scale': 0.01}, 'net_path': get_net_path(name, path)}

ARGS = {
    'name': 'test_net',
    'path': '/tmp/models'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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_net_path Ran
ran on a synthesized input
deepmind/learning-to-learn/util.py
code served (permissive licence) · get_code("111bd4a379a61c1f")
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 os

# Based on the function signature and body:
# - name: str parameter used in string concatenation
# - path: str or None parameter used in os.path.join

ARGS = {
    "name": "test_model",
    "path": "/tmp/models"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
quadratic Ran
ran on a synthesized input
deepmind/learning-to-learn/problems.py
code served (permissive licence) · get_code("78582427a7b893ff")
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 tensorflow as tf

ARGS = {
    'batch_size': 2,
    'num_dims': 4,
    'stddev': 0.01,
    'dtype': tf.float32,
}
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 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
to_var Ran
ran; our contract draft was wrong, not the code
chenwydj/learning-to-learn-by-gradient-descent-by-gradient-descent/meta_module.py
pointer only (licence: MIT); the stored copy get_code serves, from xjtushujun/cmw-net, is pointer only (licence: NONE) · get_code("a2f6a25906e664c5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xjtushujun/cmw-net, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

conv1x1 Not yet run
unverified (harvested, no recorded run)
chenwydj/learning-to-learn-by-gradient-descent-by-gradient-descent/resnet_meta.py
code served (permissive licence) · get_code("1c29584b2939883a")
How it ran

no invocation recorded.

conv3x3 Not yet run
unverified (harvested, no recorded run)
chenwydj/learning-to-learn-by-gradient-descent-by-gradient-descent/resnet_meta.py
code served (permissive licence) · get_code("f743b7e6cb381d7e")
How it ran

no invocation recorded.

ensemble Not yet run
unverified (harvested, no recorded run)
deepmind/learning-to-learn/problems.py
code served (permissive licence) · get_code("b69df76f969a0132")
How it ran

no invocation recorded.

factory Not yet run
unverified (harvested, no recorded run)
deepmind/learning-to-learn/networks.py
code served (permissive licence) · get_code("ea2e402a00d255b0")
How it ran

no invocation recorded.

run_epoch Not yet run
unverified (harvested, no recorded run)
deepmind/learning-to-learn/util.py
code served (permissive licence) · get_code("5802125d5f2e3a34")
How it ran

no invocation recorded.

simple_multi_optimizer Not yet run
unverified (harvested, no recorded run)
deepmind/learning-to-learn/problems.py
code served (permissive licence) · get_code("2e3ea0020c003c64")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
to_var 17 other papers
17 later · 4 only as an assembly brick
1902.07379 (2019-02)
Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting
2003.10780 (2020-03)
Rethinking Class-Balanced Methods for Long-Tailed Visual Recognition from a Domain Adaptation Perspective
2006.11280 (2020-06)
Self-PU: Self Boosted and Calibrated Positive-Unlabeled Training
and 14 more not named here

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-21.

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 move from hand-designed features to learned features in machine learning has been wildly successful. In spite of this, optimization algorithms are still designed by hand. In this paper we show how the design of an optimization algorithm can be cast as a learning problem, allowing the algorithm to learn to exploit structure in the problems of interest in an automatic way. Our learned algorithms, implemented by LSTMs, outperform generic, hand-designed competitors on the tasks for which they are trained, and also generalize well to new tasks with similar structure. We demonstrate this on a number of tasks, including simple convex problems, training neural networks, and styling images with neural art.

For agents

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

get_harvested_code_for_paper("1606.04474")
get_code_for_paper("1606.04474")
have("1606.04474")

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

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

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

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

Connect an agent — have() is free.