SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1902.03545 · 2019

Task2Vec: Task Embedding for Meta-Learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 16 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 10 have no contract verdict; 0 failures of our instrument; 6 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/1902.03545.json · badge: /api/ran/1902.03545.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
awslabs/aws-cv-task2vec community (classifier label)
classifier basis not recorded on the link
10 ran · 6 no recorded run
FunctionStatusWhere it lives
average_top_k_tax_distance Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/plot_distance_cub_inat.py
code served (permissive licence) · get_code("9306127e388d80b3")
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 float64, ndim 0, 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

class MockEmbedding:
    def __init__(self, meta):
        self.meta = meta

# Create mock embeddings with taxonomy metadata
from_embeddings = [
    MockEmbedding({
        'order': 'primates',
        'class': 'mammalia',
        'phylum': 'chordata',
        'kingdom': 'animalia'
    }),
    MockEmbedding({
        'order': 'primates',
        'class': 'mammalia',
        'phylum': 'chordata',
        'kingdom': 'animalia'
    })
]

to_embeddings = [
    MockEmbedding({
        'order': 'primates',
        'class': 'mammalia',
        'phylum': 'chordata',
        'kingdom': 'animalia'
    }),
    MockEmbedding({
        'order': 'carnivora',
        'class': 'mammalia',
        'phylum': 'chordata',
        'kingdom': 'animalia'
    }),
    MockEmbedding({
        'order': 'lepidoptera',
        'class': 'insecta',
        'phylum': 'arthropoda',
        'kingdom': 'animalia'
    })
]

# Create distance matrix: 2 from_embeddings x 3 to_embeddings
distance_matrix = np.array([
    [0.1, 0.5, 0.9],
    [0.2, 0.6, 0.8]
], dtype=np.float32)

ARGS = {
    'distance_matrix': distance_matrix,
    'from_embeddings': from_embeddings,
    'to_embeddings': to_embeddings,
    'k': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_compression_loss Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/variational.py
code served (permissive licence) · get_code("944bd91f1edbc80d")
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 1, dtype family float, shape (1,) 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)

class CompressibleModule(nn.Module):
    """A module with weight, logvar0, logvar, and loglambda2 attributes."""
    def __init__(self, weight_shape):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(weight_shape))
        self.logvar0 = nn.Parameter(torch.randn(1))  # marker attribute
        self.logvar = nn.Parameter(torch.randn(weight_shape))
        self.loglambda2 = nn.Parameter(torch.randn(1))

class SimpleModel(nn.Module):
    """A model containing compressible modules."""
    def __init__(self):
        super().__init__()
        self.layer1 = CompressibleModule((4, 3))
        self.layer2 = CompressibleModule((5, 2))
        self.normal_layer = nn.Linear(2, 2)  # This won't have logvar0, so it's skipped

model = SimpleModel()

ARGS = {
    'model': model
}
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 Tensor, ndim 1, dtype family float, shape (1,) — shape (1,) 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_device Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/utils.py
code served (permissive licence) · get_code("0c35c102a078d24d")
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 device. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-26T21:52:49Z. 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)

# Build a small model with parameters
model = nn.Linear(4, 3)

# The function calls next(model.parameters()).device
# So we just need a model with at least one parameter
# nn.Linear has weight and bias parameters by default

ARGS = {
    "model": model
}
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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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_trivial_embedding_from Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/task_similarity.py
code served (permissive licence) · get_code("92003a5021d20c3d")
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 numpy as np
import copy

# Construct a minimal embedding dict that matches the function's usage
embedding = {
    'layers': [
        {
            'filter_logvar': [1.0, 2.0, 3.0],
            'filter_lambda2': 0.5
        },
        {
            'filter_logvar': [4.0, 5.0],
            'filter_lambda2': 0.1
        }
    ]
}

ARGS = {
    'e': embedding
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
get_variational_vars Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/variational.py
code served (permissive licence) · get_code("dbe657c4babc8ae6")
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 list. 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 SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.logvar0 = nn.Parameter(torch.randn(4))
        self.loglambda2 = nn.Parameter(torch.randn(3))

class NestedModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.simple1 = SimpleModule()
        self.simple2 = SimpleModule()

class ModelWithVariationalVars(nn.Module):
    def __init__(self):
        super().__init__()
        self.logvar0 = nn.Parameter(torch.randn(5))
        self.loglambda2 = nn.Parameter(torch.randn(2))
        self.nested = NestedModule()
        self.linear = nn.Linear(4, 3)

model = ModelWithVariationalVars()

ARGS = {
    'model': model
}
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 list — a list 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
invert_icon Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/plot_distance_cub_inat.py
code served (permissive licence) · get_code("ebe075162f279d94")
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, 3, 4, 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)

# Create a small image tensor
# img is expected to be a tensor with values in [0, 1] range
# Using shape (2, 3, 4, 4) for a batch of 2 images, 3 channels, 4x4 spatial dims
img = torch.rand(2, 3, 4, 4)

ARGS = {
    "img": img
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
is_excluded Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/task_similarity.py
code served (permissive licence) · get_code("c2823ae7a8245c3c")
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 torch

torch.manual_seed(0)

# The function is_excluded takes a parameter k (a string key)
# and checks if any of the excluded keywords are in it
# It returns a boolean

ARGS = {
    'k': 'fc_layer'
}
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 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
is_multi_label Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/dataset/dataset.py
code served (permissive licence) · get_code("dd3befed50865cc3")
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 torch

torch.manual_seed(0)

# Test case 1: single-label dataset (all integers)
labels_list_single = [0, 1, 0, 2, 1]

# Test case 2: multi-label dataset (lists of integers)
labels_list_multi = [[0, 1], [1, 2], [0, 2, 3]]

# Test case 3: mixed dataset (some integers, some lists)
labels_list_mixed = [0, [1, 2], 1, [0, 3]]

ARGS = {
    "labels_list": labels_list_multi
}
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 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
load_tasks_map Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/datasets.py
code served (permissive licence) · get_code("97198064440d5f0f")
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 os
import json
import tempfile

# Create a temporary directory and file for the tasks_map
temp_dir = tempfile.mkdtemp()
tasks_map_file = os.path.join(temp_dir, "tasks_map.json")

# Create a valid tasks_map JSON file
tasks_map_data = {
    "0": "1",
    "1": "2",
    "2": "3",
    "10": "20"
}

with open(tasks_map_file, 'w') as f:
    json.dump(tasks_map_data, f)

ARGS = {
    "tasks_map_file": tasks_map_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
set_metadata Ran
ran on a synthesized input
awslabs/aws-cv-task2vec/datasets.py
code served (permissive licence) · get_code("ca9c797073c0672e")
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)

class SimpleDataset:
    def __init__(self, task_name):
        self.task_name = task_name
        self.metadata = None

class SimpleConfig:
    def __init__(self):
        self.task_id = 1

trainset = SimpleDataset(task_name="train_task")
testset = SimpleDataset(task_name="test_task")
config = SimpleConfig()
dataset_name = "example_dataset"

ARGS = {
    "trainset": trainset,
    "testset": testset,
    "config": config,
    "dataset_name": dataset_name
}
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
get_error Not yet run
unverified (harvested, no recorded run)
awslabs/aws-cv-task2vec/utils.py
code served (permissive licence) · get_code("525c6605bb5ab89a")
How it ran

no invocation recorded.

get_image Not yet run
unverified (harvested, no recorded run)
awslabs/aws-cv-task2vec/plot_distance_cub_inat.py
code served (permissive licence) · get_code("052a7c3d285c564d")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
awslabs/aws-cv-task2vec/models.py
code served (permissive licence) · get_code("8846b271d3785538")
How it ran

no invocation recorded.

inat2018 Not yet run
unverified (harvested, no recorded run)
awslabs/aws-cv-task2vec/datasets.py
code served (permissive licence) · get_code("7cc3548449813ac3")
How it ran

no invocation recorded.

load_embedding Not yet run
unverified (harvested, no recorded run)
awslabs/aws-cv-task2vec/task_similarity.py
code served (permissive licence) · get_code("7a95ae77a9468ef9")
How it ran

no invocation recorded.

variational_forward Not yet run
unverified (harvested, no recorded run)
awslabs/aws-cv-task2vec/variational.py
code served (permissive licence) · get_code("783f27dc9447605e")
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, 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 16 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

We introduce a method to provide vectorial representations of visual classification tasks which can be used to reason about the nature of those tasks and their relations. Given a dataset with ground-truth labels and a loss function defined over those labels, we process images through a "probe network" and compute an embedding based on estimates of the Fisher information matrix associated with the probe network parameters. This provides a fixed-dimensional embedding of the task that is independent of details such as the number of classes and does not require any understanding of the class label semantics. We demonstrate that this embedding is capable of predicting task similarities that match our intuition about semantic and taxonomic relations between different visual tasks (e.g., tasks based on classifying different types of plants are similar) We also demonstrate the practical value of this framework for the meta-task of selecting a pre-trained feature extractor for a new task. We present a simple meta-learning framework for learning a metric on embeddings that is capable of predicting which feature extractors will perform well. Selecting a feature extractor with task embedding obtains a performance close to the best available feature extractor, while costing substantially less than exhaustively training and evaluating on all available feature extractors.

For agents

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

get_harvested_code_for_paper("1902.03545")
get_code_for_paper("1902.03545")
have("1902.03545")

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

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

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

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

Connect an agent — have() is free.