SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.08561 · ICML · 2020

XtarNet: Learning to Extract Task-Adaptive Representation for Incremental Few-Shot Learning

Sung Yoon, Do-Yeon Kim, Jun Seo, Jaekyun Moon

arXiv · PDF · Open in the Atlas

Code that ran

1 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, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-21; 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/2003.08561.json · badge: /api/ran/2003.08561.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
EdwinKim3069/XtarNet canonical (classifier label)
classifier basis: census
1 ran · 4 no recorded run
FunctionStatusWhere it lives
calculate_episode_protos Ran
ran on a synthesized input
EdwinKim3069/XtarNet/run_proto_exp.py
code served (permissive licence) · get_code("9c0f25b4ea59ecb4")
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 ndarray, ndim 2, dtype family float, shape (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 six

# Create a mock TensorFlow session and model
class MockModel:
    def __init__(self):
        self.h_a = "h_a_tensor"
        self.inputs = "inputs_tensor"

class MockSession:
    def run(self, tensor_name, feed_dict=None):
        # Return mock embeddings: shape (6, 4) for 6 samples, 4-dim embeddings
        return np.random.randn(6, 4).astype(np.float32)

# Create mock episode with training data
class MockEpisode:
    def __init__(self):
        # x_train: 6 samples, 5 features
        self.x_train = np.random.randn(6, 5).astype(np.float32)
        # y_train: class labels for each sample
        # For nway=3, we have 3 classes (0, 1, 2 or 1, 2, 3 depending on old_and_new)
        self.y_train = np.array([0, 0, 1, 1, 2, 2])

ARGS = {
    "sess": MockSession(),
    "model": MockModel(),
    "num_classes_a": 2,
    "nway": 3,
    "episode": MockEpisode(),
    "old_and_new": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
calculate_protos Not yet run
unverified (harvested, no recorded run)
EdwinKim3069/XtarNet/run_proto_exp.py
code served (permissive licence) · get_code("03c9fac0501311a0")
How it ran

no invocation recorded.

cosine Not yet run
unverified (harvested, no recorded run)
EdwinKim3069/XtarNet/run_proto_exp.py
code served (permissive licence) · get_code("4dedc68d854ae87b")
How it ran

no invocation recorded.

get_exp_logger Not yet run
unverified (harvested, no recorded run)
EdwinKim3069/XtarNet/run_exp.py
code served (permissive licence) · get_code("cf5426582b207c79")
How it ran

no invocation recorded.

get_saver Not yet run
unverified (harvested, no recorded run)
EdwinKim3069/XtarNet/run_exp.py
code served (permissive licence) · get_code("d289bd846920809c")
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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 0 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_episode_protos 1 other paper
1 dated earlier
1810.07218 (2018-10)
Incremental Few-Shot Learning with Attention Attractor Networks
calculate_protos 1 other paper
1 dated earlier
1810.07218 (2018-10)
Incremental Few-Shot Learning with Attention Attractor Networks
cosine 1 other paper
1 dated earlier
1810.07218 (2018-10)
Incremental Few-Shot Learning with Attention Attractor Networks
get_exp_logger 1 other paper
1 dated earlier
1810.07218 (2018-10)
Incremental Few-Shot Learning with Attention Attractor Networks
get_saver 1 other paper
1 dated earlier
1810.07218 (2018-10)
Incremental Few-Shot Learning with Attention Attractor Networks

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-21.

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 novel concepts while preserving prior knowledge is a long-standing challenge in machine learning. The challenge gets greater when a novel task is given with only a few labeled examples, a problem known as incremental fewshot learning. We propose XtarNet, which learns to extract task-adaptive representation (TAR) for facilitating incremental few-shot learning. The method utilizes a backbone network pretrained on a set of base categories while also employing additional modules that are meta-trained across episodes. Given a new task, the novel feature extracted from the meta-trained modules is mixed with the base feature obtained from the pretrained model. The process of combining two different features provides TAR and is also controlled by meta-trained modules. The TAR contains effective information for classifying both novel and base categories. The base and novel classifiers quickly adapt to a given task by utilizing the TAR. Experiments on standard image datasets indicate that XtarNet achieves state-of-the-art incremental few-shot learning performance. The concept of TAR can also be used in conjunction with existing incremental few-shot learning methods; extensive simulation results in fact show that applying TAR enhances the known methods significantly.

For agents

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

get_harvested_code_for_paper("2003.08561")
get_code_for_paper("2003.08561")
have("2003.08561")

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

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

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

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

Connect an agent — have() is free.