SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.01133 · NeurIPS · 2021

Posterior Meta-Replay for Continual Learning

Benjamin Ehret, Christian Henning, Maria Cervera, Johannes Von Oswald, Benjamin Grewe, Francesco Angelo, Regina Traber, Seijin Kobayashi, João Sacramento

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 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/2103.01133.json · badge: /api/ran/2103.01133.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
chrhenning/hypnettorch community
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
_grad_kin_energy Ran
ran, violated the contract we drafted
chrhenning/hypnettorch/hypnettorch/utils/hmc.py
code served (permissive licence) · get_code("70fa25de9903483e")
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 1, dtype family float, shape (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)

# Case 1: inv_mass is a Tensor with same number of elements as momentum
momentum = torch.randn(4)
inv_mass = torch.randn(4)

ARGS = {
    "momentum": momentum,
    "inv_mass": inv_mass,
}
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 1, dtype family float, shape (4,) — shape (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
_grad_pot_energy Ran
ran; our contract draft was wrong, not the code
chrhenning/hypnettorch/hypnettorch/utils/hmc.py
code served (permissive licence) · get_code("055ff336e35c176c")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Define a simple potential energy function as an nn.Module
class PotentialEnergy(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, position):
        return self.linear(position).sum()

# Create the potential energy function
pot_energy = PotentialEnergy()

# Create a position tensor that requires gradients
# Shape: (2, 4) - batch size 2, dimension 4
position = torch.randn(2, 4, requires_grad=True)

ARGS = {
    "pot_energy": pot_energy,
    "position": position,
}
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 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
_kin_energy Ran
ran; our contract draft was wrong, not the code
chrhenning/hypnettorch/hypnettorch/utils/hmc.py
code served (permissive licence) · get_code("1ac9127221a6c0ee")
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. 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)

# Case 1: inv_mass is a scalar (float)
momentum_1 = torch.randn(4)
inv_mass_scalar = 0.5

# Case 2: inv_mass is a tensor with same numel as momentum
momentum_2 = torch.randn(4)
inv_mass_vector = torch.randn(4)

# Case 3: inv_mass is a matrix (for matmul case)
momentum_3 = torch.randn(4)
inv_mass_matrix = torch.randn(4, 4)

# Use case 1 for the main ARGS
ARGS = {
    "momentum": momentum_1,
    "inv_mass": inv_mass_scalar
}
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 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
leapfrog Ran
ran; our contract draft was wrong, not the code
chrhenning/hypnettorch/hypnettorch/utils/hmc.py
code served (permissive licence) · get_code("797f157d213d455a")
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

torch.manual_seed(0)

# Define a simple potential energy function that is differentiable
def pot_energy_func(position):
    """Simple quadratic potential energy: U(q) = 0.5 * sum(q^2)"""
    return 0.5 * torch.sum(position ** 2)

# Create small tensors
position = torch.tensor([[1.0, 2.0, 3.0, 4.0], [0.5, 1.5, 2.5, 3.5]], requires_grad=False)
momentum = torch.tensor([[0.1, 0.2, 0.3, 0.4], [0.05, 0.15, 0.25, 0.35]], requires_grad=False)

# For the potential energy gradient computation, we need position to have requires_grad=True
position = torch.tensor([[1.0, 2.0, 3.0, 4.0], [0.5, 1.5, 2.5, 3.5]], requires_grad=True)

stepsize = 0.01
num_steps = 3

# Test with scalar inv_mass
inv_mass_scalar = 1.0

ARGS = {
    "position": position,
    "momentum": momentum,
    "stepsize": stepsize,
    "num_steps": num_steps,
    "inv_mass": inv_mass_scalar,
    "pot_energy": pot_energy_func,
}
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
HMC Not yet run
unverified (harvested, no recorded run)
chrhenning/hypnettorch/hypnettorch/utils/hmc.py
code served (permissive licence) · get_code("e9957ee092a605ed")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

Learning a sequence of tasks without access to i.i.d. observations is a widely studied form of continual learning (CL) that remains challenging. In principle, Bayesian learning directly applies to this setting, since recursive and one-off Bayesian updates yield the same result. In practice, however, recursive updating often leads to poor trade-off solutions across tasks because approximate inference is necessary for most models of interest. Here, we describe an alternative Bayesian approach where task-conditioned parameter distributions are continually inferred from data. We offer a practical deep learning implementation of our framework based on probabilistic task-conditioned hypernetworks, an approach we term posterior meta-replay. Experiments on standard benchmarks show that our probabilistic hypernetworks compress sequences of posterior parameter distributions with virtually no forgetting. We obtain considerable performance gains compared to existing Bayesian CL methods, and identify task inference as our major limiting factor. This limitation has several causes that are independent of the considered sequential setting, opening up new avenues for progress in CL.

For agents

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

get_harvested_code_for_paper("2103.01133")
get_code_for_paper("2103.01133")
have("2103.01133")

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

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

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

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

Connect an agent — have() is free.