Abstract
Opportunistic Federated Learning (OFL) is a decentralized framework designed for pervasive computing, where mobile devices learn personalized models through fleeting peer-to-peer encounters. Unlike traditional Federated Learning, OFL eliminates the need for a central coordinator and addresses data heterogeneity through an egocentric approach. By introducing "opportunistic momentum," the framework selectively incorporates gradients from neighbors, enhancing local model accuracy and resilience to diverse data distributions.
Introduction
Standard Federated Learning (FL) typically relies on a central server to aggregate data from thousands of devices to build a single, global model. However, in pervasive computing—such as smartphone text prediction or wearable gait recognition—users have distinct needs and encounter vastly different data. The authors identify three major gaps in current FL: the requirement for a persistent central coordinator, the assumption of model homogeneity (ignoring personalization), and the failure to account for the "opportunistic" nature of mobile connectivity, where devices may only be in range for seconds.
The OFL Framework
The researchers propose an egocentric approach where each device's primary objective is to improve its own local, personalized model rather than contributing to a global goal.
Key components of the OFL system include:
- The Encounter Filter: Devices exchange data label distributions to calculate a similarity score. Encounters with neighbors whose data is too dissimilar are ignored to prevent model "pollution."
- Feasibility Check: The system uses mobility patterns to predict encounter duration, ensuring enough time for a training round.
- Opportunistic Momentum: Instead of simple averaging (Greedy Aggregation), devices maintain a table of gradients from recent diverse encounters. A windowed average provides stability and prevents overfitting to the most recent neighbor.
- Dynamic Decay: The learning rate decays based on the L2 distance from the initial "bootstrap" weights to keep the model from drifting too far from a reliable state.
Experimental Evaluation
The framework was evaluated using MNIST and CIFAR-10 datasets, modified to simulate extreme data skew where each device only sees a small subset of labels. Human movement was simulated using the Levy walk mobility model in a 9-region grid.
Key Results
The results demonstrate that collaboration without consensus is highly effective. Devices benefit from each other without needing to agree on a single global model.
- Resilience to Shift: In experiments with changing neighbor types,
opportunistic-momentummaintained high accuracy (approx. 93% for MNIST), while "greedy" approaches suffered from overfitting to unbalanced data. - Personalization Benefits: OFL-trained models consistently outperformed "local-only" models, proving that even fleeting interactions provide significant signals for sharpening personalized models.
- Feasibility: Benchmarks on a Raspberry Pi 4 showed that a full training round takes about 19 seconds over WiFi-Direct, making it practical for real-world encounters like waiting in a coffee line.
Conclusion and Future Work
OFL presents a viable path for decentralized, personalized machine learning in mobile environments. However, real-world deployment faces challenges such as the need for perfect encounter duration prediction and the development of incentive structures for peer participation. Future work will also explore adapting to dynamic user goals as environments change.
Summary updated