SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.09990 · NeurIPS · 2025

Differentially Private Federated Low Rank Adaptation Beyond Fixed-Matrix

Jiaqi Zhu, Ming Wen, Yuedong Xu, Yipeng Zhou, Dingding Han

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 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 0 have no contract verdict; 2 failures of our instrument; 3 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/2507.09990.json · badge: /api/ran/2507.09990.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
FLEECERmw/PrivacyFedLLM canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
fleecermw/privacyfedllm alias (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
FunctionStatusWhere it lives
get_Omega Ran
ran; our contract draft was wrong, not the code
fleecermw/privacyfedllm/policy/policy_fedask.py
code served (permissive licence) · get_code("3d09261f535fa80c")
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 logging

torch.manual_seed(0)

# Create a mock model state dict with LoRA weights
model_state_dict = {
    'layer1.lora_A.weight': torch.randn(3, 4),  # (lora_rank=3, k_features=4)
    'layer1.lora_B.weight': torch.randn(5, 3),  # (out_features=5, lora_rank=3)
    'layer2.lora_A.weight': torch.randn(2, 6),  # (lora_rank=2, k_features=6)
    'layer2.weight': torch.randn(8, 4),         # Regular layer, not LoRA
    'bias': torch.randn(5),                     # Regular bias, not LoRA
}

# Create a logger
logger = logging.getLogger('test_logger')

# Define s_sketch_dim
s_sketch_dim = 5

# target_device set to None to use CPU
target_device = None

ARGS = {
    'model_state_dict': model_state_dict,
    's_sketch_dim': s_sketch_dim,
    'target_device': target_device,
    'logger': logger,
}
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
setup_ddp Ran
ran, honoured the contract we drafted
FLEECERmw/PrivacyFedLLM/main_sft.py
code served (permissive licence) · get_code("afc4247e4dd42a64")
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 int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 os
import torch
import torch.distributed as dist

# Set up environment variables required by setup_ddp
os.environ['RANK'] = '0'
os.environ['WORLD_SIZE'] = '1'
os.environ['LOCAL_RANK'] = '0'

# Mock the dist.init_process_group to avoid actual distributed setup
# since we're in a single-process CPU environment
original_init = dist.init_process_group

def mock_init_process_group(backend=None, init_method=None, **kwargs):
    # Do nothing - we can't actually initialize DDP in this environment
    pass

dist.init_process_group = mock_init_process_group

# Define arguments for setup_ddp
ARGS = {
    'backend': 'gloo'
}
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, ndim 1, dtype family int — 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
unwrap_model Ran
ran; our contract draft was wrong, not the code
FLEECERmw/PrivacyFedLLM/policy/policy_scaffold.py
code served (permissive licence) · get_code("fd9a34654ce589b0")
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 SimpleModel. 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)

# Create a simple base model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a wrapper that mimics DDP with 'module' attribute
class DDPWrapper(nn.Module):
    def __init__(self, module):
        super().__init__()
        self.module = module
    
    def forward(self, x):
        return self.module(x)

# Create a nested wrapper to test recursion
class NestedWrapper(nn.Module):
    def __init__(self, module):
        super().__init__()
        self.module = module
    
    def forward(self, x):
        return self.module(x)

# Test case 1: Simple unwrapped model
base_model = SimpleModel()

# Test case 2: Single-wrapped model (DDP-like with 'module')
wrapped_model = DDPWrapper(SimpleModel())

# Test case 3: Nested wrapping to test recursion
nested_wrapped_model = NestedWrapper(DDPWrapper(SimpleModel()))

# Use the nested wrapped model as the main test case
ARGS = {
    "model": nested_wrapped_model
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
FedASKPolicy Not yet run
unverified (harvested, no recorded run)
fleecermw/privacyfedllm/policy/policy_fedask.py
code served (permissive licence) · get_code("6c317bc0c988fd96")
How it ran

no invocation recorded.

FedPolicy Not yet run
unverified (harvested, no recorded run)
fleecermw/privacyfedllm/policy/policy_fedask.py
code served (permissive licence) · get_code("17c1d63d77f6edc5")
How it ran

no invocation recorded.

load_config Not yet run
unverified (harvested, no recorded run)
FLEECERmw/PrivacyFedLLM/config.py
code served (permissive licence) · get_code("721e1f10a04905ce")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 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.

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

Large language models (LLMs) typically require fine-tuning for domain-specific tasks, and LoRA offers a computationally efficient approach by training lowrank adapters. LoRA is also communication-efficient for federated LLMs when multiple users collaboratively fine-tune a global LLM model without sharing their proprietary raw data. However, even the transmission of local adapters between a server and clients risks serious privacy leakage. Applying differential privacy (DP) to federated LoRA encounters a dilemma: adding noise to both adapters amplifies synthetic noise on the model, while fixing one adapter impairs the learnability of fine-tuning. In this paper, we propose FedASK (Differentially Private Federated Low Rank Adaptation with Double SKetching) , a novel federated LoRA framework to enable effective updating of both low-rank adapters with robust differential privacy. Inspired by randomized SVD, our key idea is a two-stage sketching pipeline. This pipeline first aggregates carefully sketched, privacypreserving local updates, and then reconstructs the global matrices on the server to facilitate effective updating of both adapters. We theoretically prove FedASK's differential privacy guarantee and its exact aggregation property. Comprehensive experiments demonstrate that FedASK consistently outperforms baseline methods across a variety of privacy settings and data distributions. The code is available at https://github.com/FLEECERmw/PrivacyFedLLM#. * equal contribution † equal contribution Preprint. Under review.

For agents

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

get_harvested_code_for_paper("2507.09990")
get_code_for_paper("2507.09990")
have("2507.09990")

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

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

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

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

Connect an agent — have() is free.