SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.01377 · 2019

Deep Equilibrium Models

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 1 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 3 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/1909.01377.json · badge: /api/ran/1909.01377.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
cgoemaere/hamdeq community (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
locuslab/impsq extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
reacho/deep-equilibrium-vs-bilevel community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
anderson Ran
ran on a synthesized input
cgoemaere/hamdeq/hopdeq/deq_core/solvers.py
code served (permissive licence) · get_code("799e823c70a9d96b")
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 Tensor, 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 torch
from typing import Callable, Optional

torch.manual_seed(0)

# Define a simple fixed-point function g
# The function takes a batch of tensors and returns updated tensors
def fixed_point_function(z: torch.Tensor) -> torch.Tensor:
    """
    A simple fixed-point function for testing.
    Input shape: (batch_size, dim_z)
    Output shape: (batch_size, dim_z)
    """
    # Simple contraction: multiply by a scalar less than 1 and add a constant
    return 0.9 * z + 0.1 * torch.ones_like(z)

# Initialize a small batch of tensors
# batch_size = 2, dim_z = 4
z_init = torch.randn(2, 4)

# Number of iterations
num_iterations = 5

# Memory size for Anderson acceleration
m = 4

# Optional logger function
def logger_fn(name: str, value: torch.Tensor) -> None:
    """Simple logger that prints metric name and value"""
    print(f"{name}: {value.item():.6f}")

# Construct the arguments dictionary
ARGS = {
    'f': fixed_point_function,
    'z_init': z_init,
    'iter': num_iterations,
    'm': m,
    'logger': logger_fn,
}
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 Tensor, 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
backprop Ran
ran on a synthesized input
cgoemaere/hamdeq/hopdeq/deq_core/backward.py
code served (permissive licence) · get_code("d9164060df059089")
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, ndim 3, 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 torch.nn as nn
from typing import Any, Callable, Tuple

torch.manual_seed(0)

# Build a minimal nn.Module that implements the required interface
class SimpleRecurrentModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def preprocess_inputs(self, x: torch.Tensor) -> torch.Tensor:
        """Preprocess inputs - required by backprop function"""
        return x
    
    def forward(self, Ux: torch.Tensor, z: torch.Tensor) -> torch.Tensor:
        """Forward pass taking preprocessed inputs and state z"""
        return torch.tanh(self.linear(z) + Ux)

# Create model instance
f = SimpleRecurrentModel()

# Create input tensor (batch_size=2, dim=4)
x = torch.randn(2, 4, requires_grad=True)

# Create state tensor (batch_size=2, dim=4)
z_free = torch.randn(2, 4)

# Create gradient output (batch_size=2, dim=4)
grad_output = torch.randn(2, 4)

# Create a simple solver function that implements fixed-point iteration
def fixed_point_solver(f_pure: Callable, z_init: torch.Tensor, max_iter: int = 5, **kwargs) -> torch.Tensor:
    """Simple fixed-point solver using Picard iteration"""
    z = z_init.clone().detach().requires_grad_(True)
    for _ in range(max_iter):
        z_next = f_pure(z)
        z = z_next.detach().requires_grad_(True)
    # Final iteration with gradient tracking
    z = z_next.clone().detach().requires_grad_(True)
    z = f_pure(z)
    return z

# Solver kwargs
solver_kwargs = {
    'max_iter': 5
}

# Construct ARGS dictionary
ARGS = {
    'grad_output': grad_output,
    'f': f,
    'x': x,
    'z_free': z_free,
    'solver': fixed_point_solver,
}
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 tuple, ndim 3, 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
damped Ran
ran on a synthesized input
cgoemaere/hamdeq/hopdeq/deq_core/utils/fixed_point_utils.py
code served (permissive licence) · get_code("1ec688ed87b414c9")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple function f that takes (Ux, z, *args, **kwargs) and returns a tensor
def f(Ux, z, *args, **kwargs):
    # f should return a tensor of the same shape as z
    return Ux + z

# Create sample tensors
Ux = torch.randn(2, 4)  # batch size 2, dim 4
z = torch.randn(2, 4)   # batch size 2, dim 4

# Define ARGS
ARGS = {
    'f': f,
    'beta': 0.5
}
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 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
get_function_from_package Ran
ran on a synthesized input
cgoemaere/hamdeq/hopdeq/deq_core/utils/import_utils.py
code served (permissive licence) · get_code("06ee28cae377b42a")
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 inspect
from functools import partial
from types import ModuleType
from typing import Callable, Optional


# Create a minimal test module with some functions
def dummy_function_one(x, y):
    """Test function one"""
    return x + y


def dummy_function_two(a, b, c=10):
    """Test function two"""
    return a * b + c


# Create a module-like object
test_module = ModuleType("test_module")
test_module.dummy_function_one = dummy_function_one
test_module.dummy_function_two = dummy_function_two


ARGS = {
    "package": test_module,
    "name": "dummy_function_one",
    "kwargs": None
}
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 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
load_dataset Ran
ran; our contract draft was wrong, not the code
locuslab/impsq/scripts/train_2d_image.py
pointer only (licence: NONE) · get_code("635c8fdeade67cba")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, locuslab/impsq 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.

picard Ran
ran on a synthesized input
cgoemaere/hamdeq/hopdeq/deq_core/solvers.py
code served (permissive licence) · get_code("a0f601462ac10944")
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 Tensor, 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 torch

torch.manual_seed(0)

# Define a simple callable function that applies damping (needed for convergence)
# The function takes a tensor and returns a tensor of the same shape
def f(z: torch.Tensor) -> torch.Tensor:
    # Simple damped identity-like operation: z' = 0.9 * z + 0.1 * sin(z)
    # This ensures convergence for Picard iteration
    return 0.9 * z + 0.1 * torch.sin(z)

# Define a simple logger function
def logger_fn(name: str, value: torch.Tensor) -> None:
    print(f"{name}: {value.item()}")

# Create initial tensor: batch_size=2, dim=4
z_init = torch.randn(2, 4)

# Number of iterations
num_iter = 5

ARGS = {
    'f': f,
    'z_init': z_init,
    'iter': num_iter,
    'logger': logger_fn
}
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 Tensor, 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
postprocess Ran
ran; our contract draft was wrong, not the code
locuslab/impsq/scripts/train_2d_image.py
pointer only (licence: NONE) · get_code("81a8d0038b2d548a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, locuslab/impsq 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.

preprocess Ran
ran, honoured the contract we drafted
locuslab/impsq/scripts/train_2d_image.py
pointer only (licence: NONE) · get_code("1194fc2f2f213578")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, locuslab/impsq 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.

track_states Ran
ran on a synthesized input
cgoemaere/hamdeq/hopdeq/deq_core/utils/fixed_point_utils.py
code served (permissive licence) · get_code("641ed886ac5440c1")
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 torch
import torch.nn as nn
from functools import wraps

torch.manual_seed(0)

# Create a simple function that returns a tensor
def simple_function(x):
    return x * 2

# Create a states list to track results
states_list = []

# Define ARGS dict with all parameters for track_states
ARGS = {
    "f": simple_function,
    "states": states_list,
    "disable": 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 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
evaluate Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from martaskrt/qdeq
pointer only; the stored copy get_code serves, from martaskrt/qdeq, is pointer only (licence: NONE) · get_code("ee0aeb0dbfe062f7")
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.

full_adjoint Not yet run
unverified (harvested, no recorded run)
cgoemaere/hamdeq/hopdeq/deq_core/backward.py
code served (permissive licence) · get_code("8b3921143c779266")
How it ran

no invocation recorded.

power_iteration_torch_T Not yet run
unverified (harvested, no recorded run)
reacho/deep-equilibrium-vs-bilevel/CelebA/DEQ-vs-bilevel-conv2d.py
code served (permissive licence) · get_code("20e21defecd44b23")
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, 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 11 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
evaluate 1 other paper
1 later
2410.23940 (2024-10)
Quantum 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-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

We present a new approach to modeling sequential data: the deep equilibrium model (DEQ). Motivated by an observation that the hidden layers of many existing deep sequence models converge towards some fixed point, we propose the DEQ approach that directly finds these equilibrium points via root-finding. Such a method is equivalent to running an infinite depth (weight-tied) feedforward network, but has the notable advantage that we can analytically backpropagate through the equilibrium point using implicit differentiation. Using this approach, training and prediction in these networks require only constant memory, regardless of the effective "depth" of the network. We demonstrate how DEQs can be applied to two state-of-the-art deep sequence models: self-attention transformers and trellis networks. On large-scale language modeling tasks, such as the WikiText-103 benchmark, we show that DEQs 1) often improve performance over these state-of-the-art models (for similar parameter counts); 2) have similar computational requirements to existing models; and 3) vastly reduce memory consumption (often the bottleneck for training large sequence models), demonstrating an up-to 88% memory reduction in our experiments. The code is available at https://github.com/locuslab/deq .

For agents

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

get_harvested_code_for_paper("1909.01377")
get_code_for_paper("1909.01377")
have("1909.01377")

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

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

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

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

Connect an agent — have() is free.