SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2111.05177 · NeurIPS · 2021

On Training Implicit Models

Yisen Wang, Shaojie Bai, Zhouchen Lin, Zhengyang Geng, Xin-Yu Zhang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 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/2111.05177.json · badge: /api/ran/2111.05177.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
gsunshine/phantom_grad canonical (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_weight Ran
ran on a synthesized input
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/utils.py
code served (permissive licence) · get_code("d979af99360f8cf5")
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 float, 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)

ARGS = {
    "weight": 0.5,
    "step": 2000,
    "rampup_step": 4000
}
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 float, 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/models/mdeq.py
code served (permissive licence) · get_code("bc359191fdd6e179")
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 Conv2d. 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)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "bias": False,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
line_search Ran
ran; our contract draft was wrong, not the code
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/modules/broyden.py
code served (permissive licence) · get_code("cf5710371bcfb0ab")
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 numpy as np

torch.manual_seed(0)

# Create a small tensor for x0
x0 = torch.randn(4, requires_grad=True)

# Create update direction
update = torch.randn(4, requires_grad=True)

# Create initial gradient g0
g0 = torch.randn(4)

# Define a simple gradient function g that takes x_est and returns a gradient
def g(x_est):
    """
    Simple gradient function that returns a gradient vector.
    Takes an estimated x and returns a gradient of same shape.
    """
    return torch.randn(4)

ARGS = {
    "update": update,
    "x0": x0,
    "g0": g0,
    "g": g,
    "nstep": 0,
    "on": True,
}
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 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
norm_diff Ran
ran on a synthesized input
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/models/mdeq_core.py
code served (permissive licence) · get_code("7ed294bbbc64fbcc")
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 torch
import numpy as np

torch.manual_seed(0)

# The function expects `new` and `old` to be sequences of tensors
# It accesses new[i] and old[i], calls .norm() on their difference, then .item()
# So we need a list of tensors

new = [
    torch.randn(2, 4),
    torch.randn(3, 5),
    torch.randn(2, 2)
]

old = [
    torch.randn(2, 4),
    torch.randn(3, 5),
    torch.randn(2, 2)
]

show_list = False

ARGS = {
    'new': new,
    'old': old,
    'show_list': show_list
}
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 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
rmatvec Ran
ran; our contract draft was wrong, not the code
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/modules/broyden.py
code served (permissive licence) · get_code("968a8f446ad3c5b1")
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 3, dtype family float, shape (2, 3, 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)

# Analyze the function:
# - part_Us: used in einsum 'bij, bijd -> bd', so shape (b, i, j, d)
# - part_VTs: used in einsum 'bd, bdij -> bij', so shape (b, d, i, j)
# - x: used in einsum 'bij, bijd -> bd', so shape (b, i, j)

# Create small tensors with distinct dimensions
batch_size = 2
i_dim = 3
j_dim = 4
d_dim = 5

part_Us = torch.randn(batch_size, i_dim, j_dim, d_dim)
part_VTs = torch.randn(batch_size, d_dim, i_dim, j_dim)
x = torch.randn(batch_size, i_dim, j_dim)

ARGS = {
    "part_Us": part_Us,
    "part_VTs": part_VTs,
    "x": x,
}
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 Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
scalar_search_armijo Ran
ran, honoured the contract we drafted
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/modules/broyden.py
code served (permissive licence) · get_code("b2b5022f654ee4d3")
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 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 torch

torch.manual_seed(0)

# The function expects:
# - phi: a callable that takes a scalar alpha and returns a scalar value
# - phi0: a scalar (initial function value)
# - derphi0: a scalar (initial derivative value)
# - c1: a scalar (default 0.0001)
# - alpha0: a scalar (default 1)
# - amin: a scalar (default 0)

# Create a simple quadratic function as phi
# phi(alpha) = (alpha - 0.5)^2 + 0.1
def phi(alpha):
    return (alpha - 0.5) ** 2 + 0.1

# Evaluate at alpha=1 to get phi0
phi0 = phi(1.0)

# Derivative of phi at alpha=1: d/d_alpha[(alpha - 0.5)^2 + 0.1] = 2(alpha - 0.5)
# At alpha=1: 2(1 - 0.5) = 1.0
derphi0 = 1.0

ARGS = {
    "phi": phi,
    "phi0": phi0,
    "derphi0": derphi0,
    "c1": 0.0001,
    "alpha0": 1.0,
    "amin": 0.0,
}
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 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
weight_norm Ran
ran; our contract draft was wrong, not the code
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/modules/optimizations.py
pointer only (licence: MIT); the stored copy get_code serves, from neurocomplab-psu/spikingbert, is pointer only (licence: NONE) · get_code("f0fda38cdd52aefb")
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 neurocomplab-psu/spikingbert, 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.

accuracy Not yet run
unverified (harvested, no recorded run)
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/utils.py
code served (permissive licence) · get_code("40d68cf21decfa98")
How it ran

no invocation recorded.

power_method Not yet run
unverified (harvested, no recorded run)
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/models/mdeq_forward_backward.py
code served (permissive licence) · get_code("eb0f3b20cb022fb0")
How it ran

no invocation recorded.

reduce_tensor Not yet run
unverified (harvested, no recorded run)
gsunshine/phantom_grad/MDEQ/MDEQ_ImageNet/train_mdeq_imagenet.py
code served (permissive licence) · get_code("f55cbb1d14054e26")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 1 the same month, 6 later) and 4 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
accuracy 80 other papers
57 dated earlier, 1 the same month, 21 later, 1 same year, order not determinable
1307.0414 (2013-07)
Challenges in Representation Learning: A report on three machine learning contests
1412.6553 (2014-12)
Speeding-up Convolutional Neural Networks Using Fine-tuned CP-Decomposition
1503.02531 (2015-03)
Distilling the Knowledge in a Neural Network
and 77 more not named here
scalar_search_armijo
brick of this paper's assembly: helper
13 other papers
5 dated earlier, 8 later · 4 only as an assembly brick
2006.08656 (2020-06)
Multiscale Deep Equilibrium Models
2106.00553 (2021-06)
SHINE: SHaring the INverse Estimate from the forward pass for bi-level optimization and implicit models
2106.08748 (2021-06)
Input Invex Neural Network
and 10 more not named here
line_search
brick of this paper's assembly: helper
11 other papers
4 dated earlier, 7 later · 3 only as an assembly brick
2006.08656 (2020-06)
Multiscale Deep Equilibrium Models
2106.08748 (2021-06)
Input Invex Neural Network
2109.14247 (2021-09)
Training Feedback Spiking Neural Networks by Implicit Differentiation on the Equilibrium State
and 8 more not named here
rmatvec
brick of this paper's assembly: helper
10 other papers
3 dated earlier, 7 later · 5 only as an assembly brick
2006.08656 (2020-06)
Multiscale Deep Equilibrium Models
2106.00553 (2021-06)
SHINE: SHaring the INverse Estimate from the forward pass for bi-level optimization and implicit models
2109.14247 (2021-09)
Training Feedback Spiking Neural Networks by Implicit Differentiation on the Equilibrium State
and 7 more not named here
conv3x3 8 other papers
4 dated earlier, 4 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1805.11046 (2018-05)
Scalable Methods for 8-bit Training of Neural Networks
2001.07645 (2020-01)
SAUNet: Shape Attentive U-Net for Interpretable Medical Image Segmentation
and 5 more not named here
weight_norm 5 other papers
2 dated earlier, 3 later
1810.06682 (2018-10)
Trellis Networks for Sequence Modeling
2006.08656 (2020-06)
Multiscale Deep Equilibrium Models
2308.10873 (2023-08)
SpikingBERT: Distilling BERT to Train Spiking Language Models Using Implicit Differentiation
and 2 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-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

This paper focuses on training implicit models of infinite layers. Specifically, previous works employ implicit differentiation and solve the exact gradient for the backward propagation. However, is it necessary to compute such an exact but expensive gradient for training? In this work, we propose a novel gradient estimate for implicit models, named phantom gradient, that 1) forgoes the costly computation of the exact gradient; and 2) provides an update direction empirically preferable to the implicit model training. We theoretically analyze the condition under which an ascent direction of the loss landscape could be found, and provide two specific instantiations of the phantom gradient based on the damped unrolling and Neumann series. Experiments on large-scale tasks demonstrate that these lightweight phantom gradients significantly accelerate the backward passes in training implicit models by roughly 1.7×, and even boost the performance over approaches based on the exact gradient on ImageNet.

For agents

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

get_harvested_code_for_paper("2111.05177")
get_code_for_paper("2111.05177")
have("2111.05177")

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

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

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

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

Connect an agent — have() is free.