Applying Anomaly Detection Methods to Google Search Logs to Detect Periods Preceding Suicide Attempts (Preprint)
Abstract
BACKGROUND Suicide is a major global public health concern and a leading cause of death worldwide. However, timely identification of individuals at elevated risk remains challenging. Traditional suicide risk assessment relies heavily on self-report and structured screening tools, which are often limited by infrequent monitoring, social stigma surrounding mental health issues, and restricted access to mental health services. As individuals increasingly rely on web search engines for everyday information seeking, personal search data offer a unique opportunity to capture signals related to suicide risk. OBJECTIVE This study aimed to quantitatively evaluate the utility of personal Google search logs for detecting periods preceding suicide attempts using anomaly detection methods. METHODS A subset of personal Google search data collected in a retrospective-prospective study, focusing on 80 adult participants who reported suicide attempt dates (n=111) with sufficient detail to enable identification of high-risk periods, was used for analysis. Neural language representation techniques were developed to calculate a proximity score between each search query and constructs representing known suicide warning signs, reflecting search behavior related to suicide risk. The semantic feature construction framework, consists of initial proximity based filtering on query-construct relatedness by a smaller-scale language model and further adjudication by a state-of-the-art large language model (Llama 3.1), was feasible for application to large-scale web search data. Anomaly detection methods were applied to semantic and behavioral features of search activity to identify time periods (14 days) preceding the suicide attempts. Models were trained on search data more than 6 months prior to the attempt and evaluated over the 180 days preceding and including the attempt date. The ROC AUC score was used to evaluate how effectively the model distinguished attempt periods from non-attempt periods. RESULTS The majority of analyzed suicide attempts were effectively distinguished from non-attempt periods. The best-performing anomaly detection model achieved a median ROC AUC score of 0.75 across attempts. Individually trained models outperformed generalized models trained on normative data from all participants. Semantic features that characterized search content’s relatedness to constructs contributed more substantially to the anomaly detection performance than behavioral features. Substantial differences in search feature importance were observed across participants, while consistent feature importance was found within the attempt histories of the same participant. Results from the ablation study demonstrated the utility of large language models in adjudicating the validity of construct-to-search relationships. CONCLUSIONS This study showed that personal Google search logs can be a valuable resource for suicide risk detection. The proposed framework has the potential to support the development of automated suicide risk detection tools for more timely identification of individuals at elevated risk.
Fields of Study & Subjects
Mental Health via Writing
Suicide and Self-Harm Studies
Data-Driven Disease Surveillance
Publication details
- Publication date
- 10 February 2026
- Language
- EN
- Document type
- Preprint