SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.00770 · EMNLP · 2020

Exploring and Predicting Transferability across NLP Tasks

Adam Trischler, Alessandro Sordoni, Mohit Iyyer, Tong Wang, Subhransu Maji, Tu Vu, Tsendsuren Munkhdalai, Andrew Mattarella-Micke

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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, 0 violated it and 2 have no contract verdict; 2 failures of our instrument; 4 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2005.00770.json · badge: /api/ran/2005.00770.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
tuvuumass/task-transferability canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
to_list Ran
ran; our contract draft was wrong, not the code
tuvuumass/task-transferability/run_finetuning_QA.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AI-secure/InfoBERT, is pointer only (licence: NONE) · get_code("9df40357afea56cc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AI-secure/InfoBERT, 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.

compute_Fisher Ran
ran on a synthesized input
tuvuumass/task-transferability/run_taskemb_CR.py
code served (permissive licence) · get_code("b428dd4da9ed4aab")
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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockConfig:
    def __init__(self):
        self.num_hidden_layers = 2
        self.hidden_size = 4

class MockBertLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.dense = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.dense(x)

class MockBertEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer = nn.ModuleList([MockBertLayer() for _ in range(2)])
    
    def forward(self, x):
        return x

class MockBert(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = MockConfig()
        self.encoder = MockBertEncoder()
        self.embeddings = nn.Embedding(100, 4)
        self.pool = nn.Linear(4, 4)
        
        self._model_outputs_cache = {}
    
    def _get_model_outputs(self, key):
        if key == 'multihead_output':
            return [torch.randn(2, 3, 4, requires_grad=True) for _ in range(self.config.num_hidden_layers)]
        elif key == 'layer_output':
            return [torch.randn(2, 3, 4, requires_grad=True) for _ in range(self.config.num_hidden_layers)]
        elif key == 'cls_output':
            return torch.randn(2, 4, requires_grad=True)
        return None
    
    def forward(self, input_ids):
        x = self.embeddings(input_ids)
        x = self.encoder(x)
        return x

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.bert = MockBert()
        self.classifier = nn.Linear(4, 2)
    
    def forward(self, input_ids):
        x = self.bert(input_ids)
        x = self.classifier(x[:, 0, :])
        return x

class MockArgs:
    def __init__(self):
        self.feature_type = 'grads'
        self.pow = 2
        self.model_type = 'classifier'

model = MockModel()
args = MockArgs()

input_mask = torch.ones(2, 3, dtype=torch.long)
total_tokens = 6

for name, param in model.named_parameters():
    param.grad = torch.randn_like(param) * 0.01

ARGS = {
    'args': args,
    'model': model,
    'input_mask': input_mask,
    'total_tokens': total_tokens
}
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 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
compute_Fisher_no_labels Ran
ran on a synthesized input
tuvuumass/task-transferability/run_taskemb_CR.py
code served (permissive licence) · get_code("c94deca631245c15")
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 torch
import torch.nn as nn
from transformers import BertConfig

torch.manual_seed(0)

# Build a minimal BERT-like model that satisfies the function's usage
class MinimalBertLayer(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.dense = nn.Linear(hidden_size, hidden_size)
    
    def forward(self, x):
        return self.dense(x)

class MinimalBert(nn.Module):
    def __init__(self, hidden_size=4, num_hidden_layers=2):
        super().__init__()
        self.config = BertConfig(
            hidden_size=hidden_size,
            num_hidden_layers=num_hidden_layers,
            num_attention_heads=2,
            intermediate_size=8,
        )
        self.encoder = nn.ModuleDict({
            'layer': nn.ModuleList([MinimalBertLayer(hidden_size) for _ in range(num_hidden_layers)])
        })
        self.embeddings = nn.Linear(hidden_size, hidden_size)
        self._model_outputs_cache = {}
    
    def _get_model_outputs(self, key=None):
        if key == 'multihead_output':
            return [torch.randn(2, 3, 4, requires_grad=True) for _ in range(self.config.num_hidden_layers)]
        elif key == 'layer_output':
            return [torch.randn(2, 3, 4, requires_grad=True) for _ in range(self.config.num_hidden_layers)]
        elif key == 'cls_output':
            return torch.randn(2, 4, requires_grad=True)
        return None
    
    def forward(self, input_ids, attention_mask=None):
        x = self.embeddings(input_ids.float())
        return x

class MinimalModel(nn.Module):
    def __init__(self, hidden_size=4, num_hidden_layers=2, num_labels=2):
        super().__init__()
        self.bert = MinimalBert(hidden_size=hidden_size, num_hidden_layers=num_hidden_layers)
        self.classifier = nn.Linear(hidden_size, num_labels)
    
    def forward(self, input_ids, attention_mask=None):
        bert_output = self.bert(input_ids, attention_mask)
        logits = self.classifier(bert_output[:, 0, :])
        return logits

class Args:
    def __init__(self):
        self.feature_type = 'grads'
        self.pow = 2
        self.model_type = 'bert'
        self.num_labels = 2
        self.num_softmax_classifiers = 1
        self.FIM_scale = 1.0
        self.num_trials_for_FIM = 3
        self.finetune_classifier = False

# Construct all arguments
model = MinimalModel(hidden_size=4, num_hidden_layers=2, num_labels=2)
args = Args()

# Create input_mask: shape (batch_size=2, seq_length=3)
input_mask = torch.ones(2, 3, dtype=torch.long)

# Create logits: shape (batch_size=2, num_labels=2) for multiclass case
logits = torch.randn(2, 2, requires_grad=True)

# Enable gradient computation
for param in model.parameters():
    param.requires_grad = True

ARGS = {
    'args': args,
    'model': model,
    'input_mask': input_mask,
    'logits': logits
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
gelu Ran
ran, honoured the contract we drafted
tuvuumass/task-transferability/transformers/modeling_task_embeddings.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lonePatient/BERT-SDA, is pointer only (licence: NONE) · get_code("211753ba29188d4e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lonePatient/BERT-SDA, 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.

gelu_new Ran
ran, honoured the contract we drafted
tuvuumass/task-transferability/transformers/modeling_task_embeddings.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lonePatient/BERT-SDA, is pointer only (licence: NONE) · get_code("77601724cad03f95")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lonePatient/BERT-SDA, 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.

load_tf_weights_in_bert Ran
ran; our contract draft was wrong, not the code
tuvuumass/task-transferability/transformers/modeling_task_embeddings.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from tanmay1618/text_to_sql_bert, is pointer only (licence: NONE) · get_code("0c145728a35789fa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from tanmay1618/text_to_sql_bert, 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.

compute_Fisher_no_labels Not yet run
unverified (harvested, no recorded run)
tuvuumass/task-transferability/run_taskemb_QA.py
code served (permissive licence) · get_code("a8809687a128b395")
How it ran

no invocation recorded.

compute_Fisher_with_labels Not yet run
unverified (harvested, no recorded run)
tuvuumass/task-transferability/run_taskemb_CR.py
code served (permissive licence) · get_code("010348971baa2ed7")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
tuvuumass/task-transferability/run_finetuning_CR.py
code served (permissive licence) · get_code("e638def88775edeb")
How it ran

no invocation recorded.

load_and_cache_examples Not yet run
unverified (harvested, no recorded run)
tuvuumass/task-transferability/run_finetuning_CR.py
code served (permissive licence) · get_code("5671be9e6de071d7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 3 the same month, 4 later) and 6 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
gelu 198 other papers
47 dated earlier, 5 the same month, 144 later, 2 same year, order not determinable · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
to_list 41 other papers
5 dated earlier, 2 the same month, 34 later
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1910.06188 (2019-10)
Q8BERT: Quantized 8Bit BERT
1911.02984 (2019-11)
The TechQA Dataset
and 38 more not named here
gelu_new 23 other papers
5 dated earlier, 1 the same month, 17 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
1911.03631 (2019-11)
Hierarchical Graph Network for Multi-hop Question Answering
and 20 more not named here
load_tf_weights_in_bert 19 other papers
7 dated earlier, 12 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1902.01069 (2019-02)
A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
and 16 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recent advances in NLP demonstrate the effectiveness of training large-scale language models and transferring them to downstream tasks. Can fine-tuning these models on tasks other than language modeling further improve performance? In this paper, we conduct an extensive study of the transferability between 33 NLP tasks across three broad classes of problems (text classification, question answering, and sequence labeling). Our results show that transfer learning is more beneficial than previously thought, especially when target task data is scarce, and can improve performance even with low-data source tasks that differ substantially from the target task (e.g., part-ofspeech tagging transfers well to the DROP QA dataset). We also develop task embeddings that can be used to predict the most transferable source tasks for a given target task, and we validate their effectiveness in experiments controlled for source and target data size. Overall, our experiments reveal that factors such as data size, task and domain similarity, and task complexity all play a role in determining transferability.

For agents

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

get_harvested_code_for_paper("2005.00770")
get_code_for_paper("2005.00770")
have("2005.00770")

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

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

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

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

Connect an agent — have() is free.