SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.20320 · 2024

MTLoRA: A Low-Rank Adaptation Approach for Efficient Multi-Task Learning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 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, 1 violated it and 0 have no contract verdict; 8 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-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/2403.20320.json · badge: /api/ran/2403.20320.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
scale-lab/mtlora canonical (classifier label)
classifier basis: census
9 ran · 4 no recorded run
FunctionStatusWhere it lives
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
scale-lab/mtlora/models/swin_transformer_mtlora.py
code served (permissive licence) · get_code("144d10b49baeb8a6")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (8, 4, 4, 4) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:38:58Z). 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 a tensor with shape (B, H, W, C)
# B=2 (batch), H=8 (height), W=8 (width), C=4 (channels)
# Using distinct sizes: 2, 8, 8, 4
x = torch.randn(2, 8, 8, 4)

# window_size must divide both H and W evenly
# H=8, W=8, so window_size=4 works (8 // 4 = 2)
window_size = 4

ARGS = {
    "x": x,
    "window_size": window_size,
}
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 Tensor, ndim 4, dtype family float, shape (8, 4, 4, 4) — shape (8, 4, 4, 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
build_scheduler Ran
ran; our contract draft was wrong, not the code
scale-lab/mtlora/lr_scheduler.py
code served (permissive licence) · get_code("016895042cc7e7ef")
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 CosineLRScheduler. 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 torch.optim as optim

torch.manual_seed(0)

# Create a simple model for the optimizer
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.1)

# Create a config object with all required attributes
class Config:
    class TRAIN:
        EPOCHS = 100
        WARMUP_EPOCHS = 5
        MIN_LR = 1e-5
        WARMUP_LR = 1e-4
        
        class LR_SCHEDULER:
            NAME = 'cosine'
            WARMUP_PREFIX = False
            DECAY_EPOCHS = 20
            DECAY_RATE = 0.1
            MULTISTEPS = [30, 60, 90]
            GAMMA = 0.1

config = Config()

# Number of iterations per epoch
n_iter_per_epoch = 100

# Define ARGS dict with all parameters for build_scheduler
ARGS = {
    'config': config,
    'optimizer': optimizer,
    'n_iter_per_epoch': n_iter_per_epoch,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CosineLRScheduler — a CosineLRScheduler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CosineLRScheduler 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
scale-lab/mtlora/models/seg_hrnet.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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.

create_logger Ran
ran; our contract draft was wrong, not the code
scale-lab/mtlora/logger.py
code served (permissive licence) · get_code("299f2d40c6a8adc7")
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 Logger. 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 sys
import logging
import tempfile
from termcolor import colored

# Create a temporary directory for logging
temp_dir = tempfile.mkdtemp()

ARGS = {
    'output_dir': temp_dir,
    'dist_rank': 0,
    'name': 'test_logger'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
termcolor — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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_loss Ran
ran; our contract draft was wrong, not the code
scale-lab/mtlora/mtl_loss_schemes.py
code served (permissive licence) · get_code("80c0c9e218ee946c")
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 BalancedCrossEntropyLoss. 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 MockTaskConfig(dict):
    """Mock task config that supports .get() method"""
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
    
    def get(self, key, default=None):
        return super().get(key, default)

# Create task configs for different tasks
task_cfg_edge = MockTaskConfig({'edge_w': 0.95})
task_cfg_semseg = MockTaskConfig({})
task_cfg_normals = MockTaskConfig({})

# Create config dict
config = {
    'DATA': {}
}

ARGS = {
    'task_cfg': task_cfg_edge,
    'task': 'edge',
    'config': config
}
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 BalancedCrossEntropyLoss — a BalancedCrossEntropyLoss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BalancedCrossEntropyLoss 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
lora_filter Ran
ran, violated the contract we drafted
scale-lab/mtlora/models/lora.py
code served (permissive licence) · get_code("7c89e5e716dec3fc")
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 bool, 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)

# The function lora_filter takes two parameters:
# - key: str
# - value: Any
# It checks if 'lora_' is in the key string and returns a boolean.

# Construct arguments that would be used in a typical filter scenario
key = "module.lora_weight"
value = torch.randn(2, 4)

ARGS = {
    "key": key,
    "value": value
}
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 bool, 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
map_old_state_dict_weights Ran
ran; our contract draft was wrong, not the code
scale-lab/mtlora/models/lora.py
code served (permissive licence) · get_code("9f7d1c2d347cb4aa")
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
from collections.abc import Mapping

torch.manual_seed(0)

# Create a state_dict with some example weights
state_dict = {
    "layer.0.weight": torch.randn(4, 3),
    "layer.0.bias": torch.randn(4),
    "layer.1.qkv.linear.weight": torch.randn(12, 5),  # Will be split into 3 chunks of (4, 5)
    "layer.1.qkv.linear.bias": torch.randn(12),       # Will be split into 3 chunks of (4,)
    "layer.2.other.weight": torch.randn(6, 7),
}

# Create a mapping from old checkpoint names to new attribute names
mapping = {
    "layer.0.weight": "layer.0.weight",
    "layer.0.bias": "layer.0.bias",
    "layer.1.qkv.linear.weight": "layer.1.attn.qkv.linear.weight",
    "layer.1.qkv.linear.bias": "layer.1.attn.qkv.linear.bias",
    "layer.2.other.weight": "layer.2.other.weight",
    "missing.key": "missing.mapped",
}

prefix = ""
split_qkv = True

ARGS = {
    "state_dict": state_dict,
    "mapping": mapping,
    "prefix": prefix,
    "split_qkv": split_qkv,
}
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
resize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
scale-lab/mtlora/models/segformer.py
code served (permissive licence) · get_code("368118c367337eb7")
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 4, dtype family float, shape (2, 3, 8, 10) 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.functional as F

torch.manual_seed(0)

# Create a small input tensor: batch_size=2, channels=3, height=4, width=5
input_tensor = torch.randn(2, 3, 4, 5)

# Test case 1: resize with explicit size
size = (8, 10)

# scale_factor can be None or a float/tuple
scale_factor = None

# mode options: 'nearest', 'linear', 'bilinear', 'bicubic', 'trilinear', 'area', 'nearest-exact'
mode = 'nearest'

# align_corners: None or bool (used in interpolate, relevant for some modes)
align_corners = None

# warning: whether to issue warnings about alignment
warning = False

ARGS = {
    'input': input_tensor,
    'size': size,
    'scale_factor': scale_factor,
    'mode': mode,
    'align_corners': align_corners,
    'warning': warning
}
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 4, dtype family float, shape (2, 3, 8, 10) — shape (2, 3, 8, 10) 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
window_reverse Ran
ran; our contract draft was wrong, not the code
scale-lab/mtlora/models/swin_transformer_mtlora.py
code served (permissive licence) · get_code("61bf152e6a42a184")
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 Tensor, ndim 4, dtype family float, shape (2, 8, 12, 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 torch

torch.manual_seed(0)

# Parameters for window_reverse
# windows: (num_windows*B, window_size, window_size, C)
# The function expects windows to be partitioned from an image of size (B, H, W, C)
# where the image is divided into non-overlapping windows of size window_size x window_size

B = 2  # batch size
H = 8  # image height
W = 12  # image width
window_size = 4  # window size
C = 3  # number of channels

# Calculate number of windows
num_windows_h = H // window_size  # 2
num_windows_w = W // window_size  # 3
num_windows = num_windows_h * num_windows_w  # 6

# windows shape: (num_windows*B, window_size, window_size, C)
# = (6*2, 4, 4, 3) = (12, 4, 4, 3)
windows = torch.randn(num_windows * B, window_size, window_size, C)

ARGS = {
    "windows": windows,
    "window_size": window_size,
    "H": H,
    "W": W,
}
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 Tensor, ndim 4, dtype family float, shape (2, 8, 12, 3) — shape (2, 8, 12, 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
build_model Not yet run
unverified (harvested, no recorded run)
scale-lab/mtlora/models/build.py
code served (permissive licence) · get_code("7d5cbe94b33d3a17")
How it ran

no invocation recorded.

build_mtl_model Not yet run
unverified (harvested, no recorded run)
scale-lab/mtlora/models/build.py
code served (permissive licence) · get_code("d209ed6ef5c01da9")
How it ran

no invocation recorded.

mark_only_lora_as_trainable Not yet run
unverified (harvested, no recorded run)
scale-lab/mtlora/models/lora.py
code served (permissive licence) · get_code("f3788eeccc68b1f0")
How it ran

no invocation recorded.

resize Not yet run
unverified (harvested, no recorded run)
scale-lab/mtlora/models/base_decode_head.py
code served (permissive licence) · get_code("5ebb5fe1837669a8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 10 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 10 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
conv3x3 686 other papers
562 dated earlier, 15 the same month, 92 later, 17 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
window_reverse 227 other papers
153 dated earlier, 10 the same month, 55 later, 9 same year, order not determinable · 34 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 224 more not named here
window_partition 223 other papers
152 dated earlier, 7 the same month, 55 later, 9 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
resize 9 other papers
6 dated earlier, 3 later
2203.01502 (2022-03)
Neural Window Fully-connected CRFs for Monocular Depth Estimation
2208.03792 (2022-08)
Domain Randomization-Enhanced Depth Simulation and Restoration for Perceiving and Grasping Specular and Transparent Objects
2210.09071 (2022-10)
Attention Attention Everywhere: Monocular Depth Prediction with Skip Attention
and 6 more not named here
build_scheduler 3 other papers
1 dated earlier, 2 later
ijcai2023_0504 (2023 (year only))
CLE-ViT: Contrastive Learning Encoded Transformer for Ultra-Fine-Grained Visual Categorization
2404.07794 (2024-04)
DGMamba: Domain Generalization via Generalized State Space Model
2406.08773 (2024-06)
DenoiseRep: Denoising Model for Representation Learning
lora_filter 3 other papers
1 dated earlier, 2 later
2401.02385 (2024-01)
TinyLlama: An Open-Source Small Language Model
2407.02013 (2024-07)
DIGRAF: Diffeomorphic Graph-Adaptive Activation Function
2503.15450 (2025-03)
SkyLadder: Better and Faster Pretraining via Context Window Scheduling
create_logger 1 other paper
1 later
2407.02013 (2024-07)
DIGRAF: Diffeomorphic Graph-Adaptive Activation Function
get_loss 1 other paper
1 later
2407.02013 (2024-07)
DIGRAF: Diffeomorphic Graph-Adaptive Activation Function
mark_only_lora_as_trainable 1 other paper
1 later
2407.02013 (2024-07)
DIGRAF: Diffeomorphic Graph-Adaptive Activation Function
resize 1 other paper
1 later
2407.02013 (2024-07)
DIGRAF: Diffeomorphic Graph-Adaptive Activation Function

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

Adapting models pre-trained on large-scale datasets to a variety of downstream tasks is a common strategy in deep learning. Consequently, parameter-efficient fine-tuning methods have emerged as a promising way to adapt pre-trained models to different tasks while training only a minimal number of parameters. While most of these methods are designed for single-task adaptation, parameter-efficient training in Multi-Task Learning (MTL) architectures is still unexplored. In this paper, we introduce MTLoRA, a novel framework for parameter-efficient training of MTL models. MTLoRA employs Task-Agnostic and Task-Specific Low-Rank Adaptation modules, which effectively disentangle the parameter space in MTL fine-tuning, thereby enabling the model to adeptly handle both task specialization and interaction within MTL contexts. We applied MTLoRA to hierarchical-transformer-based MTL architectures, adapting them to multiple downstream dense prediction tasks. Our extensive experiments on the PASCAL dataset show that MTLoRA achieves higher accuracy on downstream tasks compared to fully fine-tuning the MTL model while reducing the number of trainable parameters by 3.6x. Furthermore, MTLoRA establishes a Pareto-optimal trade-off between the number of trainable parameters and the accuracy of the downstream tasks, outperforming current state-of-the-art parameter-efficient training methods in both accuracy and efficiency. Our code is publicly available.

For agents

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

get_harvested_code_for_paper("2403.20320")
get_code_for_paper("2403.20320")
have("2403.20320")

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

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

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

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

Connect an agent — have() is free.