BTFL: A Bayesian-based Test-Time Generalization Method for Internal and External Data Distributions in Federated learning
This addresses the challenge of adapting federated learning models to distribution shifts during online deployment, which is crucial for real-world applications, though it appears incremental as it builds on personalized federated learning.
The paper tackles the problem of test-time generalization in federated learning, where existing methods struggle with out-of-distribution samples, and proposes BTFL, a Bayesian-based method that balances personalization and generalization during testing, achieving improved performance with less time cost across various datasets and models.
Federated Learning (FL) enables multiple clients to collaboratively develop a global model while maintaining data privacy. However, online FL deployment faces challenges due to distribution shifts and evolving test samples. Personalized Federated Learning (PFL) tailors the global model to individual client distributions, but struggles with Out-Of-Distribution (OOD) samples during testing, leading to performance degradation. In real-world scenarios, balancing personalization and generalization during online testing is crucial and existing methods primarily focus on training-phase generalization. To address the test-time trade-off, we introduce a new scenario: Test-time Generalization for Internal and External Distributions in Federated Learning (TGFL), which evaluates adaptability under Internal Distribution (IND) and External Distribution (EXD). We propose BTFL, a Bayesian-based test-time generalization method for TGFL, which balances generalization and personalization at the sample level during testing. BTFL employs a two-head architecture to store local and global knowledge, interpolating predictions via a dual-Bayesian framework that considers both historical test data and current sample characteristics with theoretical guarantee and faster speed. Our experiments demonstrate that BTFL achieves improved performance across various datasets and models with less time cost. The source codes are made publicly available at https://github.com/ZhouYuCS/BTFL .