SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.07669 · 2020

HiPPO: Recurrent Memory with Optimal Polynomial Projections

arXiv · PDF · Open in the Atlas

Code that ran

11 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; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 7 failures of our instrument; 1 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/2008.07669.json · badge: /api/ran/2008.07669.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
HazyResearch/hippo-code canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
FunctionStatusWhere it lives
Activation Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from raminmh/liquid-s4
pointer only · get_code("89b10a8b26bbb7ed")
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. A run is recorded.

Linear_ Ran
ran on a synthesized input
HazyResearch/hippo-code/model/components.py
code served (permissive licence) · get_code("ba910cfe698ad603")
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 Linear. 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 partial

torch.manual_seed(0)

ARGS = {
    'input_size': 4,
    'output_size': 3,
    'bias': True,
    'init': 'normal',
    'zero_bias_init': True,
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
apply_tuple Ran
ran; our contract draft was wrong, not the code
HazyResearch/hippo-code/model/rnn.py
code served (permissive licence) · get_code("b24ed7ecbd6249ab")
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)

# Test case 1: Apply function to a single tensor
tensor_single = torch.randn(2, 4)

def square_fn(x):
    return x ** 2

# Test case 2: Apply function to a tuple of tensors
tensor_tuple = (torch.randn(2, 4), torch.randn(3, 5))

# Test case 3: Apply function to a tuple with mixed types (tensor and non-tensor)
tensor_mixed = (torch.randn(2, 4), 42, "metadata")

ARGS = {
    "tup": tensor_single,
    "fn": square_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
bitreversal_permutation Ran
ran, honoured the contract we drafted
HazyResearch/hippo-code/model/unroll.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from citymind-lab/neurips24-attraos, is pointer only (licence: NONE) · get_code("920218357ef96393")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from citymind-lab/neurips24-attraos, 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.

bitreversal_po2 Ran
ran, honoured the contract we drafted
HazyResearch/hippo-code/model/unroll.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from citymind-lab/neurips24-attraos, is pointer only (licence: NONE) · get_code("1c7d80fa5881a795")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from citymind-lab/neurips24-attraos, 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.

concat_tuple Ran
ran; our contract draft was wrong, not the code
HazyResearch/hippo-code/model/rnn.py
code served (permissive licence) · get_code("d25cbd25aadd7fea")
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 torch

torch.manual_seed(0)

# Case 1: List of tuples of tensors
tup1 = (torch.randn(2, 4), torch.randn(2, 3))
tup2 = (torch.randn(2, 4), torch.randn(2, 3))
tups_tuple_case = [tup1, tup2]

ARGS = {
    "tups": tups_tuple_case,
    "dim": 0
}
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 — 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
get_initializer Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from ag1988/dss
pointer only · get_code("f3449af8fae1d130")
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. A run is recorded.

get_initializer Ran
ran on a synthesized input
HazyResearch/hippo-code/model/components.py
code served (permissive licence) · get_code("261aab6fe51ea01d")
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 partial. 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 partial

torch.manual_seed(0)

# The function get_initializer takes two parameters:
# 1. name: a string specifying the initializer type
# 2. activation: a string specifying the activation function

ARGS = {
    'name': 'uniform',
    'activation': 'relu'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
shift_up Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HazyResearch/hippo-code/model/unroll.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from citymind-lab/neurips24-attraos, is pointer only (licence: NONE) · get_code("3de2f7ab3e3dc431")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from citymind-lab/neurips24-attraos, 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.

transition Ran
ran; our contract draft was wrong, not the code
HazyResearch/hippo-code/model/op.py
code served (permissive licence) · get_code("82ea253c64044e55")
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 numpy as np
from scipy import special as ss

# Define ARGS with all parameters for the transition function
ARGS = {
    'measure': 'glagt',
    'N': 4,
    'alpha': 0.5,
    'beta': 0.01,
}

# Test with different measures to ensure validity
test_cases = [
    {'measure': 'lagt', 'N': 4, 'beta': 1.0},
    {'measure': 'tlagt', 'N': 4, 'beta': 0.5},
    {'measure': 'glagt', 'N': 4, 'alpha': 0.5, 'beta': 0.01},
    {'measure': 'legt', 'N': 4},
    {'measure': 'lmu', 'N': 4},
    {'measure': 'legs', 'N': 4},
]

# Verify the primary ARGS case works
def transition(measure, N, **measure_args):
    """ A, B transition matrices for different measures.

    measure: the type of measure
      legt - Legendre (translated)
      legs - Legendre (scaled)
      glagt - generalized Laguerre (translated)
      lagt, tlagt - previous versions of (tilted) Laguerre with slightly different normalization
    """
    if measure == 'lagt':
        b = measure_args.get('beta', 1.0)
        A = np.eye(N) / 2 - np.tril(np.ones((N, N)))
        B = b * np.ones((N, 1))
    if measure == 'tlagt':
        b = measure_args.get('beta', 1.0)
        A = (1.0 - b) / 2 * np.eye(N) - np.tril(np.ones((N, N)))
        B = b * np.ones((N, 1))
    if measure == 'glagt':
        alpha = measure_args.get('alpha', 0.0)
        beta = measure_args.get('beta', 0.01)
        A = -np.eye(N) * (1 + beta) / 2 - np.tril(np.ones((N, N)), -1)
        B = ss.binom(alpha + np.arange(N), np.arange(N))[:, None]
        L = np.exp(0.5 * (ss.gammaln(np.arange(N) + alpha + 1) - ss.gammaln(np.arange(N) + 1)))
        A = 1.0 / L[:, None] * A * L[None, :]
        B = 1.0 / L[:, None] * B * np.exp(-0.5 * ss.gammaln(1 - alpha)) * beta ** ((1 - alpha) / 2)
    elif measure == 'legt':
        Q = np.arange(N, dtype=np.float64)
        R = (2 * Q + 1) ** 0.5
        j, i = np.meshgrid(Q, Q)
        A = R[:, None] * np.where(i < j, (-1.0) ** (i - j), 1) * R[None, :]
        B = R[:, None]
        A = -A
    elif measure == 'lmu':
        Q = np.arange(N, dtype=np.float64)
        R = (2 * Q + 1)[:, None]
        j, i = np.meshgrid(Q, Q)
        A = np.where(i < j, -1, (-1.0) ** (i - j + 1)) * R
        B = (-1.0) ** Q[:, None] * R
    elif measure == 'legs':
        q = np.arange(N, dtype=np.float64)
        col, row = np.meshgrid(q, q)
        r = 2 * q + 1
        M = -(np.where(row >= col, r, 0) - np.diag(q))
        T = np.sqrt(np.diag(2 * q + 1))
        A = T @ M @ np.linalg.inv(T)
        B = np.diag(T)[:, None]
    return (A, B)

# Verify ARGS works
result = transition(**ARGS)
assert len(result) == 2
assert isinstance(result[0], np.ndarray)
assert isinstance(result[1], np.ndarray)

ARGS = {
    'measure': 'glagt',
    'N': 4,
    'alpha': 0.5,
    'beta': 0.01,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
transition Ran
ran; our contract draft was wrong, not the code
HazyResearch/hippo-code/tensorflow/hippo.py
code served (permissive licence) · get_code("46b2822b9e5411e0")
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 numpy as np
import scipy.special as ss

# The function transition takes:
# - measure: string indicating which measure type
# - N: integer for matrix dimension
# - **measure_args: keyword arguments like beta, alpha, etc.

ARGS = {
    'measure': 'legt',
    'N': 4,
    'measure_args': {}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
pl_train Not yet run
unverified (harvested, no recorded run)
HazyResearch/hippo-code/pl_runner.py
code served (permissive licence) · get_code("662bbcc5aee6ea80")
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 11 distinct functions with an identity, 8 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 8 later) and 3 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
Activation 15 other papers
1 dated earlier, 14 later · 2 only as an assembly brick
1312.5602 (2013-12)
Playing Atari with Deep Reinforcement Learning
2009.09761 (2020-09)
DiffWave: A Versatile Diffusion Model for Audio Synthesis
2111.00396 (2021-11)
Efficiently Modeling Long Sequences with Structured State Spaces
and 12 more not named here
get_initializer 10 other papers
10 later · 1 only as an assembly brick
2111.00396 (2021-11)
Efficiently Modeling Long Sequences with Structured State Spaces
2202.09729 (2022-02)
It's Raw! Audio Generation with State-Space Models
2203.14343 (2022-03)
Diagonal State Spaces are as Effective as Structured State Spaces
and 7 more not named here
apply_tuple 2 other papers
2 later
2407.04999 (2024-07)
Rethinking the Effectiveness of Graph Classification Datasets in Benchmarks for Assessing GNNs
2509.15857 (2025-09)
EvoBrain: Dynamic Multi-Channel EEG Graph Modeling for Time-Evolving Brain Networks
concat_tuple 2 other papers
2 later
2407.04999 (2024-07)
Rethinking the Effectiveness of Graph Classification Datasets in Benchmarks for Assessing GNNs
2509.15857 (2025-09)
EvoBrain: Dynamic Multi-Channel EEG Graph Modeling for Time-Evolving Brain Networks
bitreversal_permutation 1 other paper
1 later
2410.06651 (2024-10)
Toward Physics-guided Time Series Embedding
bitreversal_po2 1 other paper
1 later
2410.06651 (2024-10)
Toward Physics-guided Time Series Embedding
shift_up 1 other paper
1 later
2410.06651 (2024-10)
Toward Physics-guided Time Series Embedding
transition 1 other paper
1 later
2205.08897 (2022-05)
FiLM: Frequency improved Legendre Memory Model for Long-term Time Series Forecasting

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

A central problem in learning from sequential data is representing cumulative history in an incremental fashion as more data is processed. We introduce a general framework (HiPPO) for the online compression of continuous signals and discrete time series by projection onto polynomial bases. Given a measure that specifies the importance of each time step in the past, HiPPO produces an optimal solution to a natural online function approximation problem. As special cases, our framework yields a short derivation of the recent Legendre Memory Unit (LMU) from first principles, and generalizes the ubiquitous gating mechanism of recurrent neural networks such as GRUs. This formal framework yields a new memory update mechanism (HiPPO-LegS) that scales through time to remember all history, avoiding priors on the timescale. HiPPO-LegS enjoys the theoretical benefits of timescale robustness, fast updates, and bounded gradients. By incorporating the memory dynamics into recurrent neural networks, HiPPO RNNs can empirically capture complex temporal dependencies. On the benchmark permuted MNIST dataset, HiPPO-LegS sets a new state-of-the-art accuracy of 98.3%. Finally, on a novel trajectory classification task testing robustness to out-of-distribution timescales and missing data, HiPPO-LegS outperforms RNN and neural ODE baselines by 25-40% accuracy.

For agents

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

get_harvested_code_for_paper("2008.07669")
get_code_for_paper("2008.07669")
have("2008.07669")

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

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

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

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

Connect an agent — have() is free.