Using Federated Learning to Achieve Proactive Context-Aware IoT Environments


  • Rubén Rentero-Trejo University of Extremadura, Spain
  • Daniel Flores-Martín University of Extremadura, Spain
  • Jaime Galán-Jiménez University of Extremadura, Spain
  • José García-Alonso University of Extremadura, Spain
  • Juan Manuel Murillo University of Extremadura, Spain
  • Javier Berrocal University of Extremadura, Spain



Federated learning, mobile devices, context-aware, IoT


The Internet of Things (IoT) is more present in our daily lives than ever before, turning everyday physical objects into smart devices. However, these devices often need excessive human interaction before reaching their best performance, making them time-consuming and reducing their usability. Nowadays, Artificial Intelligence (AI) techniques are being used to process data and to find ways to automate different behaviours. However, achieving learning models capable of handling any situation is a challenging task, worsened by time training restrictions. This paper proposes a Federated Learning solution to manage different IoT environments and provide accurate predictions, based on the user’s preferences. To improve the coexistence between devices and users, this approach makes use of other users’ previous behaviours in similar environments, and proposes predictions for newcomers to the federation. Also, for existing participants, it provides a closer personalization, immediate availability and prevents most manual interactions. The approach has been tested with synthetic and real data and identifies the actions to be performed with 94% accuracy on regular users.


Download data is not yet available.

Author Biographies

Rubén Rentero-Trejo, University of Extremadura, Spain

Rubén Rentero-Trejo. Received the Bachelor’s degree in software engineering from the University of Extremadura in 2019, and the MSc in Computer Science Engineering in 2021. His main research interests include IoT, mobile computing and Deep Learning.

Daniel Flores-Martín, University of Extremadura, Spain

Daniel Flores-Martín. Is a Ph.D student at the University of Extremadura (Spain). His research interests are mobile computing, context-awareness, pervasive systems, crowd sensing and Internet of Things.

Jaime Galán-Jiménez, University of Extremadura, Spain

Jaime Galán-Jiménez. Received the Ph.D. in computer science and communications from the University of Extremadura in 2014. His main research interests are Software-Defined Networks, 5G network planning and design, and mobile ad-hoc networks.

José García-Alonso, University of Extremadura, Spain

José García-Alonso (IEEE Member) is an Associate Professor at the University of Extremadura. His research interests include software engineering, mobile computing, pervasive computing, eHealth, gerontechnology.

Juan Manuel Murillo, University of Extremadura, Spain

Juan Manuel Murillo (IEEE Member) is a full professor at the University of Extremadura. His research interests include software architectures, mobile computing, and cloud computing.

Javier Berrocal, University of Extremadura, Spain

Javier Berrocal (IEEE Member) is an Associate Professor at the University of Extremadura. His main research interests are software architectures, mobile computing and edge and fog computing.


Information – The ONE.

Musaab Alaa, A. Zaidan, Bilal Bahaa, Mohammed Talal, and Miss Laiha Mat Kiah. A review of smart home applications based on Internet of Things. In JNCA, nov 2017.

H. Arasteh, V. Hosseinnezhad, V. Loia, A. Tommasetti, O. Troisi, M. Shafie-khah, and P. Siano. Iot-based smart cities: A survey. In IEEE-EEEIC’16, pages 1–6, 2016.

Manoj Ghuhan Arivazhagan, V. Aggarwal, A. Singh, and S. Choudhary. Federated learning with personalization layers. ArXiv, abs/1912.00818, 2019.

Diane J. Cook, Michael Youngblood, and Sajal K. Das. A Multi-agent Approach to Controlling a Smart Environment, pages 165–182. Springer Berlin Heidelberg, 2006.

Y. Deng, M. M. Kamani, and M. Mahdavi. Adaptive personalized federated learning. ArXiv, 2020.

Google Inc. Measure app performance with Android Profiler., oct 2020.

Google Inc. Profile battery usage with Batterystats and Battery Historian., jan 2021.

Filip Hanzely and Peter Richtárik. Federated learning of a mixture of global and local models. ArXiv, abs/2002.05516, 2020.

Juan Luis Herrera, Paolo Bellavista, Luca Foschini, Jaime Galán-Jiménez, Juan M Murillo, and Javier Berrocal. Meeting stringent qos requirements in iiot-based scenarios. In IEEE GLOBECOM 2020, pages 1–6. IEEE, 2020.

Kevin Hsieh, Amar Phanishayee, Onur Mutlu, and Phillip B. Gibbons. The non-iid data quagmire of decentralized machine learning. In ICML, 2020.

M. Kabir, M. R. Hoque, and Sung-Hyun Yang. Development of a smart home context-aware application: A machine learning based approach. IJSH, 9:217–226, 2015.

S. P. Karimireddy, S. Kale, M. Mohri, Sashank J. Reddi, Sebastian U. Stich, and A. T. Suresh. Scaffold: Stochastic controlled averaging for federated learning. In ICML, 2020.

Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. In ICLR, 2020.

Knud Lasse Lueth. State of the IoT 2020: 12 billion IoT connections., nov 2020.

Y. Mansour, M. Mohri, Jae Ro, and A. T. Suresh. Three approaches for personalization with applications to federated learning. ArXiv, abs/2002.10619, 2020.

H. McMahan, E. Moore, D. Ramage, and B. Agüera y Arcas. Federated learning of deep networks using model averaging. ArXiv, abs/1602.05629, 2016.

N. Nascimento, P. Alencar, C. Lucena, and D. Cowan. A context-aware machine learning-based approach. In CASCON, 2018.

D. C. Nguyen, M. Ding, P. N. Pathirana, A. Seneviratne, J. Li, and H. V. Poor. Federated learning for internet of things: A comprehensive survey. IEEE COMST, pages 1–1, 2021.

Nitika Nigam, Tanima Dutta, and Hari Gupta. Impact of noisy labels in learning techniques: A survey. In ICDIS 2019 LNNS, pages 403–411. Springer Singapore, 2020.

S. O’Dea. Smartphone users 2020., dec 2020.

C. Reinisch, M. J. Kofler, and W. Kastner. Thinkhome: A smart home as digital ecosystem. In IEEE-DEST 2010, pages 256–261, 2010.

Padraig Scully. Top 10 IoT applications in 2020., jul 2020.

R. Shokri and V. Shmatikov. Privacy-preserving deep learning. In Allerton (2015), pages 909–910, 2015.

K. Wang, R. Mathews, C. Kiddon, H. Eichner, F. Beaufays, and D. Ramage. Federated evaluation of on-device personalization. ArXiv, abs/1910.10252, 2019.

Kai Wehmeyer. Assessing users’ attachment to their mobile devices. In ICMB 2007, pages 16–16, 08 2007.

Qiong Wu, Kaiwen He, and Xu Chen. Personalized federated learning for intelligent iot applications: A cloud-edge based framework. IEEE OJ-CS, 1:35–44, 2020.

T. Yang, G. Andrew, H. Eichner, H. Sun, W. Li, N. Kong, D. Ramage, and F. Beaufays. Applied federated learning: Improving google keyboard query suggestions. ArXiv, 2018.

Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, and Vikas Chandra. Federated learning with non-iid data. arXiv, 2018.

Allen Zhu. Learning From Non-IID data., 2020.