Local epochs is a hyperparameter in federated learning that defines the number of complete passes a client makes over its local dataset during a single communication round before sending a model delta to the server. This parameter directly trades off local computational effort against communication frequency. A higher value means more intensive local training per round, which can reduce the total number of rounds needed for convergence but risks client drift on statistically heterogeneous data.
Glossary
Local Epochs

What is Local Epochs?
A core hyperparameter in federated learning that controls local computation before communication.
Setting the local epochs value is a critical system design choice. It balances the efficiency of communication-efficient federated learning against the accuracy degradation caused by statistical heterogeneity. Algorithms like FedProx and SCAFFOLD are explicitly designed to mitigate the negative effects of using many local epochs on non-IID data by regularizing client updates or using control variates.
Key Characteristics of Local Epochs
Local epochs (E) is a critical hyperparameter in federated learning that controls the amount of local computation performed by each client between communication rounds with the central server.
Definition & Core Function
A local epoch is one complete pass by a federated learning client over its entire local training dataset. The hyperparameter E specifies the number of such passes performed locally before the client sends its model update (or gradient) back to the server. This creates a fundamental trade-off:
- High E (e.g., E=10): More local computation per round, fewer communication rounds needed, but risk of client drift.
- Low E (e.g., E=1): Less local computation, more frequent communication, closer alignment with centralized SGD but higher communication cost.
In the canonical Federated Averaging (FedAvg) algorithm,
E > 1is what differentiates it from the baseline FedSGD, whereE=1.
Trade-off: Computation vs. Communication
The primary role of E is to manage the system's efficiency trade-off between on-device compute and network bandwidth.
- Increasing E amortizes the cost of each communication round over more local work. This is crucial in cross-device FL where millions of slow, intermittent mobile devices participate. It makes training feasible where frequent communication is prohibitive.
- Decreasing E reduces the client drift caused by overfitting to local, non-IID data. It keeps client updates more aligned with the global objective, often improving final model accuracy at the expense of more rounds.
Engineers tune
Ebased on the specific federated network's constraints: device compute power, network latency, and data heterogeneity.
Interaction with Statistical Heterogeneity (Non-IID Data)
The setting of E has profound effects when client data is non-independent and identically distributed (non-IID).
- High E on non-IID data: Clients perform many steps on their unique data distribution, causing their local models to diverge from the global optimum. This is the client drift problem, which can slow convergence or lead to a poor final global model.
- Mitigation Strategies: Algorithms like FedProx add a proximal term to the local loss function, penalizing updates that stray too far from the global model. SCAFFOLD uses control variates to correct local update directions. These methods allow for higher
Evalues despite data heterogeneity.
Relationship to Batch Size and Local Steps
The total number of local optimization steps a client takes per round is determined by both E and the **local batch size (B)`.
- Local Steps per Round = E * (Local Dataset Size / B)
Therefore, increasing
Elinearly increases local computation. For a fixed dataset size, you can achieve a similar number of local steps by either increasingEor decreasingB. However, they have different effects: - A larger
Bprovides a more stable, lower-variance gradient estimate per step. - A larger
Emeans more steps, increasing the risk of overfitting to the local data. Tuning requires considering both hyperparameters jointly.
Impact on Convergence and Algorithms
The value of E directly influences theoretical convergence guarantees and practical algorithm design.
- Convergence Rate: Under convex assumptions, increasing
Ecan lead to faster convergence in terms of communication rounds, but may require more total local steps to reach a given accuracy. - Algorithm Variants: FedNova explicitly normalizes client updates by their local number of steps (a function of
E) to correct for the bias introduced when clients perform different amounts of work. Without this, a client with higherEwould have an disproportionately large influence on the global update. - Adaptive Tuning: Advanced FL orchestrators may dynamically adjust
Eper client or per round based on observed convergence metrics or client capabilities.
Practical Tuning Guidelines
Selecting E is an empirical decision based on the FL deployment scenario:
- Cross-Silo FL (10-100 reliable institutional clients): Use moderate
E(e.g., 2-5). Communication is less costly, so focus on mitigating drift. - Cross-Device FL (1000s+ mobile/IoT devices): Use higher
E(e.g., 5-20) to tolerate partial participation and high communication latency. - Highly Non-IID Data: Start with a low
E(1-2) and consider algorithms like FedProx if you need to increase it. - Homogeneous (IID) Data: Higher
Evalues are generally safe and improve communication efficiency. Benchmarking involves monitoring global validation accuracy vs. total communication rounds and vs. cumulative client compute time.
The Computation-Communication Trade-off
The core engineering challenge in federated learning is balancing local computational work against the frequency and cost of network communication.
The computation-communication trade-off is the fundamental design choice in federated learning between performing more local computation on client devices and the frequency and bandwidth required for network communication with a central server. This trade-off is primarily governed by the number of local epochs a client runs. More local computation reduces communication rounds but risks client drift, where models diverge due to heterogeneous local data.
Optimizing this trade-off is critical for system efficiency. Algorithms like Federated Averaging (FedAvg) exploit high local computation to minimize costly communication over slow or metered networks. Techniques such as update compression and gradient clipping further refine this balance, reducing payload size per communication round to improve overall training latency and resource consumption.
Local Epochs: FedAvg vs. FedSGD
A comparison of the two foundational federated learning algorithms, highlighting how the number of local epochs (E) fundamentally changes the communication-computation trade-off.
| Algorithmic Feature | Federated Averaging (FedAvg) | Federated SGD (FedSGD) |
|---|---|---|
Core Definition | An iterative algorithm where clients perform multiple local passes (epochs) over their data before sending a single update. | A baseline algorithm where clients compute one gradient step per communication round. |
Local Epochs Parameter (E) | E ≥ 1 (Typically E > 1, e.g., 5-10). | E = 1 (By definition). |
Local Batch Processing | Multiple batches processed per round. Can use mini-batch SGD locally. | Effectively uses a single, very large batch (the entire local dataset). |
Communication-Computation Trade-off | High local computation, low communication frequency. Reduces total rounds needed. | Low local computation, high communication frequency. Increases total rounds needed. |
Update Transmitted | Full model parameters (or delta) after E local epochs. | Gradient computed on the entire local dataset. |
Convergence Behavior | Can converge faster in terms of communication rounds but may experience client drift with high E and non-IID data. | Convergence is directly analogous to centralized SGD but requires vastly more communication rounds. |
Primary Use Case | Standard federated learning with resource-constrained or expensive communication (e.g., mobile networks). | Theoretical baseline; useful for analysis or in environments with negligible communication cost. |
Relationship | General case. FedSGD is a special case of FedAvg where E=1 and the local batch size equals the client's dataset size. | Special case of FedAvg. Serves as the foundational reference point for algorithm design. |
Frequently Asked Questions
Local epochs are a core hyperparameter in federated learning that controls how much local computation a client performs before communicating with the server. This FAQ addresses common questions about its role, tuning, and impact on the federated training process.
A local epoch is the number of complete passes a federated learning client makes over its local dataset during a single communication round before sending a model delta (update) back to the server. It is the primary controller of the computation-to-communication ratio in algorithms like Federated Averaging (FedAvg). Setting local_epochs = 1 means clients perform one pass over their data per round, while local_epochs = 5 means five passes, substantially increasing local computation and reducing communication frequency.
Key Mechanism: In each round, the server broadcasts the current global model. Each participating client downloads it, performs E local epochs of stochastic gradient descent (SGD) on its private data, and then uploads the resulting parameter changes. A higher E value leads to more refined local updates but can exacerbate client drift on statistically heterogeneous (non-IID) data.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Local epochs are a core hyperparameter within the broader federated averaging process. Understanding related algorithmic components is essential for tuning performance and managing system constraints.
Communication Round
A communication round is the fundamental cycle of the federated averaging loop. It consists of three phases:
- Broadcast: The server sends the current global model to a selected subset of clients.
- Local Training: Each client trains the model on its local data for a specified number of local epochs.
- Aggregation: The server collects the client updates (model deltas) and aggregates them, typically via weighted averaging, to produce a new global model. The frequency of communication rounds is a primary determinant of total training time and bandwidth cost.
Client Drift
Client drift is a convergence-hindering phenomenon where local client models diverge from the global objective. It is primarily caused by:
- Statistical Heterogeneity (Non-IID Data): Clients optimize for their unique local data distributions.
- Excessive Local Epochs: Too many local epochs can cause clients to overfit to their local data, amplifying divergence. Algorithms like FedProx and SCAFFOLD are explicitly designed to mitigate client drift by adding constraints or correction terms to the local optimization objective.
FedSGD
Federated Stochastic Gradient Descent (FedSGD) is a foundational baseline algorithm. It is mathematically equivalent to Federated Averaging (FedAvg) configured with:
- Local Epochs = 1
- Local Batch Size = Entire Local Dataset In this configuration, each client performs exactly one gradient descent step per communication round. Comparing FedAvg (with E>1) to FedSGD reveals the communication-computation trade-off: more local computation reduces the required number of communication rounds.
Statistical Heterogeneity
Statistical heterogeneity, or non-IID data, is the defining characteristic of federated learning where data distributions vary significantly across clients. This variation directly influences the optimal setting for local epochs.
- High Heterogeneity: Fewer local epochs are often beneficial to prevent severe client drift.
- Low Heterogeneity: More local epochs can be used to efficiently reduce communication rounds. Managing this tension is central to federated optimization algorithm design.
Local Model
The local model is the instance of the global neural network downloaded by a client at the start of a communication round. The lifecycle of the local model during a round is:
- Initialization: Parameters are set from the current global model.
- Training: The model is updated via stochastic gradient descent for
Elocal epochs over the client's private dataset. - Update Calculation: The difference (delta) between the final local parameters and the initial parameters is computed. This local model is ephemeral; only the computed update is sent to the server.
FedProx
FedProx is a federated optimization algorithm designed to handle statistical heterogeneity. It modifies the local client objective function by adding a proximal term:
F_k(w) + (μ/2) * ||w - w^t||^2
where w^t is the global model and μ is a hyperparameter. This term:
- Constrains Local Updates: Acts as a regularizer, penalizing the local model for drifting too far from the global model.
- Mitigates Heterogeneity Impact: Allows for the use of more local epochs even on highly non-IID data by explicitly controlling divergence. It provides a more robust alternative to standard FedAvg under challenging data distributions.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us