SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.11663 · ICML · 2023

Efficient Training of Deep Equilibrium Models

Bac Nguyen, Lukas Mauch

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; 1 honoured the contract we drafted, 0 violated it and 0 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/2304.11663.json · badge: /api/ran/2304.11663.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
locuslab/deq canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 2 no recorded run
FunctionStatusWhere it lives
broyden Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
locuslab/deq/lib/solvers.py
code served (permissive licence) · get_code("823ec2857d23bdea")
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 torch
import numpy as np

torch.manual_seed(0)

# Create a simple function f that the broyden solver will work with
# The function should take a tensor of shape (bsz, total_hsize, seq_len) and return same shape
def create_f():
    def f(x):
        # Simple function: f(x) = x + 0.1 * sin(x)
        return x + 0.1 * torch.sin(x)
    return f

# Set up parameters
bsz = 2
total_hsize = 4
seq_len = 3
threshold = 10
eps = 0.001

# Create x0: initial guess
x0 = torch.randn(bsz, total_hsize, seq_len)

# Create the function
f = create_f()

# Build ARGS dictionary
ARGS = {
    'f': f,
    'x0': x0,
    'threshold': threshold,
    'eps': eps,
    'stop_mode': 'rel',
    'ls': False,
    'name': 'test_broyden'
}
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 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
line_search Ran
ran; our contract draft was wrong, not the code
locuslab/deq/lib/solvers.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
power_method Ran
ran; our contract draft was wrong, not the code
locuslab/deq/lib/jacobian.py
code served (permissive licence) · get_code("3c120cc50bc8c55f")
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)

# Create a simple function that takes z0 as input and produces f0 as output
# We need z0 to require gradients so that torch.autograd.grad can compute gradients
z0 = torch.randn(2, 4, requires_grad=True)

# Create a simple neural network to define the function f
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

net = SimpleNet()

# Compute f0 by passing z0 through the network
f0 = net(z0)

ARGS = {
    "f0": f0,
    "z0": z0,
    "n_iters": 200
}
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
rmatvec Ran
ran; our contract draft was wrong, not the code
locuslab/deq/lib/solvers.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
locuslab/deq/lib/solvers.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
jac_loss_estimate Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from locuslab/deq
pointer only · get_code("d41246cdbd511eff")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. No invocation recorded.

jac_loss_estimate Not yet run
unverified (harvested, no recorded run)
locuslab/deq/lib/jacobian.py
code served (permissive licence) · get_code("3d07af47a6ba65bd")
How it ran

no invocation recorded.

power_method Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from locuslab/deq
pointer only · get_code("8a2cfe51ec1c04e7")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. 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 6 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 5 later) and 1 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
scalar_search_armijo
brick of this paper's assembly: helper
13 other papers
7 dated earlier, 1 the same month, 5 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
6 dated earlier, 5 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
5 dated earlier, 1 the same month, 4 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
jac_loss_estimate 3 other papers
1 dated earlier, 2 later
2106.14342 (2021-06)
Stabilizing Equilibrium Models by Jacobian Regularization
2411.00899 (2024-11)
Certified Robustness for Deep Equilibrium Models via Serialized Random Smoothing
2602.03024 (2026-02)
Consistency Deep Equilibrium Models
power_method 3 other papers
1 dated earlier, 2 later
2106.14342 (2021-06)
Stabilizing Equilibrium Models by Jacobian Regularization
2411.00899 (2024-11)
Certified Robustness for Deep Equilibrium Models via Serialized Random Smoothing
2602.03024 (2026-02)
Consistency Deep Equilibrium Models

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

Deep equilibrium models (DEQs) have proven to be very powerful for learning data representations. The idea is to replace traditional (explicit) feedforward neural networks with an implicit fixed-point equation, which allows to decouple the forward and backward passes. In particular, training DEQ layers becomes very memory-efficient via the implicit function theorem. However, backpropagation through DEQ layers still requires solving an expensive Jacobian-based equation. In this paper, we introduce a simple but effective strategy to avoid this computational burden. Our method relies on the Jacobian approximation of Broyden's method after the forward pass to compute the gradients during the backward pass. Experiments show that simply re-using this approximation can significantly speed up the training while not causing any performance degradation.

For agents

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

get_harvested_code_for_paper("2304.11663")
get_code_for_paper("2304.11663")
have("2304.11663")

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

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

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

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

Connect an agent — have() is free.