SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.05390 · 2021

Optimizing Reusable Knowledge for Continual Learning via Metalearning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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, 2 violated it and 4 have no contract verdict; 1 failure of our instrument; 1 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/2106.05390.json · badge: /api/ran/2106.05390.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
JuliousHurtado/meta-training-setup canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_md5 Ran
ran; our contract draft was wrong, not the code
JuliousHurtado/meta-training-setup/dataloaders/utils.py
code served (permissive licence) · get_code("5c3574e986df9984")
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 str. 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 hashlib
import tempfile
import os

# Create a temporary file with some test content
with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.bin') as f:
    temp_file_path = f.name
    f.write(b'This is test content for MD5 calculation. ' * 100)

ARGS = {
    'fpath': temp_file_path,
    'chunk_size': 1024 * 1024,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
check_integrity Ran
ran, violated the contract we drafted
JuliousHurtado/meta-training-setup/dataloaders/utils.py
code served (permissive licence) · get_code("46b62ccc9e5b9878")
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 bool, 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 os
import tempfile

# Create a temporary file for testing
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    temp_file_path = f.name
    f.write("test content for md5 calculation")

# Calculate the MD5 hash of the test file
import hashlib

def calculate_md5(fpath, chunk_size=1024 * 1024):
    md5 = hashlib.md5()
    with open(fpath, 'rb') as f:
        for chunk in iter(lambda: f.read(chunk_size), b''):
            md5.update(chunk)
    return md5.hexdigest()

expected_md5 = calculate_md5(temp_file_path)

ARGS = {
    'fpath': temp_file_path,
    'md5': expected_md5
}
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 bool, 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
check_md5 Ran
ran, violated the contract we drafted
JuliousHurtado/meta-training-setup/dataloaders/utils.py
code served (permissive licence) · get_code("b3cb500b2f04323d")
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 bool, 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 tempfile
import os
import hashlib

# Create a temporary file with known content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_file.bin")

# Write some test data to the file
test_data = b"Hello, this is test content for MD5 calculation!"
with open(temp_file, 'wb') as f:
    f.write(test_data)

# Calculate the actual MD5 hash of the test file
md5_hash = hashlib.md5()
md5_hash.update(test_data)
correct_md5 = md5_hash.hexdigest()

# Define arguments for check_md5 function
ARGS = {
    'fpath': temp_file,
    'md5': correct_md5
}
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 bool, 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
compute_conv_output_size Ran
ran, honoured the contract we drafted
JuliousHurtado/meta-training-setup/models/conv.py
code served (permissive licence) · get_code("e71c2a2bc2fc8909")
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 int, ndim 0, dtype family int, 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 numpy as np

# This function computes the output size of a convolutional layer
# given input size and convolution parameters.
# All parameters are simple numeric values.

ARGS = {
    "Lin": 28,           # Input length (e.g., 28x28 image)
    "kernel_size": 3,    # Kernel/filter size
    "stride": 1,         # Stride of convolution
    "padding": 1,        # Padding added to input
    "dilation": 1        # Dilation factor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_diff_weights Ran
ran on a synthesized input
JuliousHurtado/meta-training-setup/utils.py
code served (permissive licence) · get_code("ed93b06c8ef9580a")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.shared = nn.Sequential(
            nn.Linear(4, 3),
            nn.ReLU(),
            nn.Linear(3, 2)
        )
    
    def forward(self, x):
        return self.shared(x)

old_net = SimpleNet()
new_net = SimpleNet()

# Modify new_net parameters so they differ from old_net
with torch.no_grad():
    for param in new_net.parameters():
        param.add_(torch.randn_like(param) * 0.1)

ARGS = {
    'old_net': old_net,
    'new_net': new_net,
    'device': 'cpu'
}
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 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
init_grads_out Ran
ran on a synthesized input
JuliousHurtado/meta-training-setup/utils.py
code served (permissive licence) · get_code("6c81a9cc9e6a6dd2")
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 torch.nn as nn

torch.manual_seed(0)

class SharedModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

class Net(nn.Module):
    def __init__(self):
        super().__init__()
        self.shared = SharedModule()
    
    def forward(self, x):
        return self.shared(x)

net = Net()

ARGS = {
    "net": net
}
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 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
test Ran
ran on a synthesized input
JuliousHurtado/meta-training-setup/approach.py
code served (permissive licence) · get_code("4e987939c21e03a4")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal net that matches the function's usage
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, inputs, task_id, inputs_feats, task_pri=None):
        # Function calls: net(inputs, task_id, inputs_feats, task_pri=task_pri)
        # Returns: outs, _
        batch_size = inputs.size(0)
        outs = self.linear(inputs)
        return outs, None

net = SimpleNet()

# Build dataloader as list of batches
# Each batch: (inputs, labels, inputs_feats)
batch_size = 2
num_batches = 2
dataloader = []
for _ in range(num_batches):
    inputs = torch.randn(batch_size, 4)
    labels = torch.randint(0, 3, (batch_size,))
    inputs_feats = torch.randn(batch_size, 4)
    dataloader.append((inputs, labels, inputs_feats))

task_id = 0
criterion = nn.CrossEntropyLoss()
device = 'cpu'
task_pri = None

ARGS = {
    'net': net,
    'task_id': task_id,
    'dataloader': dataloader,
    'criterion': criterion,
    'device': device,
    'task_pri': task_pri
}
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 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
train_meta_batch Ran
ran on a synthesized input
JuliousHurtado/meta-training-setup/approach.py
code served (permissive licence) · get_code("6beaaddedad65e73")
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 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
from torch import nn, optim

torch.manual_seed(0)

# Define a minimal neural network that satisfies the function's requirements
class MetaNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 3)
    
    def forward(self, inputs, task_id, inputs_feats, training, task_pri):
        # Function expects: outs, _ = net(inputs, task_id, inputs_feats, True, task_pri)
        # So it must return a tuple of (outputs, something)
        x = torch.relu(self.fc1(inputs))
        outs = self.fc2(x)
        return outs, None

# Create model instance
net = MetaNet()

# Create optimizer
opti = optim.SGD(net.parameters(), lr=0.01)

# Create loss criterion
criterion = nn.CrossEntropyLoss()

# Create a batch: (inputs, labels, inputs_feats)
# inputs: [batch_size=2, input_dim=4]
# labels: [batch_size=2] with class indices (0-2 for 3 classes)
# inputs_feats: [batch_size=2, feat_dim=5]
batch = (
    torch.randn(2, 4),           # inputs
    torch.tensor([0, 1]),         # labels
    torch.randn(2, 5)             # inputs_feats
)

# Other parameters
inner_loop = 2
task_id = 0
task_pri = 0.5
device = 'cpu'

ARGS = {
    'net': net,
    'opti': opti,
    'criterion': criterion,
    'batch': batch,
    'inner_loop': inner_loop,
    'task_id': task_id,
    'task_pri': task_pri,
    'device': device
}
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 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
print_log_acc_bwt Not yet run
unverified (harvested, no recorded run)
JuliousHurtado/meta-training-setup/utils.py
code served (permissive licence) · get_code("a6d95a8ba8160eee")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
calculate_md5 13 other papers
2 dated earlier, 1 the same month, 10 later
2001.00326 (2020-01)
NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search
2003.09553 (2020-03)
Adversarial Continual Learning
2106.06799 (2021-06)
Zero-Cost Operation Scoring in Differentiable Architecture Search
and 10 more not named here
check_md5 13 other papers
2 dated earlier, 1 the same month, 10 later
2001.00326 (2020-01)
NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search
2003.09553 (2020-03)
Adversarial Continual Learning
2106.06799 (2021-06)
Zero-Cost Operation Scoring in Differentiable Architecture Search
and 10 more not named here
compute_conv_output_size 7 other papers
4 dated earlier, 3 later
1905.11614 (2019-05)
Uncertainty-based Continual Learning with Adaptive Regularization
2003.09553 (2020-03)
Adversarial Continual Learning
2008.11364 (2020-08)
Improving Semi-supervised Federated Learning by Reducing the Gradient Diversity of Models
and 4 more not named here
check_integrity 5 other papers
1 dated earlier, 4 later
2003.09553 (2020-03)
Adversarial Continual Learning
2112.08654 (2021-12)
Learning to Prompt for Continual Learning
136640364 (2022 (year only))
Continual 3D Convolutional Neural Networks for Real-time Processing of Videos
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

When learning tasks over time, artificial neural networks suffer from a problem known as Catastrophic Forgetting (CF). This happens when the weights of a network are overwritten during the training of a new task causing forgetting of old information. To address this issue, we propose MetA Reusable Knowledge or MARK, a new method that fosters weight reusability instead of overwriting when learning a new task. Specifically, MARK keeps a set of shared weights among tasks. We envision these shared weights as a common Knowledge Base (KB) that is not only used to learn new tasks, but also enriched with new knowledge as the model learns new tasks. Key components behind MARK are two-fold. On the one hand, a metalearning approach provides the key mechanism to incrementally enrich the KB with new knowledge and to foster weight reusability among tasks. On the other hand, a set of trainable masks provides the key mechanism to selectively choose from the KB relevant weights to solve each task. By using MARK, we achieve state of the art results in several popular benchmarks, surpassing the best performing methods in terms of average accuracy by over 10% on the 20-Split-MiniImageNet dataset, while achieving almost zero forgetfulness using 55% of the number of parameters. Furthermore, an ablation study provides evidence that, indeed, MARK is learning reusable knowledge that is selectively used by each task.

For agents

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

get_harvested_code_for_paper("2106.05390")
get_code_for_paper("2106.05390")
have("2106.05390")

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

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

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

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

Connect an agent — have() is free.