RecSys & Search

Exploration vs Exploitation in Feeds

Balancing immediate high probability clicks against discovering unknown user preferences in news and media feeds.

🔴 advanced5 min readrecsys
Exploration vs Exploitation is a fundamental trade-off in recommendation feeds and ad placement engines. Exploitation serves items with high known historical engagement to maximize immediate metrics. Exploration serves un-tested or new items to discover true user preferences and estimate long-tail CTRs. Algorithms like Epsilon Greedy, Upper Confidence Bound (UCB), and Thompson Sampling optimize this trade-off dynamically.

The Feed Optimization Trade-off

Every news feed (TikTok, Twitter, LinkedIn) and ad server faces a daily dilemma:

Should we recommend a video that we KNOW the user will click with $90%$ probability (Exploitation)?

Or should we recommend a brand new video uploaded 5 minutes ago whose true CTR is completely unknown (Exploration)?

┌──────────────────────────┬──────────────────────────┐
│ 1. EXPLOITATION          │ 2. EXPLORATION           │
├──────────────────────────┼──────────────────────────┤
│ Serve known high-CTR     │ Serve un-tested / new    │
│ items matching past user │ items with high score    │
│ history.                 │ uncertainty.             │
│ Goal: MAXIMIZE SHORT-TERM│ Goal: GATHER DATA FOR    │
│ CLICK REVENUE TODAY!     │ LONG-TERM OPTIMIZATION!  │
└──────────────────────────┴──────────────────────────┘

Balance is achieved using Multi-Armed Bandit Algorithms.

Multi-Armed Bandit Exploration Algorithms

┌──────────────────────────┬──────────────────────────┬──────────────────────────┐
│ 1. EPSILON-GREEDY        │ 2. UCB (Upper Conf Bound)│ 3. THOMPSON SAMPLING     │
├──────────────────────────┼──────────────────────────┼──────────────────────────┤
│ With probability 1 - ε,  │ Adds an Uncertainty      │ Maintains a Bayesian     │
│ exploit best item. With  │ Bonus σ(i) to predicted  │ Beta distribution over   │
│ probability ε, explore   │ CTR: Score = μ(i) + c*σ. │ CTRs; samples from Beta! │
│ random item. Simple!     │ Optimism in uncertainty! │ Bayesian SOTA!           │
└──────────────────────────┴──────────────────────────┴──────────────────────────┘

1. $\epsilon$-Greedy (Epsilon-Greedy)

Set $\epsilon = 0.05$ ($5%$ Exploration):

2. Upper Confidence Bound (UCB1)

Applies the principle of "Optimism in the Face of Uncertainty":

$$\text{Score}(i) = \hat{\mu}_i + c \cdot \sqrt{\frac{\ln N}{n_i}}$$

If item $i$ has rarely been displayed ($n_i$ is tiny), its Uncertainty Bonus is huge, forcing the algorithm to explore it until its CTR estimate stabilizes!

3. Thompson Sampling (Bayesian Bandits)

Maintains a Beta Distribution $\text{Beta}(\alpha_i, \beta_i)$ for each item $i$:

For each feed slot:

  1. Draw a random sample $\theta_i \sim \text{Beta}(\alpha_i, \beta_i)$ for every candidate item.
  2. Serve the item with the highest sampled value $\theta_i$.

Uncertain items (small $\alpha_i + \beta_i$) have wide Beta distributions, naturally producing high sample draws that trigger exploration!

Say this out loud

Exploration vs Exploitation balances short term click revenue against long term content discovery. Exploitation serves known high CTR items matching user history. Exploration serves un tested items to estimate true engagement. Multi Armed Bandits like Upper Confidence Bound and Thompson Sampling balance this trade off dynamically using uncertainty confidence bounds.

Followups to expect

  1. What is Contextual Bandits (LinUCB / Contextual Thompson Sampling)? Extending Multi-Armed Bandits to incorporate user state vectors $x$ (location, device, time) so exploration decisions depend on contextual user features $P(\text{Click} \mid x, \text{Item})$.
  2. How do you measure Regret in Bandit algorithms? Cumulative Regret measures total lost revenue/clicks compared to an omniscient oracle that always selected the single optimal item: $R(T) = \sum_{t=1}^T (\mu^* - \mu_{a_t})$. Good bandit algorithms achieve logarithmic regret $O(\log T)$.

Check yourself

Question 1 of 3

What core trade-off defines Exploration vs Exploitation in content recommendation feeds?

More in RecSys & Search

See all →
Collaborative Filtering5 minThe Cold Start Problem4 minTwo-Stage: Retrieval then Ranking5 min