FedAvg for HAR: Balancing Personalization and Generalization

Discover how FedAvg balances personalized and generalized accuracy in human activity recognition. Key results and stress scenarios.

martes, 7 de julio de 2026 • 2 min read • Q2BSTUDIO Team

Exploring the Balance in Federated Models for HAR

Federated Learning (FL) has emerged as a key paradigm for training artificial intelligence models without centralizing sensitive data, combining privacy and computational efficiency. One of its most promising applications is human activity recognition (HAR), where sensor data from mobile devices or wearables is used to identify movement patterns. In this context, the FedAvg (Federated Averaging) algorithm has become the standard due to its ability to balance personalization and generalization, but its behavior under changing class distribution conditions —such as an abrupt shift in the predominant activity of clients— remains an open challenge. Recent research shows that, although FedAvg achieves high personalization while maintaining good generalization compared to traditional centralized learning, this balance becomes fragile when data distributions vary significantly among clients. This has direct implications for real-world applications, such as virtual assistants or health monitoring systems, where models must adapt to new users or changes in their routines without sacrificing overall performance. For companies seeking to implement AI solutions for businesses, understanding these trade-offs is crucial when designing custom software architectures that integrate artificial intelligence. At Q2BSTUDIO, we work on developing AI agents that operate on AWS and Azure cloud service infrastructures, enabling clients to deploy federated models with high availability and scalability. Additionally, cybersecurity is a fundamental pillar in these environments, as the transmission of parameters between client and server must be protected against potential attacks. Our custom application services include integrating business intelligence services such as Power BI to visualize model performance metrics in real time. Experimentation with FedAvg in HAR demonstrates that, while the algorithm offers an acceptable compromise between personalization and generalization in stable scenarios, accuracy can degrade in non-trivial ways when class distribution changes —such as a sudden increase in sedentary activity among a group of users. This reinforces the need for custom applications that incorporate change detection and adaptive retraining mechanisms, an area where the combination of artificial intelligence and software development expertise is indispensable. Ultimately, federated learning is not a one-size-fits-all solution but an ecosystem requiring continuous adjustments, and having a technology partner like Q2BSTUDIO allows organizations to navigate this balance effectively.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.