SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.08355 · ICLR · 2025

Metalic: Meta-Learning In-Context with Protein Language Models

Thomas Barrett, Oliver Bent, Jacob Beck, Shikha Surana, Paul Duckworth, Manus Mcauliffe, Juan Jose, Garau Luis

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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; 2 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 6 failures of our instrument; 1 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/2410.08355.json · badge: /api/ran/2410.08355.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
instadeepai/metalic canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
full_ranking_bce Ran
ran; our contract draft was wrong, not the code
instadeepai/metalic/meta/models/losses.py
code served (permissive licence) · get_code("74701b1a5017757a")
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 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)

# Create small tensors for batch processing
batch_size = 2

# preds: Tensor of shape (b,) - predictions for each item
preds = torch.randn(batch_size)

# targets: Tensor of shape (b,) - target values for ranking
targets = torch.randn(batch_size)

ARGS = {
    "preds": preds,
    "targets": targets,
}
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 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
get_device Ran
ran; our contract draft was wrong, not the code
instadeepai/metalic/meta/utils.py
code served (permissive licence) · get_code("99474d787c5c14b3")
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. 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 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 get_device takes two optional parameters:
# - gpu_index: Optional[int] - index of GPU to use
# - force_cpu: bool - whether to force CPU usage

# Since we're in a CPU-only environment, we should test both code paths
# We'll create args that exercise the function logic

ARGS = {
    "gpu_index": None,
    "force_cpu": True,
}
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 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
label_smoothed_ranking_loss Ran
ran; our contract draft was wrong, not the code
instadeepai/metalic/meta/models/losses.py
code served (permissive licence) · get_code("cf6b0616253db16d")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Define a simple ranking loss function that takes preds and targets
def simple_ranking_loss(preds: torch.Tensor, targets: torch.Tensor) -> torch.Tensor:
    """Simple ranking loss for testing purposes."""
    # Calculate a basic ranking loss (e.g., margin ranking loss style)
    loss = torch.nn.functional.relu(1.0 - targets * preds)
    return loss.mean()

# Create small tensors for testing
# batch_size=2, prediction_dim=4
preds = torch.randn(2, 4)
targets = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "ranking_loss": simple_ranking_loss,
    "preds": preds,
    "targets": targets,
    "label_smoothing": 0.1
}
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 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_json Ran
ran; our contract draft was wrong, not the code
instadeepai/metalic/meta/io.py
code served (permissive licence) · get_code("800fbd05b709b1ff")
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 json
import tempfile
import os

# Create a temporary JSON file with some test data
temp_dir = tempfile.mkdtemp()
test_json_path = os.path.join(temp_dir, "test.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "object"}
}

with open(test_json_path, 'w') as f:
    json.dump(test_data, f)

ARGS = {
    "jsonfile": test_json_path
}
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
load_yaml Ran
ran; our contract draft was wrong, not the code
instadeepai/metalic/meta/io.py
code served (permissive licence) · get_code("c0273d113af483cb")
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 tempfile
import os
import yaml

# Create a temporary YAML file with some test content
temp_dir = tempfile.mkdtemp()
yaml_file_path = os.path.join(temp_dir, "test.yaml")

# Write a simple YAML structure to the temp file
test_yaml_content = {
    "model": "test_model",
    "parameters": {
        "learning_rate": 0.001,
        "batch_size": 32
    },
    "layers": [1, 2, 3]
}

with open(yaml_file_path, 'w') as f:
    yaml.dump(test_yaml_content, f)

ARGS = {
    "yaml_file": yaml_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
mse Ran
ran, violated the contract we drafted
instadeepai/metalic/meta/tasks/metrics.py
code served (permissive licence) · get_code("d884cc8e472e6f1e")
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 float, shape (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

# Create small numpy arrays with distinct shapes
predictions = np.array([[1.0, 2.0, 3.0, 4.0],
                        [5.0, 6.0, 7.0, 8.0]])

targets = np.array([[1.1, 2.1, 3.1, 4.1],
                    [5.1, 6.1, 7.1, 8.1]])

ARGS = {
    "predictions": predictions,
    "targets": targets
}
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 float, shape (4,) — shape (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
norm_mse Ran
ran, honoured the contract we drafted
instadeepai/metalic/meta/tasks/metrics.py
code served (permissive licence) · get_code("61a7414ab0dba873")
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 float, shape (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

# Create small numpy arrays with matching shapes for predictions and targets
# Using distinct batch size (2) and feature dimension (4) for clarity
batch_size = 2
feature_dim = 4

predictions = np.random.randn(batch_size, feature_dim)
targets = np.random.randn(batch_size, feature_dim)

ARGS = {
    "predictions": predictions,
    "targets": targets,
}
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 float, shape (4,) — shape (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
read_fasta Ran
ran on a synthesized input
instadeepai/metalic/meta/utils.py
code served (permissive licence) · get_code("35455700ee312018")
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 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 tempfile
import os

# Create a temporary FASTA file
fasta_content = """>seq1
ACGTACGTACGT
ACGTACGT
>seq2
ATCGATCG-ATCG
atcg.atcg
>seq3
GGCCTTAA
"""

# Write to a temporary file
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.fasta') as f:
    f.write(fasta_content)
    temp_filepath = f.name

try:
    ARGS = {
        'filepath': temp_filepath,
        'encoding': None,
        'keep_insertions': True,
        'keep_gaps': True,
        'to_upper': False,
    }
finally:
    # Clean up after defining ARGS
    pass
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 tuple, ndim 2, 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
read_msa Ran
ran; our contract draft was wrong, not the code
instadeepai/metalic/meta/utils.py
code served (permissive licence) · get_code("361f81985b5d1c16")
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 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 tempfile
import os

# Create a temporary FASTA file for testing
temp_dir = tempfile.mkdtemp()
fasta_file = os.path.join(temp_dir, "test.fasta")

# Write a sample FASTA file
with open(fasta_file, 'w') as f:
    f.write(">sequence1\n")
    f.write("ACGTACGT\n")
    f.write(">sequence2\n")
    f.write("TGCATGCA\n")

# Define arguments for read_msa
ARGS = {
    "msa_file": fasta_file,
    "msa_format": "a3m"
}
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 tuple, ndim 2, 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
standard_mse Ran
ran, honoured the contract we drafted
instadeepai/metalic/meta/tasks/metrics.py
code served (permissive licence) · get_code("105f87deadc73752")
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 float, shape (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

# Create small numpy arrays with distinct shapes
# Batch size: 2, feature dimension: 4
np.random.seed(0)

predictions = np.random.randn(2, 4).astype(np.float32)
targets = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "predictions": predictions,
    "targets": targets,
}
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 float, shape (4,) — shape (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
mse Not yet run
unverified (harvested, no recorded run)
instadeepai/metalic/meta/models/losses.py
code served (permissive licence) · get_code("d1dcb1c8bd375716")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 11 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

Predicting the biophysical and functional properties of proteins is essential for in silico protein design. Machine learning has emerged as a promising technique for such prediction tasks. However, the relative scarcity of in vitro annotations means that these models often have little, or no, specific data on the desired fitness prediction task. As a result of limited data, protein language models (PLMs) are typically trained on general protein sequence modeling tasks, and then fine-tuned, or applied zero-shot, to protein fitness prediction. When no task data is available, the models make strong assumptions about the correlation between the protein sequence likelihood and fitness scores. In contrast, we propose meta-learning over a distribution of standard fitness prediction tasks, and demonstrate positive transfer to unseen fitness prediction tasks. Our method, called Metalic (Meta-Learning In-Context), uses in-context learning and fine-tuning, when data is available, to adapt to new tasks. Crucially, fine-tuning enables considerable generalization, even though it is not accounted for during meta-training. Our fine-tuned models achieve strong results with 18 times fewer parameters than state-of-the-art models. Moreover, our method sets a new state-of-the-art in low-data settings on Pro-teinGym, an established fitness-prediction benchmark. Due to data scarcity, we believe meta-learning will play a pivotal role in advancing protein engineering.

For agents

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

get_harvested_code_for_paper("2410.08355")
get_code_for_paper("2410.08355")
have("2410.08355")

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

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

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

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

Connect an agent — have() is free.