SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.08402 · 2018

Adapted Deep Embeddings: A Synthesis of Methods for $k$-Shot Inductive Transfer Learning

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 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; 1 honoured the contract we drafted, 1 violated it and 10 have no contract verdict; 1 failure of our instrument; 2 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/1805.08402.json · badge: /api/ran/1805.08402.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
tylersco/adapted_deep_embeddings canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
garyCC227/thesis community (classifier label)
classifier basis: plan_row
6 ran · 0 no recorded run
FunctionStatusWhere it lives
assign_to_device Ran
ran on a synthesized input
tylersco/adapted_deep_embeddings/models/utils.py
code served (permissive licence) · get_code("3e5d37390941fbc2")
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 function. 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 tensorflow as tf

# Define ARGS with all required parameters for assign_to_device
device = "/job:worker/task:0/cpu:0"
ps_device = "/job:ps/task:0/cpu:0"

ARGS = {
    "device": device,
    "ps_device": ps_device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
create_data Ran
ran on a synthesized input
garyCC227/thesis/model_train.py
code served (permissive licence) · get_code("398f6908e33d3b75")
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 tempfile
import numpy as np
from PIL import Image

# Create temporary directory with mock images
temp_dir = tempfile.mkdtemp()

# Create small mock images for each label
def create_mock_image(path, size=(587, 587)):
    """Create a small RGB image and save it"""
    img_array = np.random.randint(0, 256, (size[0], size[1], 3), dtype=np.uint8)
    img = Image.fromarray(img_array, 'RGB')
    img.save(path)

# Create mock image files
images_dict = {}
for label in range(5):
    images_dict[label] = []
    for i in range(2):
        img_filename = os.path.join(temp_dir, f"label_{label}_img_{i}.jpg")
        create_mock_image(img_filename)
        images_dict[label].append(img_filename)

ARGS = {
    "images_dict": images_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, keras, 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
define_scope Ran
ran on a synthesized input
tylersco/adapted_deep_embeddings/models/utils.py
code served (permissive licence) · get_code("6c7c29b9b63f64b3")
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 function. 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 functools
import tensorflow as tf


def doublewrap(function):
    """
    A decorator around a decorator allowing use of the original decorator
    without parentheses if no arguments are provided. All arguments
    must be optional.
    """

    @functools.wraps(function)
    def decorator(*args, **kwargs):
        if len(args) == 1 and len(kwargs) == 0 and callable(args[0]):
            return function(args[0])
        else:
            return lambda wrapee: function(wrapee, *args, **kwargs)
    return decorator

@doublewrap
def define_scope(function, scope=None, *args, **kwargs):
    """
    A decorator for functions that define Tensorflow operations. The wrapped
    function will only be executed once. Subsequent calls to it will directly
    return the result, so that operations are only added to the graph once.
    """
    attribute = '_cache_' + function.__name__
    name = scope or function.__name__

    @property
    @functools.wraps(function)
    def decorator(self):
        if not hasattr(self, attribute):
            with tf.variable_scope(name, *args, **kwargs):
                setattr(self, attribute, function(self))
        return getattr(self, attribute)
    return decorator


# Create a simple test function to decorate
def simple_function(self):
    return tf.constant([1.0, 2.0, 3.0])


# Create a simple class that would use this decorator
class SimpleModel:
    pass


# Define arguments for the define_scope function
# The function signature is: define_scope(function, scope=None, *args, **kwargs)
ARGS = {
    'function': simple_function,
    'scope': 'test_scope',
    'args': (),
    'kwargs': {}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
doublewrap Ran
ran; our contract draft was wrong, not the code
tylersco/adapted_deep_embeddings/models/utils.py
code served (permissive licence) · get_code("4c45b3103c75e41a")
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 function. 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 functools
import torch

def doublewrap(function):
    """
    A decorator around a decorator allowing use of the original decorator
    without parentheses if no arguments are provided. All arguments
    must be optional.
    """

    @functools.wraps(function)
    def decorator(*args, **kwargs):
        if len(args) == 1 and len(kwargs) == 0 and callable(args[0]):
            return function(args[0])
        else:
            return lambda wrapee: function(wrapee, *args, **kwargs)
    return decorator


# Create a simple decorator function to test with doublewrap
def simple_decorator(func, multiplier=1):
    """A simple decorator that can be wrapped by doublewrap"""
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        result = func(*args, **kwargs)
        return result * multiplier
    return wrapper


# Test the doublewrap decorator
decorated_simple = doublewrap(simple_decorator)


# Create a simple function to be decorated
def add_one(x):
    return x + 1


ARGS = {
    "function": simple_decorator
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
find_cos_distances Ran
ran, violated the contract we drafted
garyCC227/thesis/models/recall_at_kappa.py
code served (permissive licence) · get_code("3b6c6798ddaded17")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (2, 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

np.random.seed(0)

# X and Y should be 2D numpy arrays where rows are samples and columns are features
# Using distinct dimensions: X has 2 samples with 4 features, Y has 3 samples with 4 features
X = np.random.randn(2, 4)
Y = np.random.randn(3, 4)

# Normalize them to make them unit vectors (typical for cosine distance)
X = X / np.linalg.norm(X, axis=1, keepdims=True)
Y = Y / np.linalg.norm(Y, axis=1, keepdims=True)

ARGS = {
    'X': X,
    'Y': Y
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — 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 (2, 3) — shape (2, 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
find_l2_distances Ran
ran, honoured the contract we drafted
garyCC227/thesis/models/recall_at_kappa.py
code served (permissive licence) · get_code("5ba5211d2daefbb6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (2, 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

np.random.seed(0)

X = np.random.randn(2, 4)
Y = np.random.randn(3, 4)

ARGS = {
    'X': X,
    'Y': Y
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — 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 (2, 3) — shape (2, 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
getDistributionDensity Ran
ran on a synthesized input
tylersco/adapted_deep_embeddings/losses/histogram_loss.py
code served (permissive licence) · get_code("dcfad983fc978ae3")
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 EagerTensor, ndim 1, dtype family float, shape (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 tensorflow as tf
import numpy as np

# Create small tensor inputs for the function
np.random.seed(0)

# x: values to be distributed across grid cells
x = tf.constant([0.15, 0.35, 0.55, 0.75], dtype=tf.float32)

# n: number of samples (scalar or int)
n = 4

# grid: boundaries for grid cells - must be monotonically increasing
grid = tf.constant([0.0, 0.25, 0.5, 0.75, 1.0], dtype=tf.float32)

# grid_delta: spacing between grid points
grid_delta = 0.25

ARGS = {
    "x": x,
    "n": n,
    "grid": grid,
    "grid_delta": grid_delta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (5,) — shape (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
get_preds Ran
ran on a synthesized input
garyCC227/thesis/dense.py
code served (permissive licence) · get_code("feb366896425e713")
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 1, dtype family int, shape (2,) 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

# Construct a valid numpy array for get_preds
# The function expects arr to be a 2D numpy array
# It checks for zeros, finds their positions, and returns clipped indices

# Create a small 2x4 array with some zeros and some non-zero values
arr = np.array([
    [1, 0, 2, 3],
    [0, 1, 2, 0]
], dtype=int)

ARGS = {
    "arr": arr
}
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 ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) 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
hist_loss Ran
ran on a synthesized input
tylersco/adapted_deep_embeddings/losses/histogram_loss.py
code served (permissive licence) · get_code("76bdb14f43eeef26")
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 EagerTensor, ndim 2, dtype family float, shape (1, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)

# Create small tensors for testing
# z: embedding vectors for nodes
z = tf.constant(np.random.randn(6, 4).astype(np.float32))

# pos_comps: positive component pairs (indices into z)
pos_comps = tf.constant(np.array([[0, 1], [2, 3]], dtype=np.int32))
n_pos_comps = 2

# neg_comps: negative component pairs (indices into z)
neg_comps = tf.constant(np.array([[0, 2], [1, 3], [4, 5]], dtype=np.int32))
n_neg_comps = 3

ARGS = {
    'z': z,
    'pos_comps': pos_comps,
    'n_pos_comps': n_pos_comps,
    'neg_comps': neg_comps,
    'n_neg_comps': n_neg_comps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (1, 1) — shape (1, 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
max_distances Ran
ran on a synthesized input
tylersco/adapted_deep_embeddings/models/recall_at_kappa.py
code served (permissive licence) · get_code("312ded6bde8c5d74")
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 (2, 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 cdist

# Create small numpy arrays for X and Y
X = np.random.randn(2, 4).astype(np.float32)
Y = np.random.randn(3, 4).astype(np.float32)

# dist_fun is a string parameter
dist_fun = 'max_l1'

ARGS = {
    'X': X,
    'Y': Y,
    'dist_fun': dist_fun
}
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 (2, 3) — shape (2, 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
preprocess_image Ran
ran on a synthesized input
garyCC227/thesis/dense.py
code served (permissive licence) · get_code("78d8c17e12da6e5d")
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 Image. 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
from PIL import Image

# Create a temporary test image
temp_dir = tempfile.mkdtemp()
image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple test image
test_image = Image.new('RGB', (100, 100), color='red')
test_image.save(image_path)

ARGS = {
    "image_path": image_path,
    "desired_size": 224
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
prototypical_networks_loss Ran
ran on a synthesized input
tylersco/adapted_deep_embeddings/losses/proto_loss.py
code served (permissive licence) · get_code("ffbbae661197f477")
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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small tensors for prototypical networks loss
# prototypes: [num_classes, feature_dim]
# query: [num_query_samples, feature_dim]
# num_query_per_class: scalar int
# target_indices: [num_query_samples // num_query_per_class, num_query_per_class]

num_classes = 3
feature_dim = 4
num_query_per_class = 2
num_query_samples = num_classes * num_query_per_class

# Create prototypes: shape [num_classes, feature_dim]
prototypes = tf.constant(
    np.random.randn(num_classes, feature_dim).astype(np.float32)
)

# Create query samples: shape [num_query_samples, feature_dim]
query = tf.constant(
    np.random.randn(num_query_samples, feature_dim).astype(np.float32)
)

# target_indices: ground truth class indices for each query sample
# Shape should be [num_query_samples // num_query_per_class, num_query_per_class]
# or can be reshaped to match the indexing logic in the function
target_indices = tf.constant(
    np.tile(np.arange(num_classes), num_query_per_class).astype(np.int32)
)
target_indices = tf.reshape(target_indices, [num_classes, num_query_per_class])

ARGS = {
    "prototypes": prototypes,
    "query": query,
    "num_query_per_class": num_query_per_class,
    "target_indices": target_indices,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
split_data Ran
ran on a synthesized input
garyCC227/thesis/model_train.py
code served (permissive licence) · get_code("3592b07c9571b601")
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. 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 random
from sklearn.model_selection import train_test_split

# Construct test data for split_data function
# The function expects a dict where keys are labels and values are lists of images

data_dict = {
    'cat': ['cat_img_1', 'cat_img_2', 'cat_img_3', 'cat_img_4', 'cat_img_5'],
    'dog': ['dog_img_1', 'dog_img_2', 'dog_img_3', 'dog_img_4', 'dog_img_5'],
    'bird': ['bird_img_1', 'bird_img_2', 'bird_img_3']
}

ARGS = {
    'data_dict': data_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
classification_batch_evaluation Not yet run
unverified (harvested, no recorded run)
tylersco/adapted_deep_embeddings/utils.py
code served (permissive licence) · get_code("17ae2e7840a02242")
How it ran

no invocation recorded.

hist_loss_batch_eval Not yet run
unverified (harvested, no recorded run)
tylersco/adapted_deep_embeddings/utils.py
code served (permissive licence) · get_code("0047b13081c4581e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 12 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
doublewrap 2 other papers
2 later
2203.05406 (2022-03)
Disentangled Multimodal Representation Learning for Recommendation
2205.09626 (2022-05)
BARS: Towards Open Benchmarking for Recommender Systems
find_cos_distances 1 other paper
1 dated earlier
1802.05312 (2018-02)
Learning Deep Disentangled Embeddings with the F-Statistic Loss
find_l2_distances 1 other paper
1 dated earlier
1802.05312 (2018-02)
Learning Deep Disentangled Embeddings with the F-Statistic Loss

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

The focus in machine learning has branched beyond training classifiers on a single task to investigating how previously acquired knowledge in a source domain can be leveraged to facilitate learning in a related target domain, known as inductive transfer learning. Three active lines of research have independently explored transfer learning using neural networks. In weight transfer, a model trained on the source domain is used as an initialization point for a network to be trained on the target domain. In deep metric learning, the source domain is used to construct an embedding that captures class structure in both the source and target domains. In few-shot learning, the focus is on generalizing well in the target domain based on a limited number of labeled examples. We compare state-of-the-art methods from these three paradigms and also explore hybrid adapted-embedding methods that use limited target-domain data to fine tune embeddings constructed from source-domain data. We conduct a systematic comparison of methods in a variety of domains, varying the number of labeled instances available in the target domain ($k$), as well as the number of target-domain classes. We reach three principal conclusions: (1) Deep embeddings are far superior, compared to weight transfer, as a starting point for inter-domain transfer or model re-use (2) Our hybrid methods robustly outperform every few-shot learning and every deep metric learning method previously proposed, with a mean error reduction of 34% over state-of-the-art. (3) Among loss functions for discovering embeddings, the histogram loss (Ustinova & Lempitsky, 2016) is most robust. We hope our results will motivate a unification of research in weight transfer, deep metric learning, and few-shot learning.

For agents

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

get_harvested_code_for_paper("1805.08402")
get_code_for_paper("1805.08402")
have("1805.08402")

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

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

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

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

Connect an agent — have() is free.