Efficient and Practical Approximation Algorithms for Advertising in Content Feeds

Guangyi Zhang, Ilie Sarpe, Aristides Gionis

Efficient and Practical Approximation Algorithms for Advertising in Content Feeds

Introduction

Social media platforms like TikTok and X rely on native advertising, where sponsored content is integrated into infinite-scrolling feeds. Optimizing these placements is a delicate balance between contextual relevance—matching ads to nearby content—and decaying user attention. As users scroll, there is a constant probability $q$ that they will quit the session. Crucially, inserting an ad can reduce the visibility of subsequent organic items, creating a complex optimization challenge known as STRMADS.

The objective function for expected reward in this setting is neither monotone nor submodular, making it notoriously difficult to optimize. Previous practical algorithms only offered a 4-approximation guarantee. This research introduces "backwards-greedy" algorithms that achieve a tight 2-approximation, significantly improving both theoretical bounds and empirical performance.

The Backwards-Greedy Approach

The core innovation of this work is the shift from intuitive "top-down" processing to a backwards (bottom-up) evaluation of the feed.

  • G-BWD (Backwards Greedy): This algorithm processes the feed from the last potential slot to the first. By working bottom-up, it can evaluate the exact marginal gain of placing an ad. The authors prove that in the STRMADS-R setting (where ads can be repeated), this approach is actually optimal.
  • G-BPX (Non-oblivious Backwards Greedy): In the more realistic STRMADS setting where each ad is shown at most once, calculating exact marginal gains is computationally expensive due to cascading attention effects. G-BPX addresses this by optimizing a mathematical lower bound of the marginal gain. This "non-oblivious" strategy is computationally efficient and maintains a 2-approximation guarantee.
Comparison of ad allocation states. In state (a), only ad $a_2$ is placed. In state (b), adding ad $a_1$ reduces the probability of reaching the second slot from $p$ to $p'$, illustrating the attention decay effect.

Why Backwards is Better

Standard greedy algorithms often fall into the "Top-Slot Fallacy," prioritizing the first slots because they are guaranteed to be seen. However, this ignores the dynamic penalty ads impose on user retention. By processing slots from bottom to top, the algorithm perfectly accounts for the decaying attention effect. When evaluating a specific slot, the algorithm already knows the optimal configuration for all subsequent slots, simplifying the marginal gain calculation and avoiding the need for complex re-calculations.

Key Results and Empirical Performance

The proposed algorithms were tested on synthetic datasets and real-world proxies from YouTube and Criteo.

  • Theoretical Tightness: The authors proved that the 2-approximation guarantee for G-BWD and G-BPX is tight; no greedy-style algorithm can achieve a better bound for this problem.
  • Empirical Dominance: Across all tested scenarios, the backwards-greedy methods outperformed existing baselines, including the previous state-of-the-art 4-approximation flow-based algorithm.
  • Efficiency: G-BPX demonstrated significant speedups over G-BWD, making it suitable for large-scale production environments with millions of ads.
  • High Recall: Qualitative analysis showed that these algorithms are better at identifying beneficial ad placements in later slots that traditional methods overlook.

Conclusion

By rethinking the direction of optimization, this research provides a practical and theoretically sound framework for native ad placement. The backwards-greedy approach effectively manages the trade-off between immediate revenue and long-term user engagement. Future work will look to extend these findings into purely online settings where the feed content is generated dynamically in real-time.

Summary updated

BibTeX
@inproceedings{zhang2025efficient,
  author = {Guangyi Zhang and Ilie Sarpe and Aristides Gionis},
  title = {{Efficient and Practical Approximation Algorithms for Advertising in Content Feeds}},
  booktitle = {The Web Conference},
  year = {2025},
}
Figure