Abstract
Previous works on depression detection use datasets collected in similar environments to train and test the models. In practice, however, the train and test distributions cannot be guaranteed to be identical. Distribution shifts can be introduced due to variations such as recording environment (e.g., background noise) and demographics (e.g., gender, age, etc). Such distributional shifts can surprisingly lead to severe performance degradation of the depression detection models. In this paper, we analyze the application of test-time training (TTT) to improve robustness of models trained for depression detection. When compared to regular testing of the models, we find TTT can significantly improve the robustness of the model under a variety of distributional shifts introduced due to: (a) background-noise, (b) gender-bias, and (c) data collection and curation procedure (i.e., train and test samples are from separate datasets).
Introduction
Depression detection from speech is a promising tool for early screening, offering a non-invasive way to monitor mental health. However, these models often suffer from a "fragility" problem when deployed in real-world scenarios. Most models are trained on clean, high-quality recordings from specific demographics, but real-world usage involves diverse recording environments—like a noisy cafe—and varied speaker characteristics. These differences, known as distribution shifts, can cause a model that performs well in a lab to fail significantly in practice. The core challenge is making these models robust without needing to collect and label massive datasets for every possible scenario.
Methods: Test-Time Training with Masked Autoencoders
To address this, we introduce TTT-MAE, a framework that utilizes Test-Time Training (TTT) to adapt models to new environments on the fly. The architecture consists of a Y-shaped network with a shared Audio Masked Autoencoder (AudioMAE) encoder.
The model operates in two main phases:
- Train-Time Training: The model is first trained on labeled data to recognize depression using one branch of the network, while the other branch learns a self-supervised "pretext" task: reconstructing missing pieces of an audio spectrogram.
- Test-Time Training: When a new, unlabeled test sample arrives, the model performs a brief adaptation session on that specific sample. It masks a large portion (e.g., 80%) of the sample's spectrogram and updates the encoder's weights to minimize the reconstruction error. By learning to reconstruct the specific noise profile or vocal characteristics of that single sample, the encoder adapts its internal representations before making a final depression prediction.
Experimental Setup
The study utilized three primary resources:
- CLDD (Clinically Labelled Depression Dataset): An internal dataset of 559 participants with MADRS (Montgomery-Asberg Depression Rating Scale) scores.
- DAIC-WOZ: A standard public benchmark containing clinical interviews and PHQ-8 scores.
- MS-SNSD (Microsoft Scalable Noisy Speech Dataset): Used to synthetically add various background noises (e.g., Babble, Traffic, Living Room) to evaluate robustness.
Key Insights and Results
A critical finding is that self-supervision serves as an effective proxy for environmental adaptation. A model doesn't need a depression label to learn about its current acoustic environment; reconstructing a noisy signal naturally forces the encoder to account for that noise.
As shown in the figure above, just a few gradient steps (around 20) at test time lead to significant performance gains. This instance-based adaptation is highly suitable for privacy-sensitive mobile health applications, as it requires only a single test sample to function.
Performance across Distributional Shifts
- Noise Robustness: Under various background noises (at 5 dB SNR), AudioMAE-TTT achieved an average F-score of 59.5, outperforming standard AudioMAE (51.3) and other self-supervised models like WavLM (52.7).
- Gender Bias: In scenarios where a model trained on female speakers was tested on males, TTT improved the F-score from 49.6 to 63.1.
- Cross-Dataset Generalization: When training on the internal CLD dataset and testing on the public DAIC-WOZ dataset, TTT improved the F-score from 39.4 to 48.7.
Conclusion
Test-time training offers a powerful mechanism for improving the robustness of depression detection models against real-world distribution shifts. While it introduces some computational overhead per test sample, the gains in accuracy across noise, gender, and dataset variations are substantial. Future work will focus on optimizing the efficiency of these test-time updates for real-time deployment on mobile devices.
Summary updated