SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.14582 · 2023

Identification of Negative Transfers in Multitask Learning Using Surrogate Models

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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, 0 violated it and 3 have no contract verdict; 5 failures of our instrument; 0 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/2303.14582.json · badge: /api/ran/2303.14582.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
neu-statsml-research/task-modeling canonical (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
virtuosoresearch/task-modeling canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
add_trainer_arguments Ran
ran; our contract draft was wrong, not the code
virtuosoresearch/task-modeling/train_multitask.py
code served (permissive licence) · get_code("4c533c884362c414")
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) and returned ArgumentParser. 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 argparse

torch.manual_seed(0)

# The function add_trainer_arguments takes a parser object and adds arguments to it
# It doesn't actually use the arguments in any complex way - it just defines them
# So we need to provide an ArgumentParser instance

parser = argparse.ArgumentParser(description='Trainer arguments')

ARGS = {
    'parser': parser
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
booleans_processing Ran
ran on a synthesized input
neu-statsml-research/task-modeling/transformers/modeling_tf_utils.py
code served (permissive licence) · get_code("a37e8f716afbe0c3")
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 tensorflow as tf

class MockConfig:
    """Stand-in for PretrainedConfig"""
    def __init__(self):
        self.output_attentions = False
        self.output_hidden_states = False
        self.return_dict = True
        self.use_cache = True

config = MockConfig()

kwargs = {
    'output_attentions': None,
    'output_hidden_states': None,
    'return_dict': None,
    'use_cache': None,
}

ARGS = {
    'config': config,
}
ARGS.update(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 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
convert_pytorch_state_dict_to_flax Ran
ran; our contract draft was wrong, not the code
neu-statsml-research/task-modeling/transformers/modeling_flax_pytorch_utils.py
code served (permissive licence) · get_code("f37141ae02c0de99")
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 numpy as np
import jax.numpy as jnp
from flax.traverse_util import flatten_dict, unflatten_dict

torch.manual_seed(0)

class MockFlaxModel:
    """Mock Flax model with the minimal interface needed by convert_pytorch_state_dict_to_flax"""
    def __init__(self):
        self.base_model_prefix = "base_model"
        # Create a simple nested params structure
        self.params = {
            "base_model": {
                "layer1": {
                    "kernel": jnp.ones((4, 3)),
                    "bias": jnp.ones((3,)),
                },
                "layer2": {
                    "scale": jnp.ones((5,)),
                }
            },
            "head": {
                "dense": {
                    "kernel": jnp.ones((3, 2)),
                    "bias": jnp.ones((2,)),
                }
            }
        }

# Create a mock PyTorch state dict with torch tensors
pt_state_dict = {
    "base_model.layer1.weight": torch.randn(3, 4),
    "base_model.layer1.bias": torch.randn(3),
    "base_model.layer2.gamma": torch.randn(5),
    "head.dense.weight": torch.randn(2, 3),
    "head.dense.bias": torch.randn(2),
}

# Create mock Flax model
flax_model = MockFlaxModel()

ARGS = {
    "pt_state_dict": pt_state_dict,
    "flax_model": flax_model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax, numpy, 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
convert_tf_weight_name_to_pt_weight_name Ran
ran on a synthesized input
neu-statsml-research/task-modeling/transformers/modeling_tf_pytorch_utils.py
code served (permissive licence) · get_code("5f5d99a0dee8c2b1")
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 re

def convert_tf_weight_name_to_pt_weight_name(tf_name, start_prefix_to_remove=''):
    """
    Convert a TF 2.0 model variable name in a pytorch model weight name.

    Conventions for TF2.0 scopes -> PyTorch attribute names conversions:

        - '$1___$2' is replaced by $2 (can be used to duplicate or remove layers in TF2.0 vs PyTorch)
        - '_._' is replaced by a new level separation (can be used to convert TF2.0 lists in PyTorch nn.ModulesList)

    return tuple with:

        - pytorch model weight name
        - transpose: boolean indicating whether TF2.0 and PyTorch weights matrices are transposed with regards to each
          other
    """
    tf_name = tf_name.replace(':0', '')
    tf_name = re.sub('/[^/]*___([^/]*)/', '/\\1/', tf_name)
    tf_name = tf_name.replace('_._', '/')
    tf_name = re.sub('//+', '/', tf_name)
    tf_name = tf_name.split('/')
    if len(tf_name) > 1:
        tf_name = tf_name[1:]
    transpose = bool(tf_name[-1] in ['kernel', 'pointwise_kernel', 'depthwise_kernel'] or 'emb_projs' in tf_name or 'out_projs' in tf_name)
    if tf_name[-1] == 'kernel' or tf_name[-1] == 'embeddings' or tf_name[-1] == 'gamma':
        tf_name[-1] = 'weight'
    if tf_name[-1] == 'beta':
        tf_name[-1] = 'bias'
    if tf_name[-1] == 'pointwise_kernel' or tf_name[-1] == 'depthwise_kernel':
        tf_name[-1] = tf_name[-1].replace('_kernel', '.weight')
    tf_name = '.'.join(tf_name)
    if start_prefix_to_remove:
        tf_name = tf_name.replace(start_prefix_to_remove, '', 1)
    return (tf_name, transpose)


ARGS = {
    'tf_name': 'layer/dense/kernel:0',
    'start_prefix_to_remove': ''
}
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 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
dummy_loss Ran
ran on a synthesized input
neu-statsml-research/task-modeling/transformers/modeling_tf_utils.py
code served (permissive licence) · get_code("55a65bc77a8a31d3")
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 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 tensorflow as tf
import numpy as np

def dummy_loss(y_true, y_pred):
    return tf.reduce_mean(y_pred)

# Create small TensorFlow tensors
y_true = tf.constant(np.random.randn(2, 4).astype(np.float32))
y_pred = tf.constant(np.random.randn(2, 4).astype(np.float32))

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
}
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 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
find_pruneable_heads_and_indices Ran
ran; our contract draft was wrong, not the code
neu-statsml-research/task-modeling/transformers/modeling_utils.py
code served (permissive licence) · get_code("6d254a1b39c650ff")
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 torch

torch.manual_seed(0)

# Small example values for the function parameters
heads_to_prune = [1, 3]  # List of head indices to prune
n_heads = 8  # Total number of heads in the model
head_size = 4  # Size of each head
already_pruned = {0, 2}  # Set of heads already pruned

ARGS = {
    "heads": heads_to_prune,
    "n_heads": n_heads,
    "head_size": head_size,
    "already_pruned_heads": already_pruned,
}
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 — 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
keras_serializable Ran
ran; our contract draft was wrong, not the code
neu-statsml-research/task-modeling/transformers/modeling_tf_utils.py
code served (permissive licence) · get_code("756e9ec5f7912d3e")
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 type. 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
import functools

class PretrainedConfig:
    """Stand-in for PretrainedConfig"""
    def __init__(self, **kwargs):
        self.params = kwargs
    
    def to_dict(self):
        return self.params.copy()
    
    @classmethod
    def from_dict(cls, config_dict):
        return cls(**config_dict)

class TestKerasLayer(tf.keras.layers.Layer):
    """Minimal Keras Layer subclass for testing"""
    config_class = PretrainedConfig
    
    def __init__(self, config=None, **kwargs):
        super().__init__(**kwargs)
        self._config = config
        self._kwargs = kwargs
    
    def get_config(self):
        return super().get_config()
    
    def call(self, inputs):
        return inputs

# Mark get_config as default so the decorator will override it
TestKerasLayer.get_config._is_default = True

ARGS = {
    'cls': TestKerasLayer
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
quick_gelu Ran
ran, honoured the contract we drafted
neu-statsml-research/task-modeling/transformers/modeling_flax_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from shen8424/CORE, is pointer only (licence: NONE) · get_code("a66d2b78670c85e1")
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 shen8424/CORE, 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.

rename_key_and_reshape_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
neu-statsml-research/task-modeling/transformers/modeling_flax_pytorch_utils.py
code served (permissive licence) · get_code("5c0eb4c5f8c5c1de")
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 numpy as np
import jax.numpy as jnp
from typing import Dict, Tuple

# Create a small random_flax_state_dict with some known keys
random_flax_state_dict = {
    ('layer', 'scale'): jnp.array([1.0, 2.0, 3.0, 4.0]),
    ('layer', 'embedding'): jnp.array([[1.0, 2.0], [3.0, 4.0]]),
    ('conv', 'kernel'): jnp.array(np.random.randn(3, 4, 5, 6)),
    ('dense', 'kernel'): jnp.array(np.random.randn(8, 9)),
    ('norm', 'bias'): jnp.array([0.1, 0.2, 0.3, 0.4]),
}

# Create a pt_tuple_key that will trigger one of the rename operations
pt_tuple_key = ('layer', 'gamma')

# Create a pt_tensor as numpy array (small, distinct dimensions)
pt_tensor = np.random.randn(4, 5)

# model_prefix for potential key lookup
model_prefix = 'model'

ARGS = {
    'pt_tuple_key': pt_tuple_key,
    'pt_tensor': pt_tensor,
    'random_flax_state_dict': random_flax_state_dict,
    'model_prefix': model_prefix,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 5 later) and 3 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
quick_gelu 17 other papers
1 dated earlier, 16 later
2022.findings-emnlp.427 (2022 (year only))
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
and 14 more not named here
find_pruneable_heads_and_indices 11 other papers
7 dated earlier, 3 later, 1 same year, order not determinable
2004.10964 (2020-04)
Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
2021.emnlp-main.154 (2021 (year only))
Reconstruction Attack on Instance Encoding for Language Understanding
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
and 8 more not named here
keras_serializable 8 other papers
1 dated earlier, 7 later
2109.03808 (2021-09)
Smelting Gold and Silver for Improved Multilingual AMR-to-Text Generation
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
2310.09832 (2023-10)
Merging Experts into One: Improving Computational Efficiency of Mixture of Experts
and 5 more not named here
convert_tf_weight_name_to_pt_weight_name 3 other papers
3 dated earlier
2109.03808 (2021-09)
Smelting Gold and Silver for Improved Multilingual AMR-to-Text Generation
2203.10652 (2022-03)
Continual Sequence Generation with Adaptive Compositional Modules
convert_pytorch_state_dict_to_flax 2 other papers
2 later
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
2310.18738 (2023-10)
TLM: Token-Level Masking for Transformers
rename_key_and_reshape_tensor 2 other papers
2 later
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
2310.18738 (2023-10)
TLM: Token-Level Masking for Transformers

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

Multitask learning is widely used in practice to train a low-resource target task by augmenting it with multiple related source tasks. Yet, naively combining all the source tasks with a target task does not always improve the prediction performance for the target task due to negative transfers. Thus, a critical problem in multitask learning is identifying subsets of source tasks that would benefit the target task. This problem is computationally challenging since the number of subsets grows exponentially with the number of source tasks; efficient heuristics for subset selection do not always capture the relationship between task subsets and multitask learning performances. In this paper, we introduce an efficient procedure to address this problem via surrogate modeling. In surrogate modeling, we sample (random) subsets of source tasks and precompute their multitask learning performances. Then, we approximate the precomputed performances with a linear regression model that can also predict the multitask performance of unseen task subsets. We show theoretically and empirically that fitting this model only requires sampling linearly many subsets in the number of source tasks. The fitted model provides a relevance score between each source and target task. We use the relevance scores to perform subset selection for multitask learning by thresholding. Through extensive experiments, we show that our approach predicts negative transfers from multiple source tasks to target tasks much more accurately than existing task affinity measures. Additionally, we demonstrate that for several weak supervision datasets, our approach consistently improves upon existing optimization methods for multitask learning.

For agents

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

get_harvested_code_for_paper("2303.14582")
get_code_for_paper("2303.14582")
have("2303.14582")

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

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

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

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

Connect an agent — have() is free.