A Federated Framework for LLM-based Recommendation

Jujia Zhao, Wenjie Wang, Chen Xu, See-Kiong Ng, Tat-Seng Chua

TL;DR

Fine-tuning Large Language Models (LLMs) on user data creates powerful recommendation systems, but it exposes sensitive user history to severe privacy risks. This paper introduces FELLRec, a federated learning framework designed specifically for LLM-based recommendation that safeguards user privacy while dramatically reducing on-device computational costs and fixing performance imbalances across clients.

What Problem Does This Paper Address?

Deploying LLMs for generative recommendation typically requires fine-tuning models on rich user behavior data. However, centralizing this data violates privacy regulations like GDPR and risks exposing sensitive user histories.

While Federated Learning for Recommendation (Fed4Rec) keeps data on-device by only exchanging model updates, directly applying it to LLMs introduces two massive roadblocks:

  1. Exacerbated Client Performance Imbalance: Because LLMs adapt incredibly fast, standard federated averaging (FedAvg) causes severe training convergence disparities. This results in highly inequitable recommendation quality across different clients.
  2. Substantial Client Resource Costs: Local training and inference of billion-parameter LLMs quickly overwhelm the computational and storage limits of standard client devices (e.g., smartphones or local edge platforms).

Methods

FELLRec tackles these challenges using a client-server architecture governed by two core strategies:

Figure 2: FELLRec Structure. The left part is the flexible storage strategy which offloads non-sensitive LLM layers to the server to save resources. The right part is the dynamic balance strategy which ensures relatively balanced performance across clients.

1. Dynamic Balance Strategy

To fix the performance disparity among clients, FELLRec introduces two mechanisms:

  • Dynamic Parameter Aggregation: Instead of uniformly averaging updates, the server uses an attention mechanism based on the cosine similarity of clients' Low-Rank Adaptation (LoRA) parameters. This ensures clients prioritize learning from peers with similar data distributions.
  • Dynamic Learning Speed (Curriculum Heating): Clients facing higher local training losses undergo a gradual "pre-warming" phase. This prevents them from being prematurely overwhelmed by global model updates before they have adequately adapted to their local data.

2. Flexible Storage Strategy

To make LLMs viable on edge devices, FELLRec splits the model layers. It retains sensitive input (embedding) and output layers on the client side to guarantee data privacy. Meanwhile, it offloads the heavy, non-sensitive intermediate transformer layers to the central server. During training and inference, intermediate embeddings are passed back and forth, drastically cutting down on-device storage and compute requirements.

Datasets

The authors evaluated FELLRec across three distinct recommendation datasets:

  • Games: A subset of the Amazon review dataset containing user interactions with video games, rich in textual metadata like titles and categories.
  • Book: Another Amazon review subset tracking extensive user-book interactions across a wide variety of genres.
  • MicroLens: A newly released, large-scale short video recommendation benchmark that includes raw multi-modal information (titles, audio, and video features).

Key Insights and Ideas

  • LLMs Amplify Unfairness in Federated Learning: A key finding is that the fast-adaptation capabilities of LLMs actually worsen client performance imbalances by up to 31% compared to traditional matrix factorization models when using standard FedAvg.
  • The Privacy-Efficiency Trade-off is Quantifiable: Offloading layers to a server exposes intermediate embeddings to potential white-box reconstruction attacks. However, the authors demonstrate that the likelihood of an attacker successfully reconstructing user history decreases significantly as you go deeper into the network layers.
Attack Model Analysis

Key Results

  • Superior Recommendation Performance: FELLRec consistently outperforms other privacy-preserving federated baselines (such as FedAvg, FedProx, Ditto, and RoLoRA) across all three datasets, achieving accuracy on par with centralized LLM training.
  • Mitigated Imbalance: On the Games dataset, FELLRec reduced the "Imbalance Degree" (the performance gap between the best and worst clients) from 1.76 (under FedAvg) down to 0.55.
  • High Efficiency: By offloading intermediate layers, the framework reduces client-side storage and inference costs from $O(N)$ to $O(k+1)$, where $k$ is the small number of layers kept on-device. This makes local training feasible even under strict hardware constraints.

Limitations and Future Work

While promising, the authors note a few limitations:

  • Model Scale: The framework was primarily validated using LLaMA-7B as the largest backbone; evaluating even larger models remains an open task.
  • Attack Robustness: The privacy analysis focused on two specific white-box attacks (linear and MLP probes) on a single backend architecture. More diverse attack vectors should be explored.
  • Granularity: The dynamic balance strategy currently operates at the client level. The authors suggest that exploring layer-based, fine-grained aggregation strategies could yield even better performance in the future.

Summary updated

BibTeX
@inproceedings{zhao2025federated,
  author = {Jujia Zhao and Wenjie Wang and Chen Xu and See-Kiong Ng and Tat-Seng Chua},
  title = {{A Federated Framework for LLM-based Recommendation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.findings-naacl.155},
}
Figure