SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.10971 · ICLR · 2024

Context-Aware Meta-Learning

Jure Leskovec, Christopher Ré, Sebastian Thrun, Christopher Fifty, Ehsan Amid, Dennis Duan, Ronald Junkins

arXiv · PDF · Open in the Atlas

Code that ran

5 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 11 no recorded run), measured 2026-11-22; 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/2310.10971.json · badge: /api/ran/2310.10971.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
cfifty/CAML marked official in Papers with Code
Papers with Code archive
5 ran · 11 no recorded run
FunctionStatusWhere it lives
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("cd267ef17647aeed")
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 an instance of its own class, Encoder: the run constructed the object and did not call it, so no result was computed. 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 = {
    "num_layers": 2,
    "num_heads": 2,
    "hidden_dim": 4,
    "mlp_dim": 8,
    "dropout": 0.1,
    "attention_dropout": 0.1,
    "norm_layer": partial(nn.LayerNorm, eps=1e-06),
    "set_transformer": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Encoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Encoder 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
EncoderBlock Ran
ran on a synthesized input · constructed an object; no result was computed
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("8535c1852720eb4f")
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 an instance of its own class, EncoderBlock: the run constructed the object and did not call it, so no result was computed. 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
from torchvision.models.vision_transformer import MLPBlock

torch.manual_seed(0)

ARGS = {
    "num_heads": 2,
    "hidden_dim": 4,
    "mlp_dim": 8,
    "dropout": 0.1,
    "attention_dropout": 0.1,
    "norm_layer": partial(nn.LayerNorm, eps=1e-06),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EncoderBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EncoderBlock 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
SetEncoderBlock Ran
ran on a synthesized input · constructed an object; no result was computed
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("b84a0725c820a2b0")
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 an instance of its own class, SetEncoderBlock: the run constructed the object and did not call it, so no result was computed. 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
from torchvision.models.vision_transformer import MLPBlock

torch.manual_seed(0)

# Parameters for SetEncoderBlock
num_heads = 2
hidden_dim = 4
mlp_dim = 8
dropout = 0.1
attention_dropout = 0.1
norm_layer = partial(nn.LayerNorm, eps=1e-06)

ARGS = {
    "num_heads": num_heads,
    "hidden_dim": hidden_dim,
    "mlp_dim": mlp_dim,
    "dropout": dropout,
    "attention_dropout": attention_dropout,
    "norm_layer": norm_layer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SetEncoderBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SetEncoderBlock 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
TransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("eb55a438e50a2e46")
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 an instance of its own class, TransformerEncoder: the run constructed the object and did not call it, so no result was computed. 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 = {
    "image_dim": 4,
    "num_classes": 5,
    "num_layers": 2,
    "num_heads": 2,
    "hidden_dim": 8,
    "mlp_dim": 16,
    "device": torch.device("cpu"),
    "dropout": 0.1,
    "attention_dropout": 0.1,
    "norm_layer": partial(nn.LayerNorm, eps=1e-06),
    "label_elmes": True,
    "GPICL": False,
    "set_transformer": False,
}
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 TransformerEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerEncoder 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_elmes Ran
ran, honoured the contract we drafted
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("830737289ffd5884")
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 (3, 4) as a later run recorded it. 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, 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - p: used as first dimension in np.random.random(size=(p, C)), so an int
# - C: used in multiple places (tensor operations), so an int
# - cuda: used as device argument in .to(cuda), so a torch.device

p = 4
C = 3
cuda = torch.device('cpu')

ARGS = {
    'p': p,
    'C': C,
    'cuda': cuda
}
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 Tensor, ndim 2, dtype family float, shape (3, 4) — shape (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
CAML Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("e7e8fd6df86f5ec3")
How it ran

no invocation recorded.

base_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("1a58cef63acb709c")
How it ran

no invocation recorded.

convnext_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("3a60030568395b7b")
How it ran

no invocation recorded.

get_encoder Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("e4950f6c71b41722")
How it ran

no invocation recorded.

huge_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("dae200e21d75ed1c")
How it ran

no invocation recorded.

laion_2b Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("b62532f1578c6349")
How it ran

no invocation recorded.

large_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("4adc2669a82da781")
How it ran

no invocation recorded.

resnet34 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("82a2c08a2ff36ab1")
How it ran

no invocation recorded.

short_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("709e0900c6c9f092")
How it ran

no invocation recorded.

small_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("acb6adf58d32e776")
How it ran

no invocation recorded.

tiny_32 Not yet run
unverified (harvested, no recorded run)
cfifty/CAML/src/models/CAML.py
code served (permissive licence) · get_code("23be00ca58b700f4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 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 15 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
EncoderBlock
brick of this paper's assembly: helper
1 other paper
1 later
2503.17716 (2025-03)
EMPLACE: Self-Supervised Urban Scene Change Detection

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

Large Language Models like ChatGPT demonstrate a remarkable capacity to learn new concepts during inference without any fine-tuning. However, visual models trained to detect new objects during inference have been unable to replicate this ability, and instead either perform poorly or require meta-training and/or finetuning on similar objects. In this work, we propose a meta-learning algorithm that emulates Large Language Models by learning new visual concepts during inference without fine-tuning. Our approach leverages a frozen pre-trained feature extractor, and analogous to in-context learning, recasts visual meta-learning as sequence modeling over datapoints with known labels and a test datapoint with an unknown label. On 8 out of 11 few-shot image classification benchmarks, our approach-without meta-training or fine-tuning-exceeds or matches the state-ofthe-art algorithm, P>M>F, which is meta-trained on these benchmarks. Our code is available at https://github.com/cfifty/CAML. Meta-learning refers to a capacity to learn new concepts from a small number of demonstrations (Lake et al., 2015). In a decade of remarkable advances to machine intelligence, it remains an area where human performance continues to surpass that of machines (Brown et al., 2020). To match human capabilities, and towards developing machines that can learn and think like humans, we must develop machine intelligence capable of learning novel concepts from only a few examples (Lake et al., 2017). Many applications of deep learning apply a learning algorithm to a large set of training data; however, learning from a very small number of training examples poses a challenge (Lake et al., 2017;Garnelo et al., 2018). This challenge led to two predominant evaluation settings: in-domain and cross-domain. The in-domain setting evaluates a meta-learner's ability to quickly adapt to new tasks after training on similar tasks within a specific domain. Models designed for this setting are often extremely fast but exhibit poor generalization to tasks outside the target domain (Chen et al., 2019). Meanwhile, the cross-domain setting evaluates a meta-learner's ability to adapt to tasks in previously unseen domains. Methods designed for this setting are highly adaptable but slow during inference as they require fine-tuning on the support set (Guo et al., 2020;Oh et al., 2022;Hu et al., 2022). Critically, meta-learners in both settings differ from a human's capacity to quickly generalize to new tasks. The problem of simultaneously fast and general meta-learning has recently been addressed in Natural Language by Large Language Models (LLMs). LLMs like ChatGPT can quickly generalize to new tasks through an ability termed in-context learning (Brown et al., 2020). However, it remains an open problem in Computer Vision. Even the best visual meta-learning algorithms cannot be deployed to a ChatGPT-like system because such systems require models that can (1) generalize to a broad set of tasks unknown at training time and (2) do so in real-time, without the time allowance for finetuning the model. LLMs have shown a remarkable ability to do both; however, current visual meta-learners may only satisfy one requirement or the other (Hu et al., 2022). To measure progress towards this goal of fast and general visual meta-learners, we develop an evaluation paradigm that we call universal meta-learning. Universal meta-learning measures a model's capacity to quickly learn new image classes. It evaluates models across a diverse set of meta-learning benchmarks spanning many different image classification tasks without meta-training on any of the benchmarks' training sets or fine-tuning on the support set during inference. We focus on

For agents

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

get_harvested_code_for_paper("2310.10971")
get_code_for_paper("2310.10971")
have("2310.10971")

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

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

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

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

Connect an agent — have() is free.