Inspiration
Our team was inspired by the AllHealth track presented at the opening ceremony and the challenge of enhancing patient care in the least intrusive way possible. We considered the technologies people use daily and landed on typing, something everyone does across devices—whether sending texts, searching online, or writing documents. Research shows that analyzing typing patterns, like the rate of typos, can help predict mental health risk factors, cognitive decline, and other health conditions like Parkinsons. Links to some of the studies that inspired our project can be found at the end.
What it does
CognitiveKeyboard is an alternative Android keyboard that updates a user’s typing statistics every 30 seconds. It tracks details like backspaces, special characters, typing speed, and pauses between keystrokes — without storing actual text. This approach eliminates privacy concerns about tracking what is typed. Using this data, along with demographic information (e.g., age, gender, known health conditions), we create data visualizations for researchers to analyze. They can filter participants, cluster users by typing patterns, and apply labels based on their research. These labels are fed back into our machine learning model to improve prediction accuracy.
How we built it
We developed the keyboard and typing tracker in Android Studio, using Java and JDK, built on top of an open-source keyboard library. For the database, we used MongoDB Atlas, creating collections for user demographics, user clusters, and daily typing samples. Python APIs manage interactions between our backend and database, handling tasks like adding users, submitting samples, and retrieving data. The web interface for data visualization and researcher access was created using Python, while the Android app’s frontend was built with Java. We hosted everything on Linode.
Challenges we ran into
One of our biggest challenges was choosing how to track typing statistics efficiently and privately. While using an alternate keyboard is unconventional, it offers the most secure and efficient method. Privacy was a key concern — this approach allowed us to analyze keystroke types without storing sensitive data like passwords. Alternative solutions either consumed too much battery or required excessive permissions, such as accessibility access to screen content. Another challenge was identifying which typing statistics were most relevant for our analysis. We eventually focused on typing speed, keystroke intervals, typing accuracy (measured by backspaces), character variability, and special character usage. Managing this six-dimensional data presented visualization challenges, which we addressed by offering flexible filters and visualizing data in 2D or 3D, depending on the researchers’ preferences.
Accomplishments that we're proud of
We’re proud of our commitment to patient privacy. Instead of storing sensitive data and encrypting it, we found a way to collect meaningful statistics without recording typed text. Our data visualizations are another key achievement—they simplify clustering and offer customization, making the research process more intuitive. Finally, we’re proud of staying sane and focused through the 36-hour marathon, creating something that has real potential to enhance patient care and identify early health risks.
What we learned
As a group coming from a wide range of experience and backgrounds, through our collaboration we also had a wide range of takeaways.
Taha: Throughout this project, I explored effective project management, particularly in a fast-paced environment. I learned how to delegate tasks, prioritize my own milestones, and quickly adapt when things didn’t go as planned. Working as a team under pressure and sleep deprivation taught me the importance of clear communication, supporting each other’s strengths, and maintaining focus. I also realized that persistence in debugging always pays off—it was worth sticking with a problem, no matter how long it took, because solving it in the end was rewarding. On the technical side, I gained valuable experience writing code in Java for Android applications.
Shaurya: I worked on creating a machine learning model, developing data visualizations, and building a Python frontend for researchers. One major takeaway from this process was the importance of seeing the debugging process through from start to finish. I also learned how to manage our time across different tasks and the value of taking breaks to prevent burnout. This balance was key to maintaining productivity over the course of the project.
Maggie: As a first-time hacker, I learned a lot from my teammates, especially about deploying a real-world project, managing time, and dividing responsibilities within the team. I appreciated the support we gave each other, especially during moments of exhaustion. On the technical side, I gained hands-on experience creating APIs to connect our backend with the database, which was completely new to me. Observing how my teammates handled their tasks also provided me with valuable second-hand learning experiences.
Andrew: This was my first hackathon and my first time working in a team-based development environment, so I focused on learning from my teammates. I gained a lot from watching them work in different areas, particularly around creating visualizations and learning how to communicate effectively through the API. I also learned how to make API calls and how tools like MongoDB and Flask communicate. I familiarized myself with basic python packages like pandas, streamlit, numpy, and matplot.
What's next for CognitiveKeyboard
Our next steps involve expanding the platform support. Since most typing happens on mobile, especially messaging, we prioritized mobile statistics for this hackathon. An iOS implementation was impractical within the timeframe due to App Store delays and cost barriers, but it’s on our roadmap. We also plan to support browser and desktop statistical analysis. Another future goal is to detect users at urgent risk, possibly through sentiment analysis or flagging risk-indicating keywords. Finally, we aim to develop an interface for healthcare providers, like our interface for researchers, to monitor patients at risk, catching potential issues early. Beyond these plans, there are numerous other directions for future expansion.
Sources
https://www.nature.com/articles/s41598-019-50002-9
https://www.nature.com/articles/s41598-023-28990-6?fromPaywallRec=false
https://www.nature.com/articles/s41598-018-25999-0
https://biomedeng.jmir.org/2022/2/e41003
https://www.nature.com/articles/s41598-023-28990-6?fromPaywallRec=false
https://ieeexplore.ieee.org/document/10340393
https://academic.oup.com/jamia/article-abstract/27/7/1007/5848291?redirectedFrom=fulltext
Log in or sign up for Devpost to join the conversation.