that your social media feed might know you too effectively.
While you browse social media, you discover a really typical conduct: you watch one video, and abruptly your timeline is flooded with extra of the identical. 5 years in the past, it felt a bit like magic. However right this moment, we discuss “the algorithm” as if it have been a mysterious entity pulling strings in some Silicon Valley basement. The reality is far much less dramatic, and rather more fascinating.
The algorithm isn’t inherently evil, it doesn’t sit there plotting your radicalisation. It’s only a chunk of code working cosine similarities and weighted averages, making an attempt to foretell what you’ll click on on subsequent. The difficulty is what we work together with creates engagement. And the surest technique to hold people engaged seems to be the worst technique to hold them knowledgeable (rage-baits, pretend information, or worse).
This put up is about how advice engines work, why they tilt us towards echo chambers, and, as a result of studying a couple of factor is rarely the identical as seeing it, we’ll construct one from scratch, level it at actual information knowledge, and watch the bubble kind.
The Engagement Engine: How Recommenders Work
A social media algorithm is, at its coronary heart, a curator. Its job is to sift by means of tens of millions of posts and serve you those you’re most definitely to interact with: click on, watch, like, share, rage-comment on. It does this based mostly on one phrase: knowledge.
Each motion you’re taking is a clue:
- Which posts you linger on (even with out clicking)
- Which movies you watch, and for the way lengthy
- Which accounts you observe, mute, or block
- Which matters you seek for at 1 a.m.
Utilizing machine studying, the algorithm spots patterns on this firehose of behaviour. It’s continually asking the identical query: what retains this individual on the platform longer? Do not forget that that is the biggest objective of any social media firm: maintaining you on the platform longer.
Two traditional methods sit beneath most recommender programs:
- Collaborative filtering finds customers who behave such as you and recommends what they appreciated. If Alice and Bob each beloved The Matrix and Inception, and Alice additionally beloved Interstellar, the system nudges Interstellar to Bob. Fairly simple to grasp.
- Content material-based filtering appears to be like on the traits of what you’ve appreciated and finds comparable issues. Should you watch a variety of cooking movies, it surfaces extra movies tagged “cooking”, “recipe”, or “knife expertise”, they resemble what you already loved.
Actual platforms mix these strategies with a whole bunch of different alerts. However the core thought is identical: study out of your behaviour, predict what else would possibly seize you.
The algorithm doesn’t intend to indicate you unhealthy or false content material. It optimises for engagement. And one of many surest methods to maintain people engaged is to faucet into our feelings, particularly the robust, unfavourable ones. Or movies of cats.
Constructing a Information Recommender on Actual Information
Let’s cease speaking about this abstractly and construct one. We are going to use actual anonymised click on logs from Microsoft Information. The dataset is known as MIND (Microsoft Information Dataset), printed for educational analysis by Microsoft Analysis. This pattern comprises 50,000 customers, over 51,000 English information articles throughout 17 classes (information, sports activities, finance, way of life, well being, journey, and extra), and 156,000+ actual impression classes, every recording what a consumer was proven and what they clicked on. The entire thing matches in about 30 traces of Python, though you don’t really want to now this inde element:
import numpy as np
import pandas as pd
from scipy.sparse import csr_matrix
from sklearn.metrics.pairwise import cosine_similarity
# Construct a sparse consumer × article matrix (1 = clicked, 0 = did not)
matrix = csr_matrix((np.ones(len(clicks)), (user_rows, article_cols)),
form=(n_users, n_articles))
def suggest(user_id, matrix, top_n=15, n_neighbors=50):
"""Discover 50 most comparable customers and rank the articles
they clicked that our consumer hasn't seen but."""
u = user_idx[user_id]
# Cosine similarity between this consumer and everybody else
sims = cosine_similarity(matrix[u], matrix).flatten()
sims[u] = 0 # do not suggest to your self
# Take the highest 50 most comparable customers
top_neighbors = np.argsort(sims)[-n_neighbors:][::-1]
weights = sims[top_neighbors]
# Rating articles by weighted sum of neighbour clicks
scores = np.asarray(matrix[top_neighbors].T.dot(weights)).flatten()
# Zero out articles the consumer already clicked
scores[matrix[u].toarray().flatten() > 0] = 0
# Return the top-scoring articles
top_articles = np.argsort(scores)[-top_n:][::-1]
return top_articles
Cosine similarity finds your fifty closest neighbours, individuals who click on on the identical sorts of articles you do. We take the articles they clicked, weight them by how comparable every neighbour is to you, and serve the highest fifteen. That is the base of what powers a billion-dollar business.
Coswhat similarity?
Cosine similarity would possibly sound like one thing out of a math textbook, however bear with me, it’s simpler than it appears to be like. To point out you the way it works, let’s take a fast detour.
Think about the next knowledge factors scattered throughout two axes, mechanical vs. organic, and cuteness:

Cosine similarity measures the angle between two arrows, every one ranging from the origin (0,0) and pointing towards one in every of our knowledge factors. The smaller the angle between them, the extra comparable the 2 gadgets are.
Consider it this fashion: if two arrows are virtually pointing in the identical course, the gadgets they signify share comparable traits. Take cats and canine for instance. Each rating excessive on ‘organic’ and excessive on ‘cuteness’, so their arrows level in almost the identical course and cosine similarity returns a price near 1 (its most).
But when we examine cats with teddy bears, though they’re comparable on the lovable dimension, they’re completely different on the organic axis:

If we examine cats with teddy bears, though they’re comparable on the lovable dimension, they’re completely different on the organic axis, a cat is totally organic, whereas a teddy bear scores zero.
This pulls their arrows aside.The angle between them widens, and cosine similarity returns a decrease worth, reflecting that regardless of sharing one trait, these two objects occupy very completely different areas of our area.
And, after all, evaluating cats to automobiles, give virtually no similarity because the arrows between each level in several instructions:

AI fashions use this sort of data to suggest content material that’s more likely to set off an analogous response in you. Think about a two-dimensional area the place one axis captures how a video makes you are feeling (calm, entertained, outraged) and the opposite captures its matter. Each video will get plotted someplace in that area.
Should you click on on a political video that makes you indignant, and also you watch it all over. The platform registers each dimensions: the subject and the emotional response. Utilizing cosine similarity, it finds different movies whose ‘arrow’ factors in the identical course (rage-baiting political movies) and serves them to you subsequent. The extra you interact, the extra confidently the algorithm learns which nook of that area retains you watching.
Meet Person U92876 (let’s name it Joe): The Sports activities Fan
I picked a consumer from the MIND dataset whose studying historical past is pure sports activities, NFL energy rankings, NBA commerce rumours, MLB bans. It learn twenty-five articles, all sport.
Let’s ask the recommender what to serve them:

The class breakdown:
- 40% sports activities
- 13% information
- 13% autos
- 34% scattering of every little thing else.
The algorithm recognises this individual’s sports activities behavior and feeds it again, however it additionally serves a fairly diversified food plan. There’s politics, leisure, way of life, finance. Not unhealthy, proper?
Now watch what occurs.
The Second of Curiosity
I simulated one thing much more frequent than a large rabbit-hole binge: a second of idle curiosity.
Our sports activities fan didn’t spend hours studying politics. Taking a look at their preliminary feed, they merely clicked on three gadgets that caught their eye:
- The information story about Joe Biden.
- The information story about Mitch McConnell.
- The video about Trump’s assaults.
Simply three clicks in lower than ten minutes of studying and watching. Three tiny breadcrumbs left for the algorithm and Joe goes on along with his life throughout the remainder of the day.
Now, if we ran these clicks by means of the fundamental 30 traces of Python code we wrote earlier, nothing a lot would occur. Mathematically, 25 historic sports activities clicks would nonetheless overpower 3 new political clicks. The algorithm would nonetheless see a consumer who’s 89% all in favour of sports activities, and the feed would barely budge.
However right here is the crucial secret sauce of contemporary social media: Recency Weighting (or Time Decay).
Actual algorithms don’t deal with all of your clicks equally as a click on you made three years in the past is virtually historical historical past; a click on you made three minutes in the past is gold. To maintain you hooked within the present session, platforms apply a heavy multiplier to no matter you might be doing lately.
A single line of code implements this within the algorithm we noticed earlier. If we determine that the newest clicks ought to carry as much as 100 instances extra weight than older ones, we might write one thing like this:
time_decay_weights = np.array([0.1 if historical_click else 10.0 for click in user_history])
If we do that, let’s run the suggestions once more:

Right here’s the injury that simply 3 clicks have completed to our Time Weighting advice system:


Political information went from 13% to 40% of the feed. A 3x enhance. From one night of clicking and studying three items of stories. Sports activities (the factor this individual has learn for years) can drop from the dominant class to second place. The algorithm didn’t pause to suppose “maintain on, this individual has 25 sports activities articles of their historical past, and one night of politics doesn’t outline them.”
It doesn’t suppose, it simply recalculates time weighted similarity matrices, discovered a brand new set of neighbours and served what different customers that clicked on this will take pleasure in.
Two issues leap out:
- The pace. It might take one night to flip a consumer’s complete feed composition. Actual platforms recalculate quicker than this demo as they replace in actual time. You most likely discover this in your feed with advertisements associated to merchandise you’ve been looking out these days.
- What disappears. This isn’t nearly what the algorithm provides, however additionally about what it removes. The consumer’s informational food plan didn’t simply get extra political, it obtained narrower. And narrower is the true hazard right here
Observe: actual platforms don’t publish their decay constants, so that is illustrative, not a measurement, however the mechanism is actual and the course is what issues. My 100x instance is presumably an exaggeration of the recency bias.
What analysis tells us
You now understand how clicks affect what the mathematics of what the algorithm exhibits you subsequent.
However this will get worse — content material that makes us indignant, fearful, or shocked glues us to the display screen much better than content material that makes us really feel good or knowledgeable. Social media corporations didn’t engineer this consciously, their algorithms merely found it.
An enormous 2025 research analyzing the digital hint knowledge of 25,000 SmartNews customers discovered that people possess a trait-level “negativity bias” when deciding on information. Evolutionarily, we’re hardwired to concentrate to threats, avoiding hazard was vital to our ancestors’ survival. What occurs when this historical intuition meets fashionable machine studying? The research confirmed that customized advice feeds take our inherent negativity bias and actively increase it.
Moreover, knowledge from researchers analyzing a whole bunch of tens of millions of posts on platforms like Fb and X (previously Twitter) reveals that social media customers are roughly 1.91 instances extra probably to share unfavourable information hyperlinks than constructive ones. Negativity equals virality, and the outrage loop is born.
The Cognitive Toll: It’s Not Simply What You Suppose, It’s How You Suppose
The affect of those algorithmic loops isn’t nearly the kind of content material we devour; it’s about the way it essentially alters our brains. A latest 2025 systematic evaluate analyzing 71 research and 98,299 contributors of short-form video feeds (like TikTok, Instagram Reels, and YouTube Shorts) discovered profound cognitive penalties.
Elevated engagement with these endless-scroll platforms is related to poorer cognitive efficiency, particularly impacting our sustained consideration and inhibitory management.
Psychologists level to a twin means of habituation and sensitization to clarify this phenomenon. The speedy, high-stimulation nature of quick movies desensitizes us to slower, extra effortful duties like studying a guide or deep problem-solving. On the similar time, the algorithm’s on the spot supply of curated content material sensitizes our mind’s reward system, reinforcing impulsive engagement patterns and encouraging the ordinary looking for of on the spot gratification.
Heavy customers of those platforms exhibit decreased electrophysiological exercise throughout attention-demanding duties. Some researchers even level to structural variations in key cognitive management areas, together with the prefrontal cortex and striatal reward circuits, linked to this fixed bombardment of extremely rewarding algorithmic stimuli.
The Societal Price
Attributable to mathematical matrices, every of us in our personal personalised bubble of knowledge.
Within the quick time period, it’s annoying for most individuals. However zoom out and the image darkens. When algorithms feed us content material that confirms what we already consider, we expertise affirmation bias on steroids.
These filter bubbles deepen the social divide now we have right this moment. We are going to proceed to be extraordinarily divided and there’s no finish in sight for this chasm.
Misinformation thrives in closed loops as a result of false tales don’t get uncovered to scrutiny exterior the bubble. By the point a fact-check goes out, the unique lie has completed a lap across the platform and constructed a small military of believers.
And democracy, which is dependent upon a shared baseline of actuality and a few willingness to argue in public, takes a success when residents occupy solely completely different actuality bubbles.
Reclaiming Your Feed
You’re not powerless right here. The algorithm is responsive however there a few issues you are able to do, that, though annoying, might take you out of your bubble.
The identical mechanism that constructed your bubble can be utilized to widen it. Some sensible transfer:
- Diversify the inputs. Actively observe a number of sources exterior your consolation zone. Should you lean a technique politically, observe some considerate voices from the opposite facet.
- Reset periodically. Clear your watch historical past. Use “Not ” on ideas that hold haunting you. Attempt the platform logged out, or in incognito, and see how completely different the world appears to be like with out your knowledge.
- Use chronological feeds. Most platforms nonetheless allow you to change off the algorithmic rating and simply see posts from individuals you observe, so as.
- Pause earlier than sharing. Each like, remark, and share is a vote for “extra of this, please.” If one thing makes you livid, that’s precisely when the algorithm is most definitely to be exploiting you.
- Restrict the time. Set screen-time limits. Schedule offline hours. The much less you rely upon the feed in your data food plan, the much less energy it has to form what you consider.
Past the Bubble
I hope this weblog put up knowledgeable you on how these advice programs bubbles work. We constructed a recommender on actual information knowledge, and it took three clicks to flip a sports activities fan’s feed from 40% sports activities to 53% politics.
Step one to breaking free is just being conscious. Subsequent time you end up in an internet frenzy, take a breath and ask: Why am I seeing this? Who advantages from me reacting this fashion? The reply often traces again to an algorithm doing its job, and that job is never “informing you.”
Keep knowledgeable, keep open-minded,
— Ivo
















