maind your mental health — where does the “ai” in “maind” come from?

Kasvu Labs
5 min readJan 31, 2023

--

Image by Pavel Danilyuk (Pexels.com)

Ever wonder where the spelling of “maind” comes from? We’ve asked our leading AI expert, Elaine Zosa, to write us a piece on what it all means — and how we use AI to support you, as well as our therapists, in using maind:

“What is the “ai” behind maind? It all starts with understanding some basic concepts behind NLP, AI, and machine learning”, Elaine explains.

Natural language processing (NLP) is a field of artificial intelligence (AI) and machine learning (ML) that is concerned with using computers to process and analyse human language. Machine learning is generally divided into three areas: supervised learning, unsupervised learning, and reinforcement learning. In this post, we will focus on supervised learning.

Supervised machine learning uses labelled data (that is, a dataset where every sample is annotated with the correct label) to train a model to learn patterns in the data such that it can predict the labels of new examples with a high degree of accuracy. A common example of such a model is the spam filter in your email program. The spam filter has been given thousands of examples of messages with labels (labels can either be ‘spam’ or ‘not spam’). From this data, the spam filter can learn a mathematical function (the model) that separates the non-spam from the spam messages in the training data. Then given new messages without labels, the model will classify new messages according to which side of the boundary they fall. We illustrate this in Figure 1 where the red points represent spam and the green points represent non-spam and the boundary is the function that separates them. The yellow and blue points are the new unlabelled messages and our job (or at least the model’s job) is to predict their labels (here our model predicts yellow point to be non-spam while the blue one is spam).

Figure 1. Supervised classification of spam and non-spam messages by Elaine Zosa & Erika Reivala

Figure 1 is a highly simplified illustration of a machine learning model, especially for text classification. In NLP, we usually represent text (this can be a phrase, sentence, or document) as a set of numbers (a vector). A vector can be made up of just two numbers denoting a point in a two-dimensional space, but information in text is almost always impossible to convey in two dimensions. Therefore, different methods of representing texts as points in very high dimensional spaces (think 700 to 1000 dimensions) and methods to train models in these spaces have been devised over the years.

Regardless of the model used, text classification has dozens of applications beyond spam detection. We can, for example, label social media posts that convey negative or abusive sentiments and train a model to detect abusive messages on social media platforms so as to not expose users to them.

Image by Arthur Brognoli (Pexels.com)

In maind, we train different models to detect signs of depression and anxiety in journal entries and to map journal entries to different emotional categories. Human language, however, is a very complex medium of conveying our thoughts and feelings. Therefore, it also requires a complex model to pinpoint the emotions expressed in an entry. Advances in deep learning, most notably the advent of the transformers architecture [1], has significantly improved the performance of models for many language-related tasks, from text classification to text generation [2]. The famous GPT-3 [3] and ChatGPT [4] models are all based on the transformers architecture. Most people who have played around with these models admire their human-like prowess in discussing complex topics, but they also have significant limitations. These models do not understand the meaning of words and sentences as we do and therefore cannot distinguish fact from fiction [5].

This should be an important reminder that, no matter how advanced our models are, they are still models — famously known to be useful even if they are wrong [6] (also see Figure 1 where some data points are on the wrong side of the boundary). No machine can ever replace human empathy and understanding, which is why in maind we have hired in-house psychologists for an expert review on all the insights and messages that we send. In some cases, you might even receive a message written by a real human — from one of our therapists themselves.

In maind, we use AI to support our users in their journey in mental wellbeing, but for diagnosis and treatment, we always recommend seeing a trained mental health professional.

How about trying out maind for yourself? It’s already available for download both for Android and iPhone!

Meet the great m[ai]nds!
Elaine Zosa is the lead NLP specialist at Kasvu Labs, and the brains behind the AI in maind (together with our lovely NLP specialist, Sardana Ivanova & Data Scientist, Laila Melkas ❤️). A researcher at the University of Helsinki, Elaine is working on methods for analysing large-scale multilingual news datasets.

Elaine Zosa, Kasvu Labs’ Lead NLP Specialist. Illustration by Markku Mujunen

References

[1] Vaswani, Ashish, et al. “Attention is all you need.” Advances in Neural Information Processing Systems (2017).

[2] Devlin, Jacob, et al. “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.” Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (2019)

[3] Brown, Tom, et al. “Language models are few-shot learners.” Advances in Neural Information Processing Systems (2020)

[4] Ouyang, Long, et al. “Training language models to follow instructions with human feedback.” arXiv preprint arXiv:2203.02155 (2022).

[5] https://openai.com/blog/instruction-following/l

[6] “All models are wrong but some are useful” https://en.wikipedia.org/wiki/All_models_are_wrong

--

--