Utilizing passive sensing data to provide personalized psychological care in low-resource settings [version 1; peer review: awaiting peer review]

Background: With the growing ubiquity of smartphones and wearable devices, there is an increased potential of collecting passive sensing data in mobile health. Passive data such as physical activity, Global Positioning System (GPS), interpersonal proximity, and audio recordings can provide valuable insight into the lives of individuals. In mental health, these insights can illuminate behavioral patterns, creating exciting opportunities for mental health service providers and their clients to support pattern recognition and problem identification outside of formal sessions. In the Sensing Technologies for Maternal Depression Treatment in Low Resource Settings (StandStrong) project, our aim was to build an mHealth application to facilitate the delivery of psychological treatments by lay counselors caring for adolescent mothers with depression in Nepal. Methods: This paper describes the development of the StandStrong platform comprising the StandStrong Counselor application, and a cloud-based processing system, which can incorporate any tool that generates passive sensing data. We developed the StandStrong Counselor application that visualized passively collected GPS, proximity, and activity data. In the app, GPS data displays as heat maps, proximity data as charts showing the mother and child together or apart, and mothers’ activities as activity charts. Lay counselors can use the StandStrong application during counseling sessions to discuss mothers’ behavioral patterns and clinical progress Open Peer Review Reviewer Status AWAITING PEER REVIEW Any reports and responses or comments on the article can be found at the end of the article. Gates Open Research Page 1 of 9 Gates Open Research 2020, 4:118 Last updated: 06 AUG 2020


Introduction
New data collection techniques employing mobile technology are being explored worldwide to identify acceptable and safe ways of understanding human behavior that are non-invasive and do not interfere with daily activities. Data can be collected using mobile phone sensors such as accelerometers, digital cameras, microphones, Bluetooth sensors, and the Global Positioning System (GPS) 1 . Many health applications have explored the potential of using passive sensing data to record human activity and movement 2-5 .
This type of information has the potential to transform mental health care. Unlike diabetes, hypertension, and cardiac dysrhythmias, which can now be monitored during daily life using portable devices, there have not been objective measures of mental health that can be remotely monitored by mental health care providers. Passive sensing data collection can change this because information on physical activity, interpersonal interactions, sleep, movement within one's community, and other behavioral indicators of improving or worsening mental health status can be recorded. If this information can be unobtrusively and confidentially collected and shared with mental health workers, then treatment providers can tailor treatment to individual clients' needs and contexts. For example, if a mother were being treated for post-partum depression and the therapy goals included spending more time with one's infant or spending more time in social engagement and less time alone, then being able to monitor these behaviors could help a therapist identify when behavioral change was occurring or when barriers were encountered.
Having a window into a therapy client's behaviors is especially helpful in low resource settings where the person delivering the therapy may not have a mental health professional background and where clients may have low literacy rates, impeding traditional pen-and-paper approaches to monitoring one's behavioral change. There is a global push to increase the use of non-specialists to deliver psychological therapies-a process known as task-shifting or task-sharing mental health services-in order to reach the populations most in need in low resource settings around the world [6][7][8][9] .
It was against this backdrop of increased technological potential to use passive sensing on mobile devices and growing efforts to expand mental health services delivered by non-specialists that we developed the Sensing Technologies for Maternal Depression Treatment in Low Resource Settings (StandStrong) application for use with android smartphones. The concept of StandStrong is that applications on a depressed mother's smartphone can capture four types of information: a) the auditory environment, to measure social interactions through speech; b) movement, as a measure of physical activity versus sedentary behavior; c) GPS data, to assess movement throughout the community; and d) mother-infant proximity, as captured with a passive Bluetooth beacon.
We piloted the StandStrong platform in Nepal with a psychological treatment designed for use by non-specialists such as lay counselors or midwives. This intervention, the Healthy Activity Program (HAP) 10 , is a psychological treatment delivered by non-specialists to treat depressed patients. It is based on the psychological principle of behavioral action, which focuses on changing behaviors to reduce avoidance and inactivity in order to improve thoughts and feelings 11 . HAP was developed for depression treatment in India and has been successfully implemented in Nepal 9,11 . Recently, the Ministry of Health in Nepal has adopted HAP to be delivered by low-level health workers without prior training in mental health 12 . The pilot implementation of StandStrong was for HAP delivered to adolescent and young mothers with postpartum depression 12 .
This paper describes the implementation of this software with source code available on GitHub at https://github.com/mmhss (see Software availability).

Methods
The StandStrong platform development occurred in the context of a study conducted in Chitwan, a southern district of Nepal, between May 2018 and October 2019. The implementation was tailored to psychological treatment for depressed adolescent and young mothers (ages 15-25 years) with infants under 12 months of age. The study protocol for implementation and evaluation of StandStrong has been published 12 .

Implementation
Prior to the study, we developed an approach to capture passive sensing data that could be used by StandStrong platform. However, many freely available software tools, such as RADAR 13 and Passive Data Kit 14 , can be used to capture passive data from smart devices. In our current study, the StandStrong platform was designed for use with android smartphones to process the data collected through a passive data collection tool, and then provide visualizations of the data for a lay counsellor delivering the psychological treatment. The platform comprises freely available components, namely, TensorFlow service (TF-Audio), Scheduler (StandStrong ELT), web services (StandStrong REST API), Viber Webhook, and the Stand-Strong Counsellor App. Figure 1 shows the StandStrong Architecture with server locations and data flow. Each tool's source code and application hosted locations are summarized in the Software availability section and a full user guide is available as Extended data 15 .
Gathering passive sending data sources. Passive sensing data can be collected from smart devices such as smartphones and smartwatches through a variety of approaches. We had collected passive sensing data such as GPS, activity, proximity, and audio. Use of additional devices such as Bluetooth beacons along with smart devices can capture proximity data.
Preparing passive sensing data. For audio data, mp3 recordings are fed to the TensorFlow service to generate audio predictions such as speech, music, vehicles, insects and so on. TensorFlow is an open software framework for machine learning 16 , which we trained with YouTube human and environment sound models. The Amazon Web Services (AWS) S3 bucket is used for transferring files to the inbound folder in the cloud server. The scheduler job scans the incoming files periodically and loads them into the database. The web service in Heroku cloud provides the endpoints to access the data, which the StandStrong Counselor app gets for visualization. The platform also allows sending messages to and from a counselor and a mother using the popular Viber chat app.

Data visualization on the Counselor App. The StandStrong
Counsellor App is an android-based mobile application that retrieves data through the web service and stores it on the device. While developing the system, one of the considerations was limited access to the internet; therefore, the app was designed using the 'offline first' principle.
The StandStrong mobile app has the following features to provide visual representations of the passively collected data for counselor use: 1. A daily proximity bar chart displaying mother together with child, away from child and no data ( Figure 2).

3.
A daily activity chart displaying mother activities ( Figure 2).

4.
A messaging feature that allows mothers to use Viber and send messages to the counselor's StandStrong app.

5.
A feature to record mothers' weekly goals during the psychosocial counseling sessions.
6. Motivational award cards that deliver messages when behavioral goals and milestones are achieved.

StandStrong app in counselor's tablets.
Counselors can use the StandStrong app while providing counseling services to depressed adolescent mothers. The application's use is both preparatory (the counselor explores the mother's behavioral patterns to inform her session) and participatory (the counselor uses the visuals of the application with the mother to help discuss, identify, and set behavioral goals). We designed StandStrong for use with Samsung Galaxy Tab A7.0, which costs around $160 USD (purchased in Sept 2018) with accessories. The StandStrong app works on most android devices. However, we recommend a screen size of seven inches, RAM 1.5 GB, and Android 6.0 or higher. Figure 2 shows the proximity chart, GPS heat map, and activity chart for the participants. The proximity chart shows the time spent by the mother alone and with her child, the GPS heat map shows the locations where the mother spends her time, and the activity chart visualizes the mother's activities, such as standing and running, as recorded by the mobile phone throughout the day. The detailed operation of the StandStrong Counselor App is documented and provided as Extended data 15 .
Equipment. Three types of equipment are used in the study. Different approaches and combinations of devices are available to collect passive sensing data including phones, smartwatches, Bluetooth beacons. For StandStrong, the counselors use tablets to access the passive sensing data visualized in the StandStrong app and discuss the data with mothers in counseling sessions. Detailed specifications of the equipment can be found in Table 1.

Use cases
Below, we provide examples of input and output datasets, as well as two case studies to illuminate the platform's architecture and pragmatic use. Use case 1 describes how StandStrong would be implemented from a project director perspective. Use case 2 describes how StandStrong is used by a lay counselor providing psychological treatment to a depressed adolescent mother. Implementation of passive sensing data collection. Our first step was to identify what types of information could be collected using passive sensing on mobile devices that would be technologically feasible and culturally acceptable in Nepal 17 . Based on the feedback from users in prior studies, smartphones and Bluetooth beacons were considered the most appropriate tools for passive data collection in Nepal. In our prior study, we designed the Electronic Behavioral Monitoring (EBM) app, which can be installed on any android smartphone with Bluetooth version 4.0 to collect passive sensing data. EBM captures  the four domains of data: audio recordings, physical activity, GPS location, and proximity of the phone to a passive Bluetooth beacon (attached to the infant's clothing).
To ensure affordability in a low-resource setting, we explored low cost devices that could run our applications. We chose the Samsung J2 Ace phone, which costs around $114. The EBM app collects audio data in m4a format; GPS location, activity and proximity of Bluetooth beacon are saved in CSV format on the device. During pilot testing, project staff retrieved the passive sensing data from the device once a week. Each week, around 200 MB of data are generated including seven GPS files, seven activity files, seven proximity files and 280 m4a files.
Through the EBM app, GPS, activity, proximity and audio data are passively collected at 15-minute intervals on the mother's android smartphone and the information is stored locally on the smartphone as CSV, with the exception of audio files, which are m4a format. In EBM, the mobile phone's accelerometer sensor and Google library are required to return movement information (walking, in vehicle, cycling, running, still) to crudely track activity. Proximity data are collected each time the mobile Bluetooth searches for the Bluetooth beacon attached to the child's cloth. An audio clip of 30 seconds is collected every 15 minutes and saved to the phone. Finally, GPS location is recorded each time the mobile phone has some activity (screen on and off, phone calls and so on). When participants are enrolled, we provide a participant code so that generated data files are prefixed with the participant code, followed by the type of the data and date. The StandStrong platform is used by the counselor to visualize these data, as well as provide automated awards to the mother if she achieves behavioral targets.
Alternative passive data collections apps exist that could be used to collect the raw data for the StandStrong system. For example, the RADAR-base passive data collection app has the capability to capture data both on smartphones and smart watches 13 . The app provides access to a wide variety of sensors including positioning sensors, movement sensors and social sensors supporting bluetooth devices. Through a simple reformatting (e.g., using the StandStrong date format) collected data would be supported and usable by the StandStrong platform.
Input dataset. During pilot testing, passive sensing data were collected by the EBM app, generating a separate file for each sensing data type. The naming convention for the file has several pieces of information each separated by a dash (-) and underscore (_). It starts with the mother identification code, followed by the delimiter "-" before the passive sensing data type name, followed by underscore and lastly, the date (e.g. SSXXXX-GPS_20190x0x.txt, SSXXXX-PROXIMITY_20190 605.txt, SSXXXX-ACTIVITY_20190605.txt). The raw audio files captured by the EBM app are of around 30 seconds in length. On average, around 40 raw audio files (e.g. SSXXXX-EAR_201900x0x192732.m4a) are generated each day, which then are passed to the TensorFlow audio processor to generate the predictions. Tensorflow generates a CSV file (e.g. SSXXXX-AUDIO.csv) for weekly audio clips. The .csv file contains audio predictions that can be used for analysis.
When using the RADAR-base passive data collection app as an alternative to the EBM app, the collected data for different sensors require transformation to make it compatible with the StandStrong platform. For example, the collected data should be exported as csv following the file naming convention used by StandStrong.
Output dataset. The StandStong scheduler job loads the datasets into the "sstrong" database, which is implemented in the MySQL relational database system. The data transfer between the StandStrong components and database system is achieved by establishing a secured link. The first two database tables are configuration tables and named "project" and "mother". The "project" table must have a setting for an inbound folder, the location where passive data files are uploaded in the system. There must be a record for the mother with a unique identification number, which is required to map the data loaded into the tables named "GPS", "proximity", "activity", and "audio" for each mother. The database is the source providing daily information to the StandStrong Counselor App. The app gets the data through the web service, which is repeatedly synced to the database. During each attempt to sync, the app looks for new data added to the system.

Use case 1.
A project director interested in implementing Stand-Strong in the context of psychological treatment would begin by preparing for software installation on tablets for counselors and on mobile phones for mothers. Access to the components in the architecture is needed, namely, the EBM app, StandStrong Counselor App, servers and AWS S3 Storage. The installation guide and user manual are provided as Extended data 17 .
When participants (e.g. mothers) are enrolled, they are all given a unique ID for data management in the StandStrong platform, e.g. SS-XXXX. Following enrollment, project staff visit the mother and give them a Samsung J2 Ace phone with the EBM and RadBeacon Locate apps installed. The EBM app is configured with the mother identification number, enabled audio recordings, access to device's location and file system, and enabled motion, audio, proximity and phone interaction data sources ( Figure 3). The project staff ensure that GPS and mobile data are enabled for tracking GPS location. A Bluetooth beacon is attached to the infant's clothes. RadBeacon Locate, a utility app, is also installed in the smartphone. In the case of EMB, the app is used to confirm that the signal from the proximity beacon is received by the phone. The EBM app could be used at any time to see if the beacon is working or not. The mother's information is then recorded in the database so that the passive data can be loaded into the system. This can be set up, either by inserting a new record directly through the SQL query or through the endpoints.
At the end of a week of passive data collection, the project staff visit the mother's home to download the passive data that are saved in a folder named Namaste in the mother's phone  ( Figure 4). The data are uploaded into a secured database with a week number identification for backup. Each of the passive data files are named with the mother's identification number (without personally identifiable information). The project staff then upload the data text files into the AWS S3 bucket, from which they then are loaded into the server. Furthermore, the project staff confirm that the uploaded data files are successfully loaded into the database server using the utility tool every week.
Using RADAR-base app would require setting up RADAR passive remote monitoring technology (pRMT) and the RADAR management portal. The portal allows adding a new participant to the study. Once a subject is created, the pRMT app can login to the management portal to provide permission for different sensors. The collected data then has to be exported to the format supported by the StandStrong Platform. More detail can be found at using pRMT is available on the RADAR-base website.
Use case 2. Following Case 1, the next step is to integrate the passive data in the counselor's StandStrong app. The four types of passive data collected using smartphones and Bluetooth beacons can be visualized in the StandStrong app installed on the counselor's tablet. The counselor receives daily passive data updates for each mother. Before the weekly psychosocial session, they synchronize the latest data in their tablet to discuss during the counseling session. All downloads are completed when the counselor has internet access, then the information is used offline for sessions, which are typically held in mother's homes, lacking access to reliable internet. During the counseling session, the counselor shares and discusses the mother's data with her using the StandStrong app on her tablet. For example, they may show the proximity chart, GPS heat map, and activity tracking while discussing behavioral patterns during the counseling sessions. Any change in behavioral patterns from the previous session can also be discussed, with suggestions from counselors on what behaviors to adopt for better recovery. Besides discussing the mothers' information through the StandStrong app, mothers can also send Viber text messages to counselors between sessions. These messages appear in the counselor's StandStrong app on their tablet and they could reply accordingly. Finally, awards are given to support certain self-care, daily routine, social interaction-related behavioral goals. This weekly progress is documented through passive data triggered behavioral change.

Conclusion
Given the global burden of untreated depression and its intergenerational impacts on young mothers and their children, it is vital to find innovative approaches to scaling up psychological services. We have developed the StandStrong platform as a way to passively collect data on depressed mothers' daily experience and then provide this information to non-specialist counselors who can personalize psychological treatment. The StandStrong platform has now been piloted and results will be forthcoming regarding the application of this approach in a real-world setting. These findings will inform the acceptability, feasibility, and mental health benefits of the StandStrong platform.

Data availability
Underlying data All data underlying the results are available as part of the article and no additional source data are required. License: GNU Affero General Public License v3 (AGPL-3.0)