In this article
  1. Before you start
  2. Why interviewers ask this
  3. Ad load optimization from first principles
  4. Worked example
  5. Trade-offs and edge cases
  6. How to answer it in an interview
  7. Common mistakes
  8. Follow-up questions
  9. Sources

Before you start

This page belongs to the machine learning (ML) system design interview guide, which shows how the round is run.

Why interviewers ask this

A weak design says "show more ads when the user is engaged" and stops, which fails the first follow-up: how do you know the ads changed the engagement? Candidates report this topic in ML system design rounds for feed and advertising products. A prompt like it tests whether you treat the feed as a trade-off with two goals, keep the ad auction separate from the ad load, and accept that the outcome of a decision you did not take cannot be seen.

A strong answer states the objective with a guardrail, builds a prediction stage and a decision stage, and names the evaluation traps. A Staff-level answer adds how the decision is served within a tight time budget and how long-term damage is caught after a short test shows a revenue win.

Ad load optimization from first principles

Ad load
Ad load is the quantity and pattern of ads that a platform inserts into a user's organic content during a session, set by controls such as the position of the first ad and the minimum gap between two consecutive ads.
Treatment effect
A treatment effect is the difference in an outcome, such as revenue or time spent, between a session that receives one setting (high ad load) and the same session receiving another (low ad load). Only one of the two outcomes is ever observed, so the effect must be estimated.
Area under the cost curve
The area under the cost curve (AUCC) is a number that scores how well a model orders sessions by their sensitivity to ad load, computed from a curve with normalized engagement loss on one axis and normalized revenue gain on the other. A larger area is better.

In plain words

Picture a shop assistant who may hand out leaflets while a customer browses. A well-timed leaflet earns a sale; too many make the customer leave. Ad load is the number and placement of leaflets, chosen per customer. The analogy breaks in one place: a platform cannot watch the same customer under both settings, so it must estimate what the other setting would have done.

In one precise sentence: ad load optimization picks the ad load for each session. It maximizes revenue plus a weighted engagement effect. It uses estimated treatment effects.

Step 1: Name the goal and the knobs

Ad load optimization starts by naming two goals and the settings that move between them. Meta authors (2025) describe it as personalizing the quantity and pattern of ads in a user's organic consumption journey to trade monetization against engagement. The ad load knobs are the position of the first ad and the minimum gap between two ads in a typical newsfeed.

Static ad load is one configuration chosen per user and applied for the whole trajectory. Dynamic ad load is a configuration adjusted in real time during a session, which the paper treats as the more challenging case. Raising the load is expected to lift short-term revenue while hurting engagement, which can eventually damage long-term monetization. When you clarify the problem, also ask about per-user frequency caps, which limit how often one user sees ads and guard against ad fatigue, and about advertiser-side delivery, since fewer slots also changes what advertisers receive. Input: the product's feed. Output: a set of knobs and two metrics. Step 2 shows how to estimate what each setting would do.

Step 2: Estimate the effect of an ad load you did not show

A prediction model estimates the revenue and engagement effects of high versus low ad load for each session, and only one of those outcomes is ever observed. Meta authors (2025) call the problem "highly counterfactual since we can only observe the direct outcome of one treatment at a time". Their prediction module estimates Δrev, the revenue effect, and Δeng, the engagement effect.

The fix is data in which both settings occur. The paper builds training data from a uniformly random policy plus a rule-based policy, and a shuffling scheme called Cookie-Cookie-Day limits feedback-loop bias. A second trap is confounding: after a high-ad-load session, recent organic consumption drops and the time since the last interaction rises, so previous actions are added to the model's state. Input: session context and history. Output: Δrev and Δeng per session. That answers the follow-up: randomize some traffic, then model the difference.

Step 3: Rank sessions with a score and apply a budget

A decision rule ranks sessions by revenue effect plus a weighted engagement effect. In Meta authors (2025) the score is Δrev + α × Δeng, where α is an adjustable weight above zero, and the production data uses α equal to one (section 4.1). Sessions with the highest score get high ad load; the rest get low ad load.

The same model serves two business modes by flipping the selection direction. "Ad score growth" maximizes ad score while keeping engagement loss under a set threshold, and "engagement recovery" maximizes engagement while holding the ad score target. Yan et al. (2020) frame the same trade-off as maximizing revenue while requiring engagement from organic items to stay above a threshold. Input: per-session Δrev and Δeng, α and a threshold. Output: high or low ad load per session.

Step 4: Serve a small model and measure it

A small tree model serves online, and experiments measure the result. In the paper a deep Q-network (DQN) acts as a teacher, and a tree-based student is distilled from it because DQN serving brings infrastructure complications, higher cost and latency. The decision happens on the fly once a session starts, much like real-time fraud scoring.

Evaluation uses the cost curve: the paper reports an AUCC of 0.729 for the teacher, 0.705 for the student trained with the teacher and 0.601 for a student trained without it (Meta authors, 2025, Table 3). Guardrails matter too. Sagtani et al. (2024) analyze the ads-versus-satisfaction trade-off with satisfaction metrics such as engagement, video play and feed depth scrolled, and dissatisfaction metrics such as feed abandonment and session abandonment.

Ad load optimization predicts effects first and decides secondFlow of four stages: the ad load knobs are chosen, a prediction model estimates revenue and engagement effects, a decision rule ranks sessions, and a small model is served and measured.Ad load knobsfirst ad, minimum gapPredictionrevenue and engagementeffectsDecisionscore, rank, apply a capServe and measuresmall tree, cost curveDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/ad-load-optimization-interview-question.html

Ad load optimization is a prediction stage followed by a decision stage, served as a small model and measured in experiments.CC BY 4.0 — source: How do you answer the ad load optimization interview question?
Step-by-step description
  1. Pick the settings that change ad load.
  2. Estimate revenue and engagement effects.
  3. Rank sessions by weighted score.
  4. Serve a small model and measure.
  • The ad load knobs are the position of the first ad and the minimum gap between two ads.
  • A prediction model estimates the revenue and engagement effects of high versus low ad load.
  • A decision rule ranks sessions by revenue effect plus a weighted engagement effect.
  • A small tree model serves online, and experiments measure the result.

Knowing it is half the job. Saying it is the other half.

Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.

Start Free Trial →

Worked example

Take ten sessions with invented effects (illustrative). Each has a revenue gain from high ad load and an engagement change, and the score uses α equal to one.1 Session A gains 6.0 revenue for an engagement change of −1.0, so its score is 5.0. Session B gains 5.0 but loses 4.5, so its score is 0.5. Session D gains 3.0 but loses 3.5, so its score is −0.5. Session I is a counter-intuitive user whose engagement rises by 0.1 with more ads, which Meta authors (2025) note can happen, so its score is 0.9.1

Ranking all ten by score gives A, C, E, G, I, B, J, F, D, H.1 Give high ad load to the top five and compare rules.

Ranking by score reaches a net value of 12.7 for five high-load sessions, against 10.5 for ranking by revenue only and 6.3 for a random pick (illustrative values).1
Rule (illustrative)Revenue gainEngagement changeNet value
High load for all ten sessions26.3-13.712.6
Top five by score14.8-2.112.7
Top five by revenue only20.5-10.010.5
Random five (expected)13.15-6.856.3
Every session with score above zero (seven)20.3-6.713.6
Stop at an engagement-loss cap of 3.014.8-2.112.7

Ranking by score gives a net value of 12.7 against 10.5 for revenue only. A random pick of five sessions gives 6.3 in expectation.1 Revenue-only ranking spends its high-load budget on sessions B and D, which lose the most engagement. Showing every session the high load is worse than the score-above-zero rule, which gives 13.6, because the score screens out the sessions that cost more engagement than they earn. The cap rule walks the ranking and stops before session B would break the cap of 3.0.1

Ranking by score beats ranking by revenue aloneBar chart of illustrative net value when five of ten sessions get high ad load: ranking by score gives 12.7, ranking by revenue only gives 10.5, and a random pick gives 6.3.Net value (illustrative)051015Score rankRevenue onlyRandomRule for picking five sessions12.710.56.3Diagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/ad-load-optimization-interview-question.html
In this illustrative example, ranking by revenue plus weighted engagement beats ranking by revenue alone.CC BY 4.0 — source: How do you answer the ad load optimization interview question?
Text description of the diagram
  • Ranking by score gives a net value of 12.7 against 10.5 for revenue only.
  • A random pick of five sessions gives 6.3 in expectation.

A real reading uses the paper's engagement-recovery test, reported with normalized values (Meta authors, 2025, Table 4). The treated group cut ad impressions by 0.52%, with ad score at −0.002% and time spent at +0.1%. A random reduction of 0.51% in ad impressions lost 0.25% of ad score for +0.08% time spent. The efficiency ratio of engagement growth to ad score loss is 0.1 / 0.002 = 50 for the treated group and 0.08 / 0.25 = 0.32 for the random one.1

Trade-offs and edge cases

Ad load optimization is not the ad auction. The auction decides which ad wins and its price; Google says Ad Rank thresholds are "determined dynamically at the time of each auction". Ad allocation is the placement of chosen ads into the feed after organic items and ads are ranked, which Yan et al. (2020) treat as a post-operation. Ad load optimization sets the constraints that allocation follows, such as first-ad position and minimum gap, which matches the multi-stage funnel.

The auction picks the ad and ad load sets how manyTable comparing the ad auction, ad allocation and ad load optimization by what each decides, what it uses as input and where it sits in the funnel.QuestionAuctionAdallocationAd loadDecidesWhich adwins, itspriceWherechosen adsgoHow manyads, whatpatternInputsBids,quality,thresholdsRankedposts andadsEstimatedsessioneffectsPlace in funnelAd rankingAfter bothrankingsSetsconstraintsfor itDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/ad-load-optimization-interview-question.html
The auction picks the ad, allocation places it, and ad load optimization sets how many ads the feed offers.CC BY 4.0 — source: How do you answer the ad load optimization interview question?
Text description of the diagram
  • The auction decides which ad wins and its price.
  • Ad allocation places chosen ads after organic items and ads are ranked.
  • Ad load optimization sets the constraints that allocation follows.

More ads do not always mean more revenue. In a randomized field experiment on a mobile application store with over five million users, going from one to six sponsored slots raised revenue by up to 43% but cut search conversions by up to 5% and daily engagement by up to 2.2% (Rashid and Yoganarasimhan, 2026). Extra slots paid off for high-conversion queries and little or negatively for low-conversion ones, so one global setting is suboptimal. That test is sponsored search, not a feed, so treat it as evidence of the shape of the trade-off, not a feed benchmark.

Other edge cases: user behavior drifts over time, for example between morning and afternoon, so models can need frequent retraining (Meta authors, 2025, sections 3.2 and 4.1). AUCC can exceed one, because the paper notes that some counter-intuitive users are more engaged after watching more ads (Meta authors, 2025, section 4.2).

A fancier model is not always the right one: the tree student keeps most of the teacher's score, 0.705 against 0.729 (Meta authors, 2025, Table 3), at lower serving cost. Short tests miss long-term damage, so keep a long holdout; Hohnhold, O'Brien and Tang (2015) study how users' behavior changes over long-running ad experiments, which a short test cannot show. Also watch for sudden metric shifts, as in an anomaly-detection system.

How to answer it in an interview

Interviewer asks

How would you design the ad load for a feed?

A strong answer

Ad load optimization is choosing, per user or session, how many ads to show to balance revenue and engagement. I would build two modules. A prediction model estimates, for each session, the revenue and engagement difference between high and low ad load, trained on randomized traffic because only one outcome is ever observed. A decision rule ranks sessions by revenue effect plus a weighted engagement effect and gives high ad load to the top ones within an engagement-loss cap. I would serve a small tree distilled from a heavier model, and judge it with a cost curve and a long holdout, because short-term revenue can hide long-term damage.

The spoken structure: define the goal, say why the effect is counterfactual, give the score and the cap, then serving and evaluation.

Common mistakes

  • "More ads means more revenue." (wrong) Marginal slots earn little or negative revenue for low-conversion queries. (right) "Revenue rises with load for some queries and users and falls for others, so I estimate it per session."
  • "The auction sets the ad load." (wrong) The auction picks the winning ad and price. (right) "The auction chooses which ad; ad load sets how many ads and where."
  • "I will compare users who saw more ads with those who saw fewer." (wrong) Prior sessions and drift confound the comparison. (right) "I randomize some traffic and model the effect."
  • "Revenue went up in the test, so I ship." (wrong) Heavier ad load can hurt long-term monetization. (right) "I check engagement guardrails and a long holdout."
  • "Serve the most complex model." (wrong) Serving cost and latency matter. (right) "I distill it into a small tree."

Follow-up questions

How do you measure whether an ad load system works?

Order sessions by the model's score and plot the cost curve, summarized as AUCC, then confirm with an A/B test on revenue, engagement and guardrails such as feed abandonment. The curve score can exceed one because some users engage more after more ads (Meta authors, 2025, section 4.2).

How do you handle changing user behavior?

Retrain often and put previous actions in the state, since behavior shifts between morning and afternoon and a heavy session lowers the next one's organic consumption (Meta authors, 2025). Monitor the score distribution for drift.

What is the difference between static and dynamic ad load?

Static ad load fixes one configuration per user for the trajectory; dynamic ad load changes it within a session in real time. Dynamic adds a sequential decision, so it is harder.

Why not simply maximize revenue?

Higher load can crowd out organic content and reduce engagement, conversions and later monetization. Treat it as a constrained or weighted problem, such as ad score growth under an engagement-loss cap.

How is ad load different from the ad auction?

The auction picks the winning ad and its price; ad load decides how many slots exist. They are separate levers in the funnel.

What happens to revenue if you go from one ad to six?

In one sponsored-search experiment revenue rose by up to 43% while total search conversions fell by up to 5% (Rashid and Yoganarasimhan, 2026). Say that the answer varies by query and user. To protect later value, link the metric to long-term value prediction.

Key takeaways
  • Ad load optimization personalizes how many ads each user sees to trade revenue against engagement.
  • The effect of an unseen ad load is counterfactual, so randomized traffic and effect models are needed.
  • Rank sessions by revenue effect plus a weighted engagement effect, within a cap.
  • The auction picks the ad; allocation places it; ad load sets how many.
  • Serve a small distilled model and check long-term guardrails, not only short-term revenue.

Sources

  1. Session-Level Dynamic Ad Load Optimization (arXiv 2501.05591) — arXiv (Meta authors; ACM SIGKDD 2025), 9 Jan 2025
  2. Adaptive Ad Load Design for Sponsored Search Markets: Evidence, Theory, and Deployment (arXiv 2607.14418) — arXiv (Rashid and Yoganarasimhan), 15 Jul 2026
  3. Ad Rank thresholds: Definition — Google Ads Help, 26 Oct 2026
  4. Ads Allocation in Feed via Constrained Optimization — ACM SIGKDD 2020 (Yan, Xu, Tiwana, Chatterjee), 23 Aug 2020
  5. Ad-load Balancing via Off-policy Learning in a Content Marketplace (arXiv 2309.11518) — arXiv (Sagtani, Jhawar, Mehrotra, Jeunen; WSDM 2024), 20 Sep 2023
  6. Focusing on the Long-term: It's Good for Users and Business — Google Research (Hohnhold, O'Brien, Tang; KDD 2015), 10 Aug 2015