There it is in your Facebook timeline or Instagram gallery – a digital footprint of your mental health.

It’s not hidden in the obvious parts: the emojis, hashtags and inspirational quotes. Instead, it lurks in subtler signs that, unbeknownst to you, may provide a diagnosis as accurate as a doctor’s blood pressure cuff or heart rate monitor.

For those who see social media mainly as a place to share the latest cat video or travel snap, this may come as a surprise. It also means the platform has important – and potentially life-saving – potential. In the US alone, there is one death by suicide every 13 minutes. Despite this, our ability to predict suicidal thoughts and behaviour has not materially improved across 50 years of research. Forecasting an episode of psychosis or emerging depression can be equally challenging.

But data mining and machine learning are transforming this landscape by extracting signals from dizzying amounts of granular data on social media. These methods already have tracked and predicted flu outbreaks. Now, it’s the turn of mental health.

Studies have found that if you have depression, your Instagram feed is more likely to feature bluer, greyer, and darker photos with fewer faces. They’ll probably receive fewer likes (but more comments). Chances are you’ll prefer the Inkwell filter which converts colour images to black and white, rather than the Valencia one which lightens them.

Even then, these patterns are hardly robust enough in isolation to diagnose or predict depression. Still, they could be crucial in constructing models that can. This is where machine learning comes in.