On-device Federated Learning in Smartphones for Detecting Depression from Reddit Posts
Mustofa Ahmed, Abdul Muntakim, Nawrin Tabassum, Mohammad Asifur Rahim, Faisal Muhammad Shah
TL;DR
This paper demonstrates on-device Federated Learning for depression detection from Reddit posts on smartphones, comparing GRU, RNN, and LSTM architectures with a common tokenizer to preserve privacy and reduce computation. The authors implement a practical FL pipeline using Firebase for parameter exchange and Chaquopy to run Python on Android, and they evaluate resource usage, communication costs, and model performance under IID and non-IID data distributions. Federated GRU achieves competitive accuracy close to a centralized baseline, highlighting the viability of privacy-preserving mental health prediction on edge devices, with 66% accuracy reported for the best federated model. The work provides a blueprint for deploying on-device NLP FL systems and discusses limitations and directions for enhancement, including personalization and differential privacy to strengthen privacy guarantees.
Abstract
Depression detection using deep learning models has been widely explored in previous studies, especially due to the large amounts of data available from social media posts. These posts provide valuable information about individuals' mental health conditions and can be leveraged to train models and identify patterns in the data. However, distributed learning approaches have not been extensively explored in this domain. In this study, we adopt Federated Learning (FL) to facilitate decentralized training on smartphones while protecting user data privacy. We train three neural network architectures--GRU, RNN, and LSTM on Reddit posts to detect signs of depression and evaluate their performance under heterogeneous FL settings. To optimize the training process, we leverage a common tokenizer across all client devices, which reduces the computational load. Additionally, we analyze resource consumption and communication costs on smartphones to assess their impact in a real-world FL environment. Our experimental results demonstrate that the federated models achieve comparable performance to the centralized models. This study highlights the potential of FL for decentralized mental health prediction by providing a secure and efficient model training process on edge devices.
