Sub topic 11
Feedback loops and amplification
This chapter assumes you know the pipeline from earlier chapters: candidate generation, engagement prediction, score combination, and re-ranking. It also assumes you can read short Python and treat a probability as a number between 0 and 1. Here you will see how the output of a feed becomes the input of its next version, and why that can magnify small differences.
The loop in one sentence
A feed ranker learns from user behavior, but user behavior happens on the feed the ranker built. What people see determines what they can react to. What they react to becomes training data. The training data shapes what they see next.
A feedback loop is any setup where a system's output changes its future input. A reinforcing loop is one where the change pushes the system further in the direction it was already moving. That is what "amplification" means in this chapter.
Nothing in this loop is a bug. It is how a system that learns from behavior works. The problems come from what the loop cannot see and from what it does to small early differences.
Why the data is biased by the feed itself
Training data from a feed is not a fair sample of user preferences. Three effects explain most of the bias.
- Exposure bias. A post nobody was shown has zero likes. That does not mean people dislike it. The log contains no information about it.
- Position bias. Users react more to the first items on screen than to items further down, even when the lower items are equally good. A post shown at position 1 collects more clicks partly because of where it sat.
- Selection bias. The model only sees outcomes for posts it chose to show. Its beliefs about the unshown posts are guesses, and nothing tests them.
The same situation arises in many learning systems. If the model predicts that a post is weak, it shows the post less. With less exposure, the post gets fewer reactions, which looks like confirmation. The prediction becomes self-fulfilling.
Rich get richer: a simulation
The simplest amplification is popularity. Suppose two posts are equally good, so each has a 10% chance of being liked whenever someone sees it. The ranker shows a post with probability proportional to the likes it already has. Both posts start with one like.
import random
def run(seed, rounds=5000, explore=0.0):
"""Return the share of impressions that went to post 0."""
rng = random.Random(seed)
true_rate = [0.10, 0.10] # identical quality
likes = [1, 1]
shown = [0, 0]
for _ in range(rounds):
if rng.random() < explore:
i = rng.randrange(2) # exploration: pick uniformly
else:
p0 = likes[0] / (likes[0] + likes[1])
i = 0 if rng.random() < p0 else 1
shown[i] += 1
if rng.random() < true_rate[i]:
likes[i] += 1
return shown[0] / sum(shown)
for explore in (0.0, 0.5):
shares = [run(seed, explore=explore) for seed in range(8)]
print(f"explore={explore}:", " ".join(f"{s:.2f}" for s in shares))Run it and compare the two lines. The posts have identical quality, so a fair system would give each about 0.50 on average. With explore=0.0, the shares differ a lot from seed to seed. In some runs, post 0 ends with most of the exposure, and in others it gets very little. The cause is luck early on: the first few likes tilt the allocation, and the tilt compounds.
With explore=0.5, half of the impressions are split evenly. Each post is then guaranteed roughly a quarter of the impressions, so the shares stay in a narrower band around 0.50. Exploration limits the amplification but does not remove it. The remaining half still behaves like the first run.
The exact numbers depend on the seeds and the Python version, so check your own output instead of expecting specific values.
Kinds of amplification
Feedback loops appear at several levels, and each has a different mechanism and a different remedy.
| Loop | Mechanism | Typical symptom | Common mitigation |
|---|---|---|---|
| Post popularity | Early reactions raise exposure, which raises reactions | A few posts take most of the reach, partly by chance | Exploration slots, normalizing by exposure |
| User interest narrowing | Clicks on topic A raise the weight of A, so A fills more of the feed | A feed dominated by one or two topics | Diversity re-ranking, topic caps |
| Author reach | Authors with large reach get more reactions and more reach | New authors struggle to break in | New-content boosts, cold-start handling |
| Creator behavior | Creators copy formats that the ranker rewards | Feeds fill with similar formats or bait | Penalize bait signals, change objectives |
| Social proof | Users see counts and react to the counts | Visible numbers sway later reactions | Hide or delay counts |
The creator loop is worth a closer look because it happens outside the model. If posts with a certain hook get more comments, creators learn to write that hook. The training data then fills with such posts, and the model learns to prefer them more strongly. The system shapes the population it ranks.
Weights decide what gets amplified
Recall the score from earlier chapters: a weighted sum of predicted probabilities, multiplied by a freshness factor. The weights are a statement about which reactions the platform wants to amplify.
If comments carry a large positive weight, any content that reliably provokes comments gets more reach. That includes content that provokes arguments. If the hide weight is a large negative number, content that many users hide loses reach. The loop then pushes in whichever direction the weights point.
Two practical consequences follow.
- A reaction that is easy to trigger but only weakly tied to value, such as a quick tap on a sensational post, can dominate if the model overweights it.
- Changing a single weight changes what creators produce, with a delay of days to weeks. An experiment that runs for a few days may therefore understate the long-term effect of a change.
Interest narrowing and the filter bubble
At the user level, the loop can reduce variety. Imagine a user who is mildly interested in two topics, with a slightly higher click rate on topic A. A ranker that always picks the topic with the higher estimated rate shows only A. It never collects evidence on B, so its estimate of B never improves, and the feed concentrates on A.
This is often called a filter bubble. Treat the term carefully. The mechanism above is real in simple models, but how strongly it shows up in real products is an open empirical question, and published studies disagree. Users also choose whom to follow, which narrows their feed even in a chronological list. A fair analysis separates what the user chose from what the ranker added.
Narrowing is easier to detect than to judge. Some narrowing is what the user wants: someone who follows a hobby wants more of it. The concern is narrowing the user did not choose and cannot see.
Position bias and how to correct for it
If you train on raw click logs, the model confuses "was ranked high" with "is good." Teams use several corrections.
- Log the position where each item was shown, and include it as a training feature. At serving time, set the position to a fixed default so the model does not use it to score.
- Randomize a small slice of the feed, for example by swapping the order of nearby items for a small share of traffic. The resulting clicks measure appeal without the position effect.
- Weight by inverse propensity. If an item was shown with probability p, give its logged outcome a weight of 1/p. Items that were unlikely to be shown count more when they were. Very small p values produce large, noisy weights, so implementations cap them.
These methods reduce bias but add cost or variance. The randomization slice costs a little engagement. Inverse weighting makes training noisier.
Controlling amplification
No single control fixes the loop, so platforms combine several.
- Exploration. Reserve some impressions for items the model is uncertain about, as in the epsilon-greedy rule from the exploration chapter. It generates data on content the model would otherwise never test.
- Re-ranking rules. Limit consecutive posts per author or topic. These rules act at the output and do not change what the model learns.
- Counterfactual training. Correct the data for position and exposure, as above.
- Objective changes. Add survey responses such as "was this worth your time?" to the score, so the loop is not driven by taps alone.
- Damping and caps. Limit how fast a post's reach can grow in a short window, which gives integrity systems time to review fast-spreading content.
- Monitoring. Track concentration metrics, for example the share of impressions going to the top 1% of posts or the number of distinct topics per user per week.
Common errors
- Reading engagement as quality. A post with many likes was shown to many people. Compare rates, such as likes per impression, and note how many impressions each rate rests on.
- Ignoring small samples. A post with 3 impressions and 2 likes has a rate of 0.67, but that number says almost nothing. Ranking by raw rates promotes lucky early posts. Shrink estimates toward a prior, for example by adding pseudo-counts.
- Evaluating only short term. A change that raises engagement this week may shift creator behavior or user fatigue later.
- Assuming the loop is one-directional. Users also react to the feed by changing their behavior, such as following new accounts or muting topics, and that change feeds back too.
- Blaming the model alone. The loop includes the objective, the data, the rules, the creators, and the users. Changing the model while leaving the others alone often changes little.
Summary
A ranked feed learns from behavior that it caused. Exposure, position, and selection bias make logged data an unfair record of preferences. Small early differences compound, which produces popularity concentration, topic narrowing, and creator imitation. Weights set the direction of amplification. Exploration, diversity rules, bias-corrected training, broader objectives, and monitoring reduce the effect without removing it. The next chapter covers how experiments try to measure these effects.
Exercise
In the simulation, both posts have the same true like rate of 0.10, yet with explore=0.0 one post often ends up with most of the impressions. Explain why, and say what the change to explore=0.5 does and does not fix.
Show answer
The ranker shows each post with probability proportional to its likes so far, so early random likes tilt exposure toward one post. More exposure produces more likes for that post, which tilts exposure further. Quality plays no part because the rates are equal. With explore=0.5, half of the impressions go to each post equally, which guarantees each post roughly a quarter of all impressions and narrows the spread of outcomes. It does not remove the effect, because the other half of the impressions still follow the likes-proportional rule, so outcomes can still differ between runs.
Exercise
A post has 2 impressions and 2 likes. Another has 1,000 impressions and 600 likes. A teammate proposes ranking by likes divided by impressions. Name the problem and suggest a fix.
Show answer
The first post's rate of 1.0 rests on two impressions, so it is very noisy, and it would outrank the second post's well-measured rate of 0.6. A fix is to shrink each rate toward a prior, for example by computing (likes + a) / (impressions + b) with pseudo-counts such as a = 1 and b = 10. Small samples then move toward the prior, and large samples barely change. Giving low-impression posts a few exploration slots also collects more data on them.
Exercise
Why does training a model on raw click logs overrate items that were shown at the top of the feed, and name two ways to correct for it.
Show answer
Users click items at the top more often because of position alone, so the logs credit the item for an effect that came from its placement. Two corrections are logging the shown position as a training feature and fixing it to a default at serving time, and randomizing the order for a small slice of traffic to measure appeal without position effects. Inverse propensity weighting is a third option.