NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diurnal or Nocturnal? Federated Learning of Multi-branch Networks from Periodically Shifting Distributions

Chen Zhu, Zheng Xu, Mingqing Chen, Jakub Konečný, Andrew Hard, Tom GoldsteinICLR 2022

Abstract Federated learning (FL) models are typically trained on decentralized edge devices like smartphones. However, because devices primarily participate when charging and idle—often at night—the global data distribution shifts periodically across time zones. This paper addresses the instability caused by these diurnal and nocturnal shifts. By modeling the shifts as smooth transitions rather than abrupt changes, and by employing a multi-branch network guided by a "temporal prior," the proposed methods significantly improve model accuracy and stability on both image and text tasks.

The Challenge: Distributional Oscillation

In standard Federated Learning, a central server aggregates updates from thousands of edge devices without accessing their raw data. A major hidden challenge in this paradigm is the timing of device availability. Mobile devices usually participate in training only when they are plugged in, idle, and connected to Wi-Fi. Consequently, the active client pool is heavily skewed toward users in their local nighttime.

Because user behavior varies drastically throughout the day—the photos taken or text typed at 2:00 PM differ significantly from those at 2:00 AM—the "global" data distribution experiences periodic shifts. Previous research modeled this phenomenon as a "block-cyclic" pattern, assuming abrupt switches between day and night. However, real-world data reveals a much smoother, gradual transition as the sun sets across different time zones. Standard FL algorithms struggle with this continuous "distributional oscillation," leading to unstable training curves and degraded final performance.

Comparison of training accuracy curves showing real FL systems, smooth shifts, and block-cyclic shifts.

Proposed Solution: Smooth Transitions and Multi-branch Networks

To tackle these shifting sands, the authors introduce two primary innovations:

1. Smooth Transition Modeling Instead of relying on abrupt block-cyclic switches, the authors model the client population as a mixture of "daytime" and "nighttime" distributions that gradually blend into one another using linear or cosine functions. This intuitive model better matches observations from practical FL systems.

2. Multi-branch Networks with Temporal Priors The core architectural contribution is a multi-branch neural network. The model consists of a large, shared "feature extractor" (the bulk of the network) followed by multiple lightweight "specialized branches" (heads) tailored for different modes (e.g., day vs. night).

To train this architecture effectively, the authors introduce a temporal prior—an estimate of the ratio of daytime versus nighttime clients at any given hour. This prior guides the training process, ensuring the model knows when an update is happening. They propose two specific algorithms:

  • FEDTEM (Federated EM): Uses Gaussian Mixture Models (GMM) to cluster clients into modes based on their data features. It achieves high accuracy but requires sharing some local distribution parameters with the server.
  • FEDTKM (Federated K-Means): A privacy-centric alternative that relies only on aggregated statistics to enforce the temporal prior, making it fully compatible with Secure Aggregation protocols.

Key Insights

  • Shared Weights are Essential: Training a single model with a shared feature extractor for both modes is vastly superior to training two completely separate models. The shared layers efficiently learn universal patterns (like visual shapes or text grammar).
  • The Power of the Prior: Regularizing the clustering process with the time of day prevents the model from "forgetting" one mode while training heavily on the other.
  • Label Smoothing as a Bridge: Applying label smoothing on the "inactive" branch during a client's update prevents that branch from becoming stale or overconfident on mismatched data.

Experimental Results

The researchers evaluated their methods on three major benchmarks simulating day/night splits: EMNIST (digits vs. characters), CIFAR-10/100 (split classes), and Stack Overflow (questions vs. answers).

The proposed multi-branch approach consistently outperformed "distribution-oblivious" baselines:

  • CIFAR: Accuracy saw a massive jump of 2–14%, depending on the severity of the shift.
  • EMNIST: Accuracy improved by 3–5%.
  • Stack Overflow: Improved next-word prediction by 0.4–1.35%, a highly significant margin for this massive language task.

Remarkably, by leveraging temporal priors, the proposed methods (FEDTEM and FEDTKM) often beat even the idealized "No Distribution Shift" baseline—where clients are sampled uniformly regardless of time—by about 4% on image tasks.

Accuracy on CIFAR with a cosine shift, demonstrating FEDTEM and FEDTKM outperforming baselines.

Limitations and Future Work

While highly effective, the current approach primarily focuses on a binary assumption (Day vs. Night). Global systems may exhibit more complex, overlapping patterns across dozens of time zones. Additionally, there remains an open challenge in balancing privacy and performance: finding a middle ground that offers FEDTEM-level accuracy with the strict differential privacy guarantees of FEDTKM. Future work could also explore learning these temporal priors dynamically in environments where the data rhythm isn't strictly tied to a 24-hour clock.

Summary updated

BibTeX
@inproceedings{zhu2022diurnal,
  author = {Chen Zhu and Zheng Xu and Mingqing Chen and Jakub Konečný and Andrew Hard and Tom Goldstein},
  title = {{Diurnal or Nocturnal? Federated Learning of Multi-branch Networks from Periodically Shifting Distributions}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=E4EE_ohFGz},
}
Figure