SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.05895 · 2019

Learning to Forget for Meta-Learning

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 0 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/1906.05895.json · badge: /api/ran/1906.05895.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
baiksung/L2F canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
augment_image Ran
ran on a synthesized input
baiksung/L2F/data.py
code served (permissive licence) · get_code("1692a3e6d0e46fb5")
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 4, dtype family float, shape (2, 1, 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 numpy as np
import torch
from torchvision import transforms

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.image_channels = 1

# Create test images
# For augment_bool=True path with len(image.shape) > 3: need 4D array
image_4d = np.random.randint(0, 256, (2, 4, 3, 1), dtype=np.uint8)

# For augment_bool=False path with len(image.shape) <= 3: need 3D array
image_3d = np.random.randint(0, 256, (4, 3, 1), dtype=np.uint8)

ARGS = {
    "image": image_4d,
    "k": 1,
    "channels": 1,
    "augment_bool": True,
    "args": Args(),
    "dataset_name": "omniglot"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 1, 3, 4) — shape (2, 1, 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
extract_args_from_json Ran
ran on a synthesized input
baiksung/L2F/utils/parser_utils.py
code served (permissive licence) · get_code("632e39376f13aefe")
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 json
import tempfile
import os

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
json_file_path = os.path.join(temp_dir, "summary.json")

# Create a sample JSON file
summary_data = {
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 10,
    "model_name": "test_model",
    "continue_from": "checkpoint.pt",
    "gpu_to_use": 0,
    "other_param": "value"
}

with open(json_file_path, 'w') as f:
    json.dump(summary_data, f)

# Create the args_dict to be populated
args_dict = {
    "initial_key": "initial_value"
}

ARGS = {
    "json_file_path": json_file_path,
    "args_dict": args_dict
}
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 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
extract_top_level_dict Ran
ran; our contract draft was wrong, not the code
baiksung/L2F/meta_neural_network_architectures.py
pointer only (licence: MIT); the stored copy get_code serves, from pandeydeep9/units-ml-cvpr-22, is pointer only (licence: NONE) · get_code("94cd47c72a983ad8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from pandeydeep9/units-ml-cvpr-22, 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.

get_transforms_for_dataset Ran
ran on a synthesized input
baiksung/L2F/data.py
code served (permissive licence) · get_code("b861fb9443b8231f")
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 2, 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 numpy as np
from torchvision import transforms

class Args:
    def __init__(self):
        self.image_channels = 1

ARGS = {
    "dataset_name": "cifar10",
    "args": Args(),
    "k": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
load_from_json Ran
ran on a synthesized input
baiksung/L2F/utils/storage.py
code served (permissive licence) · get_code("1ffc7f12a771c7d6")
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 json
import tempfile
import os

# Create a temporary JSON file with valid content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "data"}
}

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

ARGS = {
    "filename": temp_file
}
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 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
load_statistics Ran
ran on a synthesized input
baiksung/L2F/utils/storage.py
code served (permissive licence) · get_code("b85351bca4ccbe20")
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 tempfile
import os

# Create a temporary directory and a CSV file for testing
temp_dir = tempfile.mkdtemp()
experiment_name = temp_dir

# Create a summary_statistics.csv file
csv_content = """epoch,loss,accuracy,val_loss
1,0.5,0.85,0.6
2,0.4,0.90,0.5
3,0.3,0.92,0.45
"""

csv_path = os.path.join(experiment_name, 'summary_statistics.csv')
with open(csv_path, 'w') as f:
    f.write(csv_content)

ARGS = {
    'experiment_name': experiment_name,
    'filename': 'summary_statistics.csv'
}
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 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
save_statistics Ran
ran on a synthesized input
baiksung/L2F/utils/storage.py
code served (permissive licence) · get_code("822e342d8175533c")
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 os
import tempfile
import shutil

# Create a temporary directory for the experiment
temp_dir = tempfile.mkdtemp()
experiment_name = temp_dir

# Create the experiment directory if it doesn't exist
os.makedirs(experiment_name, exist_ok=True)

# Define the line to add to the CSV
line_to_add = ['epoch', 'loss', 'accuracy']

# For the create parameter, we'll test with create=True first
create = True

ARGS = {
    'experiment_name': experiment_name,
    'line_to_add': line_to_add,
    'filename': 'summary_statistics.csv',
    'create': create
}
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
set_torch_seed Ran
ran; our contract draft was wrong, not the code
baiksung/L2F/few_shot_learning_system.py
code served (permissive licence) · get_code("5c44538154dad8a7")
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 RandomState. 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 torch

ARGS = {
    "seed": 42
}
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 RandomState — a RandomState output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RandomState 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

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 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 2 later) and 2 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
set_torch_seed 6 other papers
3 dated earlier, 3 later · 1 only as an assembly brick
1703.03400 (2017-03)
Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
1810.09502 (2018-10)
How to train your MAML
1905.10295 (2019-05)
Learning to learn via Self-Critique
and 3 more not named here
extract_top_level_dict 4 other papers
2 dated earlier, 2 later · 2 only as an assembly brick
1703.03400 (2017-03)
Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
1905.10295 (2019-05)
Learning to learn via Self-Critique
2007.13040 (2020-07)
Improving Generalization in Meta-learning via Task Augmentation
and 1 more not named here
extract_args_from_json 1 other paper
1 dated earlier
1905.10295 (2019-05)
Learning to learn via Self-Critique
load_from_json 1 other paper
1 dated earlier
1905.10295 (2019-05)
Learning to learn via Self-Critique
load_statistics 1 other paper
1 dated earlier
1905.10295 (2019-05)
Learning to learn via Self-Critique
save_statistics 1 other paper
1 dated earlier
1905.10295 (2019-05)
Learning to learn via Self-Critique

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

Few-shot learning is a challenging problem where the goal is to achieve generalization from only few examples. Model-agnostic meta-learning (MAML) tackles the problem by formulating prior knowledge as a common initialization across tasks, which is then used to quickly adapt to unseen tasks. However, forcibly sharing an initialization can lead to conflicts among tasks and the compromised (undesired by tasks) location on optimization landscape, thereby hindering the task adaptation. Further, we observe that the degree of conflict differs among not only tasks but also layers of a neural network. Thus, we propose task-and-layer-wise attenuation on the compromised initialization to reduce its influence. As the attenuation dynamically controls (or selectively forgets) the influence of prior knowledge for a given task and each layer, we name our method as L2F (Learn to Forget). The experimental results demonstrate that the proposed method provides faster adaptation and greatly improves the performance. Furthermore, L2F can be easily applied and improve other state-of-the-art MAML-based frameworks, illustrating its simplicity and generalizability.

For agents

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

get_harvested_code_for_paper("1906.05895")
get_code_for_paper("1906.05895")
have("1906.05895")

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

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

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

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

Connect an agent — have() is free.