SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.04679 · 2024

RoSA: Accurate Parameter-Efficient Fine-Tuning via Robust Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

6 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, 1 violated it and 3 have no contract verdict; 1 failure of our instrument; 3 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/2401.04679.json · badge: /api/ran/2401.04679.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
ist-daslab/rosa canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
ist-daslab/panzamail community (classifier label)
classifier basis not recorded on the link
3 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_bleu_scores Ran
ran on a synthesized input
ist-daslab/panzamail/src/panza/interface/json.py
code served (permissive licence) · get_code("9b11c49c81759e69")
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 list, 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 torch
import numpy as np
from torchmetrics.text.bleu import BLEUScore
import string

torch.manual_seed(0)

punc_table = str.maketrans({key: None for key in string.punctuation})

bleu1 = BLEUScore(n_gram=1)
bleu2 = BLEUScore(n_gram=2)
bleu3 = BLEUScore(n_gram=3)
bleu4 = BLEUScore(n_gram=4)

def compute_bleu_scores(predictions, goldens):
    goldens = [' '.join(x.translate(punc_table).lower().split()) for x in goldens]
    candidates = [' '.join(prediction.translate(punc_table).lower().split()) for prediction in predictions]
    bleu_scores = [np.mean([bleu([candidate], [goldens]) for bleu in [bleu1, bleu2, bleu3, bleu4]]) for candidate in candidates]
    return [s.item() for s in bleu_scores]

# Setup test data
predictions = [
    "The quick brown fox jumps over the lazy dog",
    "A beautiful sunset over the mountains today"
]

goldens = [
    "The quick brown fox jumps over the lazy dog",
    "A beautiful sunset over the mountains today"
]

ARGS = {
    "predictions": predictions,
    "goldens": goldens
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchmetrics — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
extract_only_plain_text Ran
ran on a synthesized input
ist-daslab/panzamail/src/panza/data_preparation/extract_emails.py
code served (permissive licence) · get_code("b73f5e72516aa64d")
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 email
from email.mime.text import MIMEText

# Create a valid email message part with text/plain content type
msg = MIMEText("This is plain text content for testing.")

ARGS = {
    "msg_part": msg
}
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 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
findattr Ran
ran, honoured the contract we drafted
ist-daslab/rosa/llmfoundry/models/hf/hf_fsdp.py
code served (permissive licence) · get_code("83e3dc312aa8844c")
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
import torch.nn as nn
from typing import Iterable

torch.manual_seed(0)

# Create a simple nested object structure with various attributes
class InnerModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.value = 42
        self.tensor = torch.randn(2, 4)

class MiddleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.inner = InnerModule()
        self.name = "middle"

class OuterModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.middle = MiddleModule()
        self.config = {"key": "value"}
        self.simple_attr = "simple"

# Create test object
test_obj = OuterModule()

# Create list of attribute paths to search for
# Some exist, some don't, to test the iteration and fallback behavior
attrs_to_find = [
    "nonexistent.path",
    "middle.inner.value",
    "another.missing.attr",
    "middle.name"
]

ARGS = {
    "obj": test_obj,
    "attrs": attrs_to_find
}
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
rgetattr Ran
ran; our contract draft was wrong, not the code
ist-daslab/rosa/llmfoundry/models/hf/hf_fsdp.py
code served (permissive licence) · get_code("7383beb2cec34bf1")
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
from typing import Any, List

# Create a nested object structure to test rgetattr
class Level3:
    def __init__(self):
        self.value = "deep_value"

class Level2:
    def __init__(self):
        self.level3 = Level3()

class Level1:
    def __init__(self):
        self.level2 = Level2()

class RootObject:
    def __init__(self):
        self.level1 = Level1()
        self.simple_attr = "simple"

# Create test object
obj = RootObject()

# Test with nested attribute access
attr_path = "level1.level2.level3.value"

ARGS = {
    "obj": obj,
    "attr": attr_path,
}
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 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
rhasattr Ran
ran, violated the contract we drafted
ist-daslab/rosa/llmfoundry/models/hf/hf_fsdp.py
code served (permissive licence) · get_code("dd7e5308db9ee3c8")
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


class NestedModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.foo = nn.Module()
        self.foo.bar = nn.Module()
        self.foo.bar.baz = nn.Linear(4, 3)


class SimpleObject:
    def __init__(self):
        self.simple_attr = "value"
        self.nested = nn.Module()
        self.nested.deep = nn.Module()
        self.nested.deep.attr = 42


torch.manual_seed(0)

obj1 = NestedModule()
obj2 = SimpleObject()
obj3 = object()

ARGS = {
    "obj": obj1,
    "attr": "foo.bar.baz",
}
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
skip_forwarded_messages Ran
ran on a synthesized input
ist-daslab/panzamail/src/panza/data_preparation/extract_emails.py
code served (permissive licence) · get_code("d290e0665d9f698d")
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.

ARGS = {
    'plain_text': 'This is a regular email message with some content.'
}
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 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
compute_rouge_scores Not yet run
unverified (harvested, no recorded run)
ist-daslab/panzamail/src/panza/interface/json.py
code served (permissive licence) · get_code("c8e2cdc8524553df")
How it ran

no invocation recorded.

remove_date_time Not yet run
unverified (harvested, no recorded run)
ist-daslab/panzamail/src/panza/data_preparation/extract_emails.py
code served (permissive licence) · get_code("1ae0a808c04cb460")
How it ran

no invocation recorded.

retrieve_similar_emails Not yet run
unverified (harvested, no recorded run)
ist-daslab/panzamail/src/panza/data_preparation/prepare_raft_emails.py
code served (permissive licence) · get_code("7b217d56ba2c03a1")
How it ran

no invocation recorded.

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, 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 9 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

We investigate parameter-efficient fine-tuning (PEFT) methods that can provide good accuracy under limited computational and memory budgets in the context of large language models (LLMs). We present a new PEFT method called Robust Adaptation (RoSA) inspired by robust principal component analysis that jointly trains $\textit{low-rank}$ and $\textit{highly-sparse}$ components on top of a set of fixed pretrained weights to efficiently approximate the performance of a full-fine-tuning (FFT) solution. Across a series of challenging generative tasks such as grade-school math and SQL query generation, which require fine-tuning for good performance, we show that RoSA outperforms LoRA, pure sparse fine-tuning, and alternative hybrid methods at the same parameter budget, and can even recover the performance of FFT on some tasks. We provide system support for RoSA to complement the training algorithm, specifically in the form of sparse GPU kernels which enable memory- and computationally-efficient training, and show that it is also compatible with low-precision base weights, resulting in the first joint representation combining quantization, low-rank and sparse approximations. Our code is available at https://github.com/IST-DASLab/RoSA.

For agents

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

get_harvested_code_for_paper("2401.04679")
get_code_for_paper("2401.04679")
have("2401.04679")

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

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

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

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

Connect an agent — have() is free.