Inspiration

A lot of interrupted study sessions and also a lot of lost notifications drove us to develop this app.

What it does

SmartFocus is essentially a notification manager, allowing you to customize which notifications you should actually be notified about. It also bundles notifications together, making sure you never miss the full context of a conversation, even if the information is spread across different apps.

At the core of the app, we have a custom trained machine learning model, generating both an embedding vector to group relevant messages together as well as generating a priority score that can be used to filter out unimportant messages. The model runs 100% locally on device, to ensure no private information leaves the phone.

The feature set includes setting schedules for your filters, specifying behavior for individual apps and setting thresholds to control how important a notifications needs to be to be let though the filter. We also present a summary of all notifications received, grouping them by which ones where silenced and not. Finally, you can search across all notifications received, allowing you to find specific topics even if you don't remember which app it got sent in.

How we built it

Android App

We wrote the app in Kotlin, using android studio. This was process was a lot of iterative work, making a design, researching how it can be implemented in Kotlin, implementing and evaluating.

PyTorch model

We started by designing the overall architecture of the model. To minimize model size while allowing for both priority and similarity estimates, we settled on using one pretrained base model (specifically this one), and then feeding its output vector into a few different MLPs to allow for the two downstream tasks.

As for training the machine learning model, we started by researching datasets about text similarity as well as ones useful for predicting message importance. For example, we found a dataset about customer support tickets where we could extract text importance, as they are labeled with a priority. For message similarity, we mainly relied on this dataset, with some added preprocessing. We also had to keep the overall size of the model in mind, as inference on a smartphone is limited in terms of compute.

Finally, we had to allow for running the PyTorch model in Kotlin. This largely ended up being a process of understanding the limited information available about this library.

Challenges we ran into

Finding datasets to train the machine learning model was tricky. Not only are datasets containing specifically notification data already rare but since we wanted to both measure message similarity as well as importance of each message, we narrowed the dataset availability even more. To solve this we ended up using, for example, more generic similarity datasets (not just ones containing notification data) and extending those datasets to match the Android notification format more closely.

Another problem was actually running the PyTorch model on the Android device, since local compute to maintain privacy was one of our core goals. This required digging deep into niche Kotlin and Java libraries.

Accomplishments that we're proud of

Actually training a custom model that works quite well and packaging it all in a clean UI, all in less than 24 hours feels like a good accomplishment.

What we learned

We learned some tricks about data processing and perhaps more importantly about Android app development, which none of us had done before.

What's next for SmartFocus

More customization options, perhaps even allowing the user to update the ML model.

Built With

Share this project:

Updates