SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.07285 · 2023

TransCoder: Towards Unified Transferable Code Representation Learning Inspired by Human Skills

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 5 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/2306.07285.json · badge: /api/ran/2306.07285.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
qiushisun/transcoder canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
FunctionStatusWhere it lives
evaluate_cls Ran
ran on a synthesized input
qiushisun/transcoder/learner.py
code served (permissive licence) · get_code("61be214eec2c0bb2")
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
import numpy as np
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, inputs, *args):
        if len(args) == 2:  # POJ task
            p_inputs, n_inputs, label = args
            logit = self.linear(inputs)
        else:  # non-POJ task
            label = args[0]
            logit = self.linear(inputs)
        
        loss = nn.CrossEntropyLoss()(logit, label.long())
        return loss, logit

class SimpleDataset(Dataset):
    def __init__(self, num_samples=4, task='defect'):
        self.num_samples = num_samples
        self.task = task
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        if self.task == 'POJ':
            inputs = torch.randn(4)
            p_inputs = torch.randn(4)
            n_inputs = torch.randn(4)
            label = torch.tensor([0, 1][idx % 2])
            return inputs, p_inputs, n_inputs, label
        else:
            inputs = torch.randn(4)
            label = torch.tensor([0, 1][idx % 2])
            return inputs, label

class SimpleExample:
    def __init__(self, idx, url1=None, url2=None):
        self.idx = idx
        self.url1 = url1 or f"url1_{idx}"
        self.url2 = url2 or f"url2_{idx}"

class Args:
    def __init__(self, task='defect', sub_task='default', model_name='default'):
        self.dev_batch_size = 2
        self.device = 'cpu'
        self.task = task
        self.sub_task = sub_task
        self.model_name = model_name
        self.output_dir = '/tmp'

eval_dataset = SimpleDataset(num_samples=4, task='defect')
eval_examples = [SimpleExample(idx=i) for i in range(4)]
model = SimpleModel()

args_defect = Args(task='defect', sub_task='default', model_name='default')

ARGS = {
    'args': args_defect,
    'model': model,
    'eval_examples': eval_examples,
    'eval_data': eval_dataset,
    'write_to_pred': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, tqdm — 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
get_model_size Ran
ran; our contract draft was wrong, not the code
qiushisun/transcoder/models_2.py
code served (permissive licence) · get_code("8cfe38019e9d6a49")
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 str. 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
import numpy as np

torch.manual_seed(0)

# Create a minimal model with some trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_model_size Ran
ran on a synthesized input
qiushisun/transcoder/models.py
code served (permissive licence) · get_code("a719263e88013c50")
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 str. 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
import numpy as np

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_sample_size Ran
ran on a synthesized input
qiushisun/transcoder/learner.py
code served (permissive licence) · get_code("3824baa1aca5bb25")
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 int, ndim 0, dtype family int, 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

class Args:
    def __init__(self, task, sub_task):
        self.task = task
        self.sub_task = sub_task

ARGS = {
    'args': Args(task='summarize', sub_task='python'),
    'type': 'train'
}
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 int, ndim 0, dtype family int, 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
shift_tokens_right Ran
ran on a synthesized input
qiushisun/transcoder/models_list/PLBartForConditionalGeneration_Prefix.py
code served (permissive licence) · get_code("417e73bc0c3843bb")
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 2, dtype family int, shape (2, 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 torch

torch.manual_seed(0)

# Construct valid arguments for shift_tokens_right
input_ids = torch.tensor([
    [101, 2054, 2003, 102, 0],
    [101, 1045, 2572, 102, 0]
], dtype=torch.long)

pad_token_id = 0

ARGS = {
    "input_ids": input_ids,
    "pad_token_id": pad_token_id
}
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 2, dtype family int, shape (2, 5) — shape (2, 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
add_args Not yet run
unverified (harvested, no recorded run)
qiushisun/transcoder/configs.py
code served (permissive licence) · get_code("b853ebf5b01e9047")
How it ran

no invocation recorded.

add_args Not yet run
unverified (harvested, no recorded run)
qiushisun/transcoder/configs_fewshot.py
code served (permissive licence) · get_code("d313ee74f207a251")
How it ran

no invocation recorded.

bulid_or_load_gen_model Not yet run
unverified (harvested, no recorded run)
qiushisun/transcoder/models_2.py
code served (permissive licence) · get_code("d9d8ed639ae7e5d0")
How it ran

no invocation recorded.

eval_ppl_epoch Not yet run
unverified (harvested, no recorded run)
qiushisun/transcoder/learner.py
code served (permissive licence) · get_code("26c1a357cded8c11")
How it ran

no invocation recorded.

load_tf_weights_in_t5 Not yet run
unverified (harvested, no recorded run)
qiushisun/transcoder/models_list/T5ForConditionalGeneration_Prefix_2.py
code served (permissive licence) · get_code("bfbc7746415f3426")
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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 8 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
load_tf_weights_in_t5 20 other papers
5 dated earlier, 15 later
2201.05966 (2022-01)
UNIFIEDSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models
2204.07705 (2022-04)
SUPER-NATURALINSTRUCTIONS: Generalization via Declarative Instructions on 1600+ NLP Tasks
2205.06983 (2022-05)
RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL
and 17 more not named here
get_model_size 6 other papers
4 dated earlier, 2 later
1909.09436 (2019-09)
CodeSearchNet Challenge: Evaluating the State of Semantic Code Search
2206.07796 (2022-06)
FixEval: Execution-based Evaluation of Program Fixes for Programming Problems
2207.11680 (2022-07)
No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligence
and 3 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-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

Code pre-trained models (CodePTMs) have recently demonstrated a solid capacity to process various software intelligence tasks, e.g., code clone detection, code translation, and code summarization. The current mainstream method that deploys these models to downstream tasks is to fine-tune them on individual tasks, which is generally costly and needs sufficient data for large models. To tackle the issue, in this paper, we present TransCoder, a unified Transferable fine-tuning strategy for Code representation learning. Inspired by human inherent skills of knowledge generalization, TransCoder drives the model to learn better code-related meta-knowledge like human programmers. Specifically, we employ a tunable prefix encoder as the meta-learner to capture cross-task and cross-language transferable knowledge, respectively. Besides, tasks with minor training sample sizes and languages with small corpus can be remarkably benefited from our approach. Extensive experiments conducted on benchmark datasets clearly demonstrate that our method can lead to superior performance on various code-related tasks and encourage mutual reinforcement. We also show that TransCoder is applicable in low-resource scenarios. Our codes are available at https://github.com/QiushiSun/TransCoder.

For agents

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

get_harvested_code_for_paper("2306.07285")
get_code_for_paper("2306.07285")
have("2306.07285")

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

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

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

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

Connect an agent — have() is free.