Helmsman: Autonomous Synthesis of Federated Learning Systems via Multi-Agent Collaboration

Haoyuan Li, Mathias Funk, Aaqib Saeed · DOI

Introduction

Federated Learning (FL) has emerged as a critical paradigm for training machine learning models on decentralized data while preserving user privacy. However, implementing robust FL systems remains a significant challenge. Researchers must navigate an "intractable design space" characterized by complex trade-offs between data heterogeneity (non-IID data), hardware constraints, and communication bottlenecks.

Currently, designing these systems is a labor-intensive process that often results in bespoke, brittle solutions. While Large Language Models (LLMs) have revolutionized general code generation, they frequently struggle with the high-level system orchestration required for FL—such as coordinating interdependent modules for client-side training, server-side aggregation, and network protocols. To address this manual design bottleneck, we present Helmsman, a multi-agent framework that automates the end-to-end design and deployment of FL systems from natural language specifications.

The difficulty of FL implementation stems from the vast array of potential strategies required to mitigate specific system and data challenges. As illustrated in the mapping of the design space, a single task (such as Heterogeneous FL) may require a combination of diverse strategies to address communication efficiency and data distribution skews simultaneously.

Mapping the complex relationships between FL tasks, challenges, and existing strategies.

Helmsman addresses this complexity by shifting the focus from simple code snippet generation to holistic system-level reasoning. By mimicking a professional R&D team structure, the framework can synthesize hybrid strategies—such as combining experience replay with global model distillation—to solve multi-faceted problems like catastrophic forgetting in continual learning.

The Helmsman Framework

Helmsman operates on the principle of "division of labor," orchestrating specialized LLM agents through a three-phase pipeline: planning, coding, and evaluation.

The Helmsman multi-agent workflow, spanning planning, modular coding, and autonomous evaluation.

1. Interactive & Verifiable Planning

A Planning Agent utilizes Retrieval-Augmented Generation (RAG) to access the latest FL literature and documentation, drafting a comprehensive research plan. This plan is then critiqued by a Reflection Agent for logical coherence. A human-in-the-loop (HITL) step ensures the final plan aligns with user requirements and safety standards before implementation begins.

2. Modular Code Generation

A Supervisor Agent decomposes the approved plan into four distinct modules: Task (data and model definitions), Client, Strategy (aggregation logic), and Server. Dedicated teams of Coder and Tester agents implement and verify these modules independently. This modular approach ensures that the resulting codebase is consistent, maintainable, and follows a standardized architecture.

3. Autonomous Evaluation & Refinement

The integrated codebase is executed in a sandboxed simulation using the Flower framework. An Evaluator Agent monitors the simulation for both runtime errors and semantic failures, such as stagnant training metrics. If issues are detected, a Debugger Agent iteratively patches the code until it passes a five-round "smoke test."

Experimental Evaluation

To rigorously test Helmsman, we introduced AgentFL-Bench, a benchmark consisting of 16 diverse tasks across domains including data heterogeneity, distribution shift, system constraints, and communication efficiency.

Key Results

  • 100% Success Rate: Utilizing Claude 3.5 Sonnet or GPT-4o, Helmsman successfully generated functional systems for all 16 tasks. In comparison, state-of-the-art baselines like Codex and Claude Code achieved success rates of only 37.5% and 43.75%, respectively.
  • Superior Performance: Helmsman’s autonomous solutions often outperformed established hand-crafted baselines. For instance, on the Split-CIFAR100 continual learning task, Helmsman achieved 51.04% accuracy, nearly doubling the 34.89% performance of the specialized TARGET baseline.
  • Cost Efficiency: The structured planning phase reduced the number of tokens wasted on failed executions, making the multi-agent approach more cost-effective than trial-and-error with single-agent models.

Conclusion and Future Work

Helmsman demonstrates that multi-agent collaboration can overcome the orchestration hurdles that previously limited automated FL design. While the system currently excels in cross-silo and cross-device simulations, future work will focus on scaling to thousands of clients and implementing a "meta-optimization" loop. This would allow Helmsman to learn from its own experimental failures, further refining its internal library of strategies and coding templates over time.

Summary updated

BibTeX
@inproceedings{li2026helmsman,
  author = {Haoyuan Li and Mathias Funk and Aaqib Saeed},
  title = {{Helmsman: Autonomous Synthesis of Federated Learning Systems via Multi-Agent Collaboration}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=Voiy13SK3r},
}
Figure