Can Textual Gradient Work in Federated Learning?

Minghui Chen, Ruinan Jin, Wenlong Deng, Yuanyuan Chen, Zhi Huang +2 more
2/12/2026

No official code found. Best implementation: ubc-tea/FedTextGrad (17 stars, last commit 2025-03-10).

Abstract

Recent studies highlight the promise of LLM-based prompt optimization, especially with TextGrad, which automates differentiation'' via texts and backpropagates textual feedback. This approach facilitates training in various real-world applications that do not support numerical gradient propagation or loss calculation. In this paper, we systematically explore the potential and challenges of incorporating textual gradient into Federated Learning (FL). Our contributions are fourfold. Firstly, we introduce a novel FL paradigm, Federated Textual Gradient (FedTextGrad), that allows clients to upload locally optimized prompts derived from textual gradients, while the server aggregates the received prompts. Unlike traditional FL frameworks, which are designed for numerical aggregation, FedTextGrad is specifically tailored for handling textual data, expanding the applicability of FL to a broader range of problems that lack well-defined numerical loss functions. Secondly, building on this design, we conduct extensive experiments to explore the feasibility of FedTextGrad. Our findings highlight the importance of properly tuning key factors (e.g., local steps) in FL training. Thirdly, we highlight a major challenge in FedTextGrad aggregation: retaining essential information from distributed prompt updates. Last but not least, in response to this issue, we improve the vanilla variant of FedTextGrad by providing actionable guidance to the LLM when summarizing client prompts by leveraging the Uniform Information Density principle. Through this principled study, we enable the adoption of textual gradients in FL for optimizing LLMs, identify important issues, and pinpoint future directions, thereby opening up a new research area that warrants further investigation.

View on arXivView PDF

Code Implementations(1)

ubc-tea/FedTextGradCommunity100%

The official implementation of paper "Can Textual Gradient Work in Federated Learning?" accepted at ICLR 2025

171Shell, PythonFeb 15, 20251 years ago

Similar Papers

Cite this paper

@article{chen2026textual,
  title  = {Can Textual Gradient Work in Federated Learning?},
  author = {Minghui Chen and Ruinan Jin and Wenlong Deng and Yuanyuan Chen and Zhi Huang and Han Yu and Xiaoxiao Li},
  year   = {2026},
  eprint = {2502.19980},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.19980},
  journal = {ICLR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.19980.svg)](https://codeofpaper.com/paper/2502.19980)

Discussion