It’s is 3 am. The world outside is still. Half-asleep, you reach for your phone on the bedside table. You are not searching for anything in particular, just one last scroll before falling asleep. A laugh. A headline. A video. A comment. The posts blur, yet your thumb keeps moving.
When you finally look up, it is 5 am. The sun is rising. You have 3 hours before your day begins. But have you ever paused to ask why it felt impossible to stop?
Social media does not feel addictive by accident. It is built on optimisation theory, probability, and machine learning models that treat human attention as a variable to be maximised. At its core sits an objective function: maximise engagement, measured through watch time, interaction frequency.
“The algorithm doesn’t care why you are watching, whether you’re happy or furious; it only cares that you stay. It does not evaluate whether the content is healthy, informative or harmful. It measures interaction signals such as clicks, watch time, shares and comments. If something generates measurable engagement, it is treated as successful,” says Mir Samreen, A mathematician and AI research analyst specializing in algorithmic optimisation for AI platforms.
Uncertainty is the hook. Slot machines mastered it; social media digitised it. “What a slot machine really does is bring uncertainty. The algorithm is designed to be glitchy on purpose. It makes ‘good stuff’ rare and unpredictable, it ensures that your brain never feels ‘finished’ with the feed and you return,” she adds.
This reflects a variable ratio schedule: rewarding posts appear at irregular intervals, keeping anticipation high. Dopamine rises more in expectation than in receipt. The refresh becomes the lever.
Behind the screen, behaviour turns into data. Watch time, pauses, replays, shares and return frequency become weighted inputs. A share may count more than a like. A long pause may signal stronger interest than a tap. In ranking systems, each action feeds an optimisation model. The platform assigns an expected engagement score to possible posts and shows the one with the highest predicted value. Using gradient-based optimisation, it adjusts its parameters to increase time spent or likelihood of return.
The system forecasts what you are most likely to engage with, tests that prediction, and updates itself accordingly. Correct predictions are reinforced; errors are reduced. This is reinforcement learning in motion — predict, measure, refine. Personalisation happens quickly. Ten to 20 interactions can begin shaping your feed. Around 100 can stabilise it.
Under the hood, collaborative filtering and content-based filtering map preferences using linear algebra and statistics. Matrix factorisation decomposes vast user–content datasets into hidden taste vectors. “You can compare it with a big Sudoku puzzle. The row of the matrix corresponds to every user and every column is a post. This is how the missing blocks get filled,” Samreen explains. Cosine similarity measures the angle between interest vectors. If users with patterns similar to yours fall into a certain stream, the model infers you might too.
Tim Kendall, former president of Pinterest, summarised the industry’s objective in the documentary The Social Dilemma: “Let’s figure out how to get as much of this person’s attention as we possibly can. How much time can we get you to spend? How much of your life can we get you to give to us?”
The feed never ends because the design removed the end. Infinite scroll erases boundaries. Fewer stopping cues increase the likelihood that another engaging post appears before you pause. When optimisation focuses purely on engagement, familiarity becomes statistically safer than diversity. As the model gains confidence about what holds you, your feed narrows.
The more you engage with a type of content, the more of it you see, not by decree, but because similarity is easier to predict and more reliable for sustaining attention. Riddhim, assistant professor of Mathematics at NxtWave Institute of Advanced Technologies, explains, “Social media function as evolving networks where users act as nodes and information spreads like contagion once it reaches critical mass.”
Psychology completes the equation. Dr Khushali Adhiya, Head of the Department of Psychology at SVKM’s Mithibai College of Arts, notes, “Social media today intensifies upward social comparison, where users constantly measure themselves against carefully curated and idealised versions of others’ lives. This repeated exposure can chip away at confidence and self-esteem.”
She adds that teenagers are especially susceptible. “The adolescent brain is still developing, particularly the prefrontal cortex, which governs impulse control and critical thinking. When social media use begins to disrupt sleep, relationships, work, or emotional balance, it moves from habitual use to compulsion, where unpredictable digital rewards can start to feel more compelling than everyday reality.”
And so the thumb pulls down again.
The system does not rest. It updates, recalibrates and improves. The loop feels personal. The recommendations feel intuitive. The feed feels like a choice. But the question is no longer whether the algorithm understands you. It is whether you are shaping the feed or the feed is quietly shaping you.