Inspiration
Inspired by the research of Dr. Ellen Langer of Harvard University, widely known as the mother of mindfulness. Her research on Counterclockwise took elderly men and had them live as if the past was the present on a retreat. Within a week, they were noticeably stronger, with better vision and hearing, walking with better posture, and were perceived by others as being younger. She has nearly half a century of research on the benefits of mindfulness. And she argues that virtually all if not all evil is rooted in mindlessness. When we are mindful, we do not jump to conclusions. We appreciate other people's perspectives. We understand that there are multiple explanations for things. We become confident but uncertain. Mindfulness has been linked to better outcomes both for the individual who is mindful and others who they come in contact with.
Our most challenged communities are our youngest and our oldest. With counterclockwise, we can help our seniors recapture their youth through mindfulness. With counterforward, we can help our children surpass all expectations and limitations. And with the rest, we can pursue general Langerian mindfulness practices, which do not involve any meditation and which offer instant mindfulness to all through an active process of noticing new things.
What it does
An enhanced key and camera logger analyzes your digital activity on your computer to see if you have suddenly become mindless. When it observes such an anomaly, it pops up with some gentle instructions to enhance your mindfulness. If you are young, it might engage you in a counterforward exploration of what life would be like twenty years in the future. If you are old, it might pretend that it is twenty years ago, speaking in the present tense about 2003 as if it were live.
In addition, several standalone tools can be used on the web at any time.
How we built it
The enhanced key and camera logger run in the background and collect information. One of the key logger enhancements are to store the contents of the clipboard into the database every time a Ctrl-C copy is made. The facial snapshots from the webcam are run through a facial recognition neural net to extract the age and vector of emotion weights. But key logs do not reflect actual text written due to possible typo corrections, backspaces, etc. So we needed an AI prompt to interpret the key logs and output the intended text. This tool was successfully built and tested. The output of this keylog-cleaning AI is then fed to a fine-tuned model that distinguishes mindless text from mindful text and returns the log probability of mindfulness.
How was the fine-tuned model trained? About a hundred subjects were surveyed yesterday and placed in one of two random conditions: mindless or mindful. The mindless condition subjects were instructed to write about any topic, 500 characters minimum. The mindful condition subjects were first instructed in mindfulness, asked to notice and list three new things, choose a prompt about which they are passionate, and then write, also with 500 characters minimum. Three fine-tuned models were trained: curie with validation, ada with validation, and ada on the full dataset without a holdout validation set. All three had stunning agreement and ability to distinguish mindless vs. mindful texts, in the range of about 95% accuracy. Therefore, the one trained with the most data, the ada model on the full dataset of all subjects, was used.
Next, the facial snapshots from the webcam are run through a standard facial recognition neural net to extract the age and vector of emotion weights.
In addition to popping up a chat to nudge people back into mindfulness when the detection system was triggered, the chat also includes a video created from the latest webcam image. This video was created through Replicate using StyleGAN-NADA to show multiple perspectives of the user.
When is a mindlessness alert triggered? This too utilized AI, namely an unsupervised anomaly detection algorithm in Wolfram Language.
Finally, several standalone web apps were deployed: one that returns the mindfulness probability of any text, and one that allows a Langerian-style chat with counterclockwise, counterforward, or general mindfulness system prompts.
Challenges we ran into
Any keylogger requires turning off some anti-virus protection on the computer, which is an unpleasant security risk. Perhaps a simpler method would have been to use Autohotkey.
The video generation API endpoint can sometimes take a few minutes to warm up before it is speedy again. This can be frustrating to the user, or would mean they wouldn't be shown a video to help induce them into mindfulness.
Finding and administering a double-blind mindless vs. mindful writing sample survey was time-consuming, costly, and nerve-wracking. I'm frankly astonished that it worked, and worked so well and robustly. I did not expect ada to be as performant as it was.
Accomplishments that we're proud of
This is essentially five products in one: a) a mindlessness detector for seniors that guides them through Langer's counterclockwise protocol to become their younger selves b) a mindlessness detector for children that guides them through Langer's counterforward protocol to become their older selves c) a mindlessness detector for adults that guides them through Langer's general mindfulness protocol to notice new things, appreciate uncertainty and multiple perspectives, etc. d) a mindless vs. mindful text detection service e) a website allowing on-demand interaction of (a) - (c)
The survey results are a world-first. There is no academic literature that I am aware of that has ever even attempted to distinguish mindless from mindful written content, let alone succeeded so spectacularly. It is the bedrock result on which the rest of the project stands.
What we learned
GPT-4 is amazing. A well-crafted system prompt allows for well-earned trust in the GPT-4 chat to stay on message.
Wolfram Language has a lot of built-in AI, including the anomaly detection and facial features we used here, and also allows for generating dynamic websites and interactive dialog chat-like dialog boxes.
What's next for Less Mindlessness
In addition to the perspectives video currently in use in the project, it would be nice to incorporate other facial restyles such as age transformation, gender change, hair alteration, and image restyles into Picasso, Dali, Renoir, etc. These are straightforward enhancements.
Additionally, incorporating both text-to-speech and speech-to-text should be pretty easy with eg Whisper. I would like to incorporate that when this goes live to nursing homes so that residents could simply dial a number and talk.
Similarly, there are other mindfulness-inducing tools that could be incorporated, such as automated spot-the-difference and quantum entanglement. I have worked on these things in the past and could integrate them quickly but did not want to include any past work in this entirely brand new hackathon project.
Built With
- openai
- python
- replicate
- rinongal/stylegan-nada
- sqlite
- wolfram-technologies
Log in or sign up for Devpost to join the conversation.