Submitted:
19 September 2026
Posted:
20 September 2026
You are already at the latest version
Abstract
Background: College mental health screening relies almost exclusively on self-report questionnaires, which are vulnerable to recall bias, impression management, and administrative burden. Digital phenotyping, the measurement of behavior through human-computer interaction, offers complementary, passively collected signals, yet few systems integrate it with validated screening scales in a privacy-conscious way. Because the required sensors, the computer mouse and the webcam, are already standard on screening workstations, objective behavioral measurement can be added without any new peripherals such as EEG headsets or wristbands, at near-zero hardware cost. We present PsyTrace, a privacy-aware, local-first platform that integrates a multi-scale self-report battery with unobtrusive behavioral sensing to support counseling-center screening workflows. Methods: PsyTrace is implemented as a Tauri 2 (Rust + WebView) desktop application with a Next.js 14 / TypeScript user interface. Assessment methodology comprises built-in validated scales (PHQ-9, GAD-7, C-SSRS, PSS-10, PSQI, SIAS-6, ASLEC) plus locally uploaded custom scales, a four-tier risk taxonomy with per-scale adjustable thresholds. Behavioral sensing captures mouse trajectories throughout the questionnaire (14 kinematic features, 5 heuristic signals), and a camera feed at 320*240. Results: The full screening workflow, informed consent, silent sensing, four-tier risk classification, per-scale risk dashboards, exploratory correlation analytics, and privacy-aware report export, is demonstrated end-to-end. Engineering verification includes successful type-checking, a production build, and 26 DOM-level smoke tests. Conclusions: PsyTrace demonstrates a feasible engineering foundation for multimodal, privacy-preserving college mental health screening. Running on ubiquitous hardware with no additional peripherals, it is also a low-cost, easily promotable screening infrastructure. It is a research prototype, not a diagnostic device: calibration of heuristic thresholds and clinical validation with longitudinal cohorts are required next steps. The software is fully open source, and the complete source code is available on GitHub (github.com/GuoXiang9399/PsyPlat).
Keywords:
digital phenotyping
; mouse dynamics
; mental health screening
; college students
; behavioral sensing
; privacy-preserving platform
Introduction
Mental disorders are among the most prevalent health problems in higher education. Cross-national estimates from the WHO World Mental Health Surveys International College Student Project indicate that roughly one in three first-year college students screens positive for at least one common mental disorder, with mood, anxiety, and substance-use conditions dominating the distribution [1]. The WHO further Globally, one in seven 10–19-year-olds experiences a mental disorder, accounting for 15% of the global burden of disease in this age group [2]. Counseling centers therefore conduct routine screening at scale, and the timeliness of detection, before crises such as suicidal ideation escalate, is a first-order operational concern.
Standard screening instruments, including the PHQ-9 [3] and GAD-7 [4], are brief, validated, and widely adopted, yet they inherit the intrinsic limits of self-report: recall error over the reference window, social-desirability bias, and reduced validity in low-effort responding. In parallel, the concept of digital phenotyping, the moment-by-moment quantification of individual behavior from the data produced by human–computer interaction, has matured as a complement to clinical scales [5,6]. Passive behavioral streams (keystroke and mouse dynamics, speech, mobility) have been shown to carry information about mood, psychomotor state, and engagement, motivating their incorporation into screening platforms [5,6]. Importantly, the sensors needed for such measurement, the pointing device and the webcam, are already ubiquitous on screening workstations: unlike EEG headsets or smart wristbands, no dedicated wearable or new peripheral is required, so the marginal hardware cost of adding objective measurement is effectively zero. Because these streams are produced by the respondent’s actual interaction rather than by retrospective recall, they constitute an objective complement to questionnaire scores, mitigating the self-report biases noted above.
However, most existing platforms are server-centric: questionnaire data, behavioral streams, and video recordings transit a remote backend, raising privacy concerns that are especially acute for mental-health data and for sensitive sub-populations such as suicidal ideation screening. Furthermore, few systems couple a complete screening workflow, consent, unobtrusive sensing, multi-scale risk classification, case management, and report export, inside one coherent application.
We designed PsyTrace to close this gap. The platform (i) keeps all personal data local on the device by default; (ii) layers mouse-dynamics and camera sensing onto an existing validated scale battery without changing the respondent’s interaction model; (iii) exposes a transparent, threshold-configurable four-tier risk model; and (iv) provides bilingual (Chinese/English) interfaces for global deployment.
Results
System Design and Architecture
PsyTrace is a desktop application built with Tauri 2, whose Rust core hosts the system services and a WebView rendering the Next.js 14 / TypeScript front end. The front end is organized into seven route modules, Overview, Assessment, Assessment Setup, Data Management, Analysis, Settings, and About, sharing a common shell and language-aware sidebar. The Rust layer exposes an IPC bridge (Tokio async runtime), an embedded SQLite store for assessment records and settings, and interface contracts for OpenCV-based facial detection and HRV analysis. Camera video captured during assessment is persisted to IndexedDB in the WebView as WebM files. Every assessment record bundles questionnaire answers, per-scale scores, risk labels, mouse trajectory, derived behavior metrics and signals, camera mode, and video references. Records are written transactionally on completion and remain queryable for the analysis workbench. The same local store holds assessment settings (enabled scales, thresholds, custom scales), guaranteeing that configuration and data stay co-located on the device.
Scales
PsyTrace ships with built-in validated scales covering the principal domains of a college screening intake: depression (PHQ-9 [3,7]), generalized anxiety (GAD-7 [4,8]), suicidal risk (C-SSRS [9]), perceived stress (PSS-10 [10,11]), sleep quality (PSQI [12]), social interaction anxiety (SIAS [13,14]), and negative life events (ASLEC [15]). Administrators may enable or disable each scale independently and upload additional custom scales from JSON or TXT files. Each scale is scored independently into a four-tier risk label, low, mild, moderate, high, against its thresholds.
Behavioral Sensing and Feature Engineering
(1) Mouse-trajectory collection
The sensing modalities were chosen for pervasiveness: the computer mouse and the webcam are present on virtually every screening workstation. PsyTrace therefore captures objective behavioral data with zero additional hardware. During questionnaire answering, the platform samples pointer position (x, y) with timestamps on every movement and records click events. The raw stream is compressed into a trajectory of points and consumed by the feature extractor; the same stream is visualized in Data Management for staff inspection.
(2) Behavioral signal heuristics
Rather than a black-box classifier, PsyTrace maps features to five interpretable signals using explicit rules grounded in the clinical literature, psychomotor slowing in depression [16], indecision, attentional fluctuation, and fine-motor instability. Each signal carries a plain-language label and an explicit advisory (e.g., “suggest review”), making the output usable by non-technical staff while remaining transparently inspectable.
(3) Camera capture and degraded mode
With consent, the camera records the answer session at 320×240 into WebM files in IndexedDB. If permission is denied, no camera exists, or the 8 s authorization times out, the session runs in degraded mode: assessment continues normally and the record stores cameraMode = degraded with no video. An in-app calibration panel lets administrators verify permission, stream, and fallback behavior against a real capture, mirroring the exact session logic.
Data Management, Analysis, and Export
(1) Record dashboard and per-scale risk
Data Management presents every record with all per-scale scores and independent risk labels in a sortable table, plus search and multi-dimension filtering (overall risk and each scale’s risk). A detail view reconstructs the full answer sheet, the warning summary, behavior metrics, and the raw mouse trajectory rendered as an SVG path with start/end markers.
(2) Exploratory analysis workbench
The Analysis module supports targetable analysis over selected records: sample composition by risk and camera mode; per-scale risk distributions; trajectory-feature distributions; behavior-signal × risk-level cross-tabulation; scale–trajectory correlation heatmaps; and camera-status × scale-score comparisons. These visualizations are explicitly heuristic (“exploratory analysis for staff reference, not clinical diagnosis”) and render without external charting dependencies.
(3) Export with privacy modes
Exports support CSV, JSON, and self-contained HTML reports, each with a privacy-masking toggle that de-identifies student IDs and personal fields. Video can be exported as independent WebM files with an explicit handling warning, since recordings contain facial imagery. Per-record HTML reports are generated for individual case review, with the same privacy toggle.
(4) Interpretation caveat
Risk labels, behavioral signals, and correlation analyses produced by PsyTrace are heuristic and advisory. They are intended to prioritize staff review, not to render clinical judgments; any service decision requires professional evaluation of the full record.
Engineering Evaluation and Demonstration
(1) Verification suite
The front end passes strict TypeScript checking (tsc --noEmit) and a production next build. A DOM-level smoke-test harness exercises the critical paths, section switching, selection-count changes, report export for single- and multi-record cases, PDF print flow, per-record report modals, and language switching, all 26 assertions passing with no undefined or NaN artifacts. The i18n layer maintains 545+ keys across Chinese and English, and the document title and meta description update with the active language.
(2) Demonstration dataset
A demonstration dataset of anonymized records covers the full risk spectrum, including C-SSRS-positive (suicide-flag), plus realistic mouse trajectories with embedded behavioral signals. This dataset drives every module of the platform and doubles as acceptance fixtures for the smoke tests.
(3) End-to-end workflow demonstration
The demonstrated flow is: administrator enables scales and adjusts thresholds → respondent completes basic info, consents, and answers the battery (with mouse sampling and camera capture) → the record is archived with per-scale risks and signals → staff filter, inspect, and export privacy-masked reports or a PDF. The complete flow runs locally with zero network dependencies.
Discussion
PsyTrace occupies a specific niche among digital phenotyping platforms: synchronous, in-office screening rather than longitudinal smartphone observation. Compared with server-centric screening suites, its local-first storage directly addresses the disclosure risk that is amplified when mental-health data, particularly suicide-risk indicators, are transmitted and stored remotely. The architecture also reduces deployment cost: no backend provisioning is required for a counseling center, and data retention is governed by local policy.
The deployment economics of the platform are unusually favorable for a digital-phenotyping system. Because it requires no dedicated hardware, the mouse and webcam are already present, and no server infrastructure, the incremental cost of a screening station is effectively the cost of the software itself; this combination of zero marginal hardware cost and local-first operation makes the system straightforward to promote across resource-constrained university counseling centers. The sensor streams also play an important epistemic role: they are generated by the respondent’s real-time interaction rather than by retrospective recall, so they offer an objective complement to questionnaire scores, flagging low-effort responding, psychomotor slowing, or hesitation that self-report alone would conceal.
The most important limitation is the absence of clinical validation. Thresholds and signal rules are heuristic defaults; their sensitivity and specificity against structured clinical interviews are unknown. Second, behavioral signals are session-level and may reflect device, desk ergonomics, or transient state rather than stable traits, a confound that only longitudinal within-subject designs can resolve. Third, camera-based recording, even consent-based and local-only, carries residual privacy and social-acceptability risk; the degraded-mode path mitigates but does not eliminate it. Fourth, the current evaluation is an engineering demonstration with synthetic acceptance data, not a field trial.
Future work proceeds along three tracks: (1) a longitudinal cohort study comparing PsyTrace risk labels and behavioral signals against clinician-administered gold standards to calibrate thresholds and report real accuracy; (2) an incremental machine-learning fusion layer over the existing feature set, with explainability constraints; and (3) deployment engineering, remote consent management, encrypted backup, and institutional integration. An open question is whether synchronous sensing at screening time carries incremental validity beyond the scales themselves; the correlation workbench in PsyTrace is designed to make exactly this question answerable with collected data.
Conclusion
We presented PsyTrace, a privacy-aware, local-first platform that integrates an multi-scale screening battery with unobtrusive behavioral sensing for college mental health. Its contributions lie in a deployable architecture that keeps sensitive data on-device, a compact and interpretable mouse-dynamics feature and signal set, and an exploratory analysis workbench for counseling staff. The system is a validated engineering prototype with a complete demonstration; the decisive next step is clinical validation with longitudinal cohorts, for which the platform’s data and export infrastructure are already prepared.
Funding
None.
Acknowledgments
None.
Competing Interests
The authors declare that they have no competing interests.
Ethics approval and consent to participate
Not applicable.
Declaration of generative AI and AI-assisted technologies
During the preparation of this manuscript, the authors used GLM 5.3 to assist with design and coding of Software PsyTrace. The authors subsequently reviewed and edited the output and take full responsibility for the final content of the manuscript.
Consent for publication
Not applicable.
Availability of data and materials
The software is fully open source, and the complete source code is available on GitHub (github.com/GuoXiang9399/PsyPlat).
References
- Auerbach, R.P.; Mortier, P.; Bruffaerts, R.; Alonso, J.; Benjet, C.; Cuijpers, P.; et al. WHO World Mental Health Surveys International College Student Project: Prevalence and distribution of mental disorders. J. Abnorm Psychol. 2018, 127(7), 623–638. Available online: https://www.ncbi.nlm.nih.gov/pubmed/30211576. [CrossRef] [PubMed]
- Organization WH: Mental Health of Adolescents. 2025. Available online: https://www.who.int/news-room/fact-sheets/detail/adolescent-mental-health.
- Kroenke, K.; Spitzer, R.L.; Williams, J.B. The PHQ-9: validity of a brief depression severity measure. J. Gen. Intern Med. 2001, 16(9), 606–613. Available online: https://www.ncbi.nlm.nih.gov/pubmed/11556941. [CrossRef] [PubMed]
- Spitzer, R.L.; Kroenke, K.; Williams, J.B.; Lowe, B. A brief measure for assessing generalized anxiety disorder: the GAD-7. Arch. Intern Med. 2006, 166(10), 1092–1097. Available online: https://www.ncbi.nlm.nih.gov/pubmed/16717171. [CrossRef] [PubMed]
- Insel, T.R. Digital Phenotyping: Technology for a New Science of Behavior. JAMA 2017, 318(13), 1215–1216. Available online: https://www.ncbi.nlm.nih.gov/pubmed/28973224. [CrossRef] [PubMed]
- Onnela, J.P.; Rauch, S.L. Harnessing smartphone-based digital phenotyping to enhance behavioral and mental Health. Neuropsychopharmacology 2016, 41(7), 1691–1696. Available online: https://www.ncbi.nlm.nih.gov/pubmed/26818126. [CrossRef] [PubMed]
- Wang, W.; Bian, Q.; Zhao, Y.; Li, X.; Wang, W.; Du, J.; et al. Reliability and validity of the Chinese version of the Patient Health Questionnaire (PHQ-9) in the general population. Gen. Hosp. Psychiatry 2014, 36(5), 539–544. Available online: https://www.ncbi.nlm.nih.gov/pubmed/25023953. [CrossRef] [PubMed]
- Lin, Q.; Bonkano, O.; Wu, K.; Liu, Q.; Ali Ibrahim, T.; Liu, L. The value of Chinese Version GAD-7 and PHQ-9 to screen anxiety and depression in Chinese outpatients with atypical chest pain. Ther. Clin. Risk Manag. 2021, 17, 423–431. Available online: https://www.ncbi.nlm.nih.gov/pubmed/34040380. [CrossRef] [PubMed]
- Posner, K.; Brown, G.K.; Stanley, B.; Brent, D.A.; Yershova, K.V.; Oquendo, M.A.; et al. The Columbia-Suicide Severity Rating Scale: initial validity and internal consistency findings from three multisite studies with adolescents and adults. Am. J. Psychiatry 2011, 168(12), 1266–1277. Available online: https://www.ncbi.nlm.nih.gov/pubmed/22193671. [CrossRef] [PubMed]
- Cohen, S.; Kamarck, T.; Mermelstein, R. A global measure of perceived stress. J. Health Soc. Behav. 1983, 24(4), 385–396. Available online: https://www.ncbi.nlm.nih.gov/pubmed/6668417. [CrossRef]
- Leung, D.Y.; Lam, T.H.; Chan, S.S. Three versions of Perceived Stress Scale: validation in a sample of Chinese cardiac patients who smoke. BMC Public Health 2010, 10, 513. Available online: https://www.ncbi.nlm.nih.gov/pubmed/20735860. [CrossRef] [PubMed]
- Buysse, D.J.; Reynolds, C.F.; 3rd Monk, T.H.; Berman, S.R.; Kupfer, D.J. The Pittsburgh Sleep Quality Index: a new instrument for psychiatric practice and research. Psychiatry Res. 1989, 28(2), 193–213. Available online: https://www.ncbi.nlm.nih.gov/pubmed/2748771. [CrossRef] [PubMed]
- Mattick, R.P.; Clarke, J.C. Development and validation of measures of social phobia scrutiny fear and social interaction anxiety. Behav. Res. Ther. 1998, 36(4), 455–470. Available online: https://www.ncbi.nlm.nih.gov/pubmed/9670605. [CrossRef] [PubMed]
- Ye, D.; Qian, M.; Liu, X.; Chen, X. Revision of social interaction anxiety scale and social phobia scale. Chin. J. Clin. Psychol. 2007, 15(2), 115–117. [Google Scholar]
- Liu, X.; Liu, L.; Yang, J.; Chai, F.; Wang, A.; Sun, L.; et al. The adolescent self-rating life events checklist and its reliability and validity. Chin. J. Clin. Psychol. 1997, 5 1, 34–36. [Google Scholar]
- Zai, C.C.; Manchia, M.; De Luca, V.; Tiwari, A.K.; Squassina, A.; Zai, G.C.; et al. Association study of BDNF and DRD3 genes in schizophrenia diagnosis using matched case-control and family based study designs. Prog. Neuropsychopharmacol. Biol. Psychiatry 2010, 34(8), 1412–1418. Available online: https://www.ncbi.nlm.nih.gov/pubmed/20667458. [CrossRef] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.