Papers › Safely Learning with Private Data: A Federated Learning Framework for Large Language Model

Safely Learning with Private Data: A Federated Learning Framework for Large Language Model

21 Jun 2024arXiv:2406.14898archive 2025-07-28

JiaYing Zheng, Hainan Zhang, LingXiang Wang, Wangjie Qiu, Hongwei Zheng, Zhiming Zheng

Private data, being larger and quality-higher than public data, can greatly improve large language models (LLM). However, due to privacy concerns, this data is often dispersed in multiple silos, making its secure utilization for LLM training a challenge. Federated learning (FL) is an ideal solution for training models with distributed private data, but traditional frameworks like FedAvg are unsuitable for LLM due to their high computational demands on clients. An alternative, split learning, offloads most training parameters to the server while training embedding and output layers locally, making it more suitable for LLM. Nonetheless, it faces significant challenges in security and efficiency. Firstly, the gradients of embeddings are prone to attacks, leading to potential reverse engineering of private data. Furthermore, the server's limitation of handle only one client's training request at a time hinders parallel training, severely impacting training efficiency. In this paper, we propose a Federated Learning framework for LLM, named FL-GLM, which prevents data leakage caused by both server-side and peer-client attacks while improving training efficiency. Specifically, we first place the input block and output block on local client to prevent embedding gradient attacks from server. Secondly, we employ key-encryption during client-server communication to prevent reverse engineering attacks from peer-clients. Lastly, we employ optimization methods like client-batching or server-hierarchical, adopting different acceleration methods based on the actual computational capabilities of the server. Experimental results on NLU and generation tasks demonstrate that FL-GLM achieves comparable metrics to centralized chatGLM model, validating the effectiveness of our federated learning framework.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.14898")

Code

Syntology Ran 6 of 10 code samples harvested from 2 repositories linked to this paper; 4 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 7 samples from 1 repository, 4 ran; found in paper text by Syntology: 3 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

TAP-LLM/SplitFedLLM officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 6 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
1ran · fixture could not drive it
3ran
4unverified

Licence: 3 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv TAP-LLM/SplitFedLLM/Fed-Llama-module/client/modeling_llama_A.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 3c76e52815c5401d · report
apply_rotary_pos_emb TAP-LLM/SplitFedLLM/Fed-Llama-module/client/modeling_llama_A.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 583539efd6fd01fb · report
compute_metrics TAP-LLM/SplitFedLLM/Fed-Llama-module/flclient_llama2.py official repository ran Apache-2.0 (permissive) · f070a226c483d2ba · report
rotate_half TAP-LLM/SplitFedLLM/Fed-Llama-module/client/modeling_llama_A.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · e03d53ba9d4f9ae5 · report
get_dataset TAP-LLM/SplitFedLLM/Fed-Llama-module/get_dataloader.py official repository unverified Apache-2.0 (permissive) · bbadfd71e6cb762a · report
get_dataset TAP-LLM/SplitFedLLM/Fed-Llama-module/get_dataloader_no_pad.py official repository unverified Apache-2.0 (permissive) · d3c04ccf9dc3326e · report
old_compute_metrics TAP-LLM/SplitFedLLM/Fed-Llama-module/flclient_llama2_copy.py official repository unverified Apache-2.0 (permissive) · 74e0ef4a66fe6e1a · report
authenticate mher/flower/flower/utils/authentication.py found in paper text by Syntology ran fingerprinted licence not identified · pointer only · 48f15e5074b93868 · report
validate_auth_option mher/flower/flower/utils/authentication.py found in paper text by Syntology ran licence not identified · pointer only · dbf5a8a81a55f6e9 · report
is_flower_envvar mher/flower/flower/command.py found in paper text by Syntology unverified licence not identified · pointer only · 9af9ae92ba15cd8d · report

Tasks

Federated LearningLanguage ModelingLanguage ModellingLarge Language Model

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections