SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.05757 · ICLR · 2021

Exploring the Similarity of Representations in Model-Agnostic Meta-Learning

Thomas Goerttler, Klaus Obermayer

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures 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/2105.05757.json · badge: /api/ran/2105.05757.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
ThomasGoerttler/similarity-analysis-of-maml canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_RDM Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ThomasGoerttler/similarity-analysis-of-maml/rsa.py
code served (permissive licence) · get_code("2bdaad0e5c106937")
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 (5, 5) 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
from scipy.spatial.distance import pdist, squareform
from scipy.stats import spearmanr

# Create small test data: 5 samples, 4 features each
np.random.seed(0)
test_data = np.random.randn(5, 4)

ARGS = {
    'data': test_data,
    'method': 'correlation'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (5, 5) — shape (5, 5) 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
centering Ran
ran, honoured the contract we drafted
ThomasGoerttler/similarity-analysis-of-maml/cka.py
pointer only (licence: MIT); the stored copy get_code serves, from aakashrkaku/intermdiate_layer_matter_ssl, is pointer only (licence: NONE) · get_code("5c273c526536356d")
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 aakashrkaku/intermdiate_layer_matter_ssl, 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_images Ran
ran; our contract draft was wrong, not the code
ThomasGoerttler/similarity-analysis-of-maml/utils.py
code served (permissive licence) · get_code("980919fe451414a1")
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, 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 os
import random
import tempfile
import shutil

# Create temporary directories with dummy image files
temp_dir = tempfile.mkdtemp()

# Create subdirectories to simulate image paths
path1 = os.path.join(temp_dir, "class_1")
path2 = os.path.join(temp_dir, "class_2")
os.makedirs(path1, exist_ok=True)
os.makedirs(path2, exist_ok=True)

# Create dummy image files
for i in range(3):
    open(os.path.join(path1, f"image_{i}.jpg"), 'w').close()
    open(os.path.join(path2, f"image_{i}.jpg"), 'w').close()

# Set up arguments for get_images function
ARGS = {
    'paths': [path1, path2],
    'labels': [0, 1],
    'nb_samples': 2,
    'shuffle': True
}
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 list, ndim 2, dtype family float — a list 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
kernel_HSIC Ran
ran, honoured the contract we drafted
ThomasGoerttler/similarity-analysis-of-maml/cka.py
pointer only (licence: MIT); the stored copy get_code serves, from aakashrkaku/intermdiate_layer_matter_ssl, is pointer only (licence: NONE) · get_code("c633017bfba675e4")
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 aakashrkaku/intermdiate_layer_matter_ssl, 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.

rbf Ran
ran, honoured the contract we drafted
ThomasGoerttler/similarity-analysis-of-maml/cka.py
pointer only (licence: MIT); the stored copy get_code serves, from aakashrkaku/intermdiate_layer_matter_ssl, is pointer only (licence: NONE) · get_code("0f137cab706f1953")
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 aakashrkaku/intermdiate_layer_matter_ssl, 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.

rdm_of_rdms Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ThomasGoerttler/similarity-analysis-of-maml/rsa.py
code served (permissive licence) · get_code("c50c4337791765c9")
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, 3) 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
from scipy.spatial.distance import pdist, squareform
from scipy.stats import spearmanr

def calculate_RDM(data, method='correlation'):
    """ Return Specified distance matrices (1 = Pearson correlation,
    2 = Euclidian distance, 3 = Absolute activation difference)  """
    data = np.array(data)
    if method == 'correlation':
        rdm = 1 - np.corrcoef(data)
    elif method == 'euclidean':
        rdm = pdist(data, 'euclidean')
        rdm = squareform(rdm)
    elif method == 'cosine':
        rdm = pdist(data, 'cosine')
        rdm = squareform(rdm)
    elif method == 'spearman':
        rdm = 1 - spearmanr(data.transpose())[0]
    return rdm

def rdm_of_rdms(rdms):
    rdms = [rdm[np.triu_indices(len(rdm), 1)] for rdm in rdms]
    rdm = calculate_RDM(rdms, 'spearman')
    return rdm

# Create small representational dissimilarity matrices (RDMs)
# Each RDM is a square symmetric matrix comparing activations
rdm1 = np.array([
    [0.0, 0.2, 0.5, 0.3],
    [0.2, 0.0, 0.4, 0.1],
    [0.5, 0.4, 0.0, 0.6],
    [0.3, 0.1, 0.6, 0.0]
])

rdm2 = np.array([
    [0.0, 0.3, 0.4, 0.2],
    [0.3, 0.0, 0.5, 0.2],
    [0.4, 0.5, 0.0, 0.7],
    [0.2, 0.2, 0.7, 0.0]
])

rdm3 = np.array([
    [0.0, 0.1, 0.6, 0.4],
    [0.1, 0.0, 0.3, 0.2],
    [0.6, 0.3, 0.0, 0.5],
    [0.4, 0.2, 0.5, 0.0]
])

ARGS = {
    'rdms': [rdm1, rdm2, rdm3]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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, 3) — shape (3, 3) 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
rsa Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ThomasGoerttler/similarity-analysis-of-maml/rsa.py
code served (permissive licence) · get_code("abbeec32c09f04da")
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, 3) 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

# Generate small sample activation data per model
# Each model has activations for N stimuli (e.g., 5 stimuli) with M features (e.g., 4 features)
np.random.seed(0)

model1_activations = np.random.randn(5, 4)
model2_activations = np.random.randn(5, 4)
model3_activations = np.random.randn(5, 4)

activations_per_model = [model1_activations, model2_activations, model3_activations]

ARGS = {
    'activations_per_model': activations_per_model,
    'method': 'correlation'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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, 3) — shape (3, 3) 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
reshape_elems_of_list Not yet run
unverified (harvested, no recorded run)
ThomasGoerttler/similarity-analysis-of-maml/mnist.py
code served (permissive licence) · get_code("d22eb538fd47123f")
How it ran

no invocation recorded.

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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
centering 4 other papers
1 dated earlier, 3 later
1905.00414 (2019-05)
Similarity of Neural Network Representations Revisited
2110.14805 (2021-10)
Intermediate Layers Matter in Momentum Contrastive Self Supervised Learning
2404.07448 (2024-04)
Transferable and Principled Efficiency for Open-Vocabulary Segmentation
and 1 more not named here
rbf 4 other papers
1 dated earlier, 3 later
1905.00414 (2019-05)
Similarity of Neural Network Representations Revisited
2110.14805 (2021-10)
Intermediate Layers Matter in Momentum Contrastive Self Supervised Learning
2404.07448 (2024-04)
Transferable and Principled Efficiency for Open-Vocabulary Segmentation
and 1 more not named here
get_images 3 other papers
3 dated earlier
1703.03400 (2017-03)
Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
1806.03836 (2018-06)
Bayesian Model-Agnostic Meta-Learning
1807.08912 (2018-07)
Meta-Learning Priors for Efficient Online Bayesian Regression
kernel_HSIC 3 other papers
1 dated earlier, 2 later
1905.00414 (2019-05)
Similarity of Neural Network Representations Revisited
2110.14805 (2021-10)
Intermediate Layers Matter in Momentum Contrastive Self Supervised Learning
2404.07448 (2024-04)
Transferable and Principled Efficiency for Open-Vocabulary Segmentation

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

In past years model-agnostic meta-learning (MAML) has been one of the most promising approaches in meta-learning. It can be applied to different kinds of problems, e.g., reinforcement learning, but also shows good results on few-shot learning tasks. Besides their tremendous success in these tasks, it has still not been fully revealed yet, why it works so well. Recent work proposes that MAML rather reuses features than rapidly learns. In this paper, we want to inspire a deeper understanding of this question by analyzing MAML's representation. We apply representation similarity analysis (RSA), a well-established method in neuroscience, to the few-shot learning instantiation of MAML. Although some part of our analysis supports their general results that feature reuse is predominant, we also reveal arguments against their conclusion. The similarity-increase of layers closer to the input layers arises from the learning task itself and not from the model. In addition, the representations after inner gradient steps make a broader change to the representation than the changes during meta-training.

For agents

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

get_harvested_code_for_paper("2105.05757")
get_code_for_paper("2105.05757")
have("2105.05757")

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

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

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

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

Connect an agent — have() is free.