Prof. Dr.-Ing. Bert Arnrich

Personalised Sensor-Based OCD Detection Using Federated Learning

Master Thesis

Lando Löper, Supervisors: Kristina Kirsten, Bjarne Pfitzner


Obsessive compulsive disorder (OCD) is a chronic mental health disorder, characterised by the presence of obsessions (intrusive and persistent thoughts, urges, or images) and compulsions (repetitive behaviours or mental acts performed in response to an obsession) [1]. Whereas the severity of OCD may vary from person to person, it is associated with reduced quality of life and ranked in the top ten of the most disabling illnesses by the World Health Organisation [2]. Untreated, symptoms typically follow a chronic and episodic course, leading to functional impairment with long-term developmental consequences [3]. Given the high prevalence and significant cost associated with delayed treatment, people with OCD would benefit from advancements in early detection mechanisms motivating affected individuals to consider psychological and medical treatment.

A promising approach to early OCD detection emerged from the substantial progress in sensor-based human activity recognition. Recent research on its feasibility identified several challenges, most notably the high degree of individuality in the manifestations of symptoms and the relevance of contextual information. Depending on the context and individual, they may experience one or more of the listed compulsions or develop other coping mechanisms to deal with the obsession. As an alternative to learning a single OCD detection model, each individual could be regarded as a distinct learning task in its own right. This way, a personalised OCD detection model is learned for every individual separately. The emphasis on personalisation, however, requires the availability of considerable amounts of person-specific data, especially when learning deep neural networks. Recent proposals of hybrid approaches aim to overcome the need for large amounts of person-specific data with a trade-off between general and personalised model training. Promising hybrid candidates have emerged from the research in personalisation of meta-learning and federated learning. Whereas both techniques may be equally suitable for model personalisation, federated learning encourages a more conscientious treatment of confidential data, making it the preferable choice for digital healthcare applications.


To overcome the challenges current sensor-based OCD detection approaches face, we propose to leverage personalised federated learning. Accordingly, this work’s main contribution lies in evaluating the suggested method, focusing on the conceptual trade-off between generalisation and personalisation. The high-level idea is to compare the performance of the personalised federated learning algorithm against a number of reasonable baselines with the OPPORTUNITY Activity Recognition Data Set [4]. As a first step, we construct our own labeled dataset of sensor readings based on OPPORTUNITY but preprocessed to mirror real-life OCD sensor data, ready to train binary classifiers. Addressing the exploration of the generalisation vs. personalisation trade-off, we select our baseline algorithms to resemble the two extrema on the personalisation spectrum: (1) A model trained on the complete dataset, disregarding personalisation altogether, and (2) multiple models trained on personal data only.


[1] American Psychiatric Association. “American Psychiatric Association’s Diagnostic and statistical manual of mental disorders (DSM-V)”.

[2] David Veale and Alison Roberts. “Obsessive-compulsive disorder”. In: Bmj 348 (2014), g2183

[3] Ch Wewetzer et al. “Long-term outcome and prognosis of obsessive–compulsive disorder with onset in childhood or adolescence”. In: European child & adolescent psychiatry 10.1 (2001), pp. 37–46.

[4] Daniel Roggen et al. “Collecting complex activity datasets in highly rich networked sensor environments”. In: 2010 Seventh international conference on networked sensing systems (INSS). IEEE. 2010, pp. 233–240.