CTR prediction, short for click-through rate prediction, is the task of estimating the probability that a specific user will click a specific item when it is shown in a specific context. In recommender systems it is the core scoring step of the ranking stage: candidate items are scored by a model, and the ones with the highest predicted click probability, often combined with other objectives, are placed at the top of the feed, search results or ad slot.
Because the output is a calibrated probability, not just an ordering, CTR models serve two purposes at once. They rank items for relevance, and in advertising they feed directly into auctions where the expected value of an impression is bid multiplied by predicted CTR.
How CTR prediction models a click
CTR prediction is framed as binary classification over impression logs. Each logged impression becomes a training example with a label of 1 if it was clicked and 0 otherwise, and the model is trained with log loss (binary cross-entropy) to output p(click | user, item, context). Typical click rates are low, often between 0.1% and 5% depending on the surface, so the data is heavily imbalanced.
Inputs are dominated by high-cardinality categorical features such as user ID, item ID, category, device, hour of day and query terms. Each is mapped to a dense embedding vector, and the model learns feature interactions, for example that a given user clicks sports videos mainly on mobile in the evening. The table below groups the usual feature families.
| Feature family | Examples | Role in the model |
|---|---|---|
| User features | ID, age band, long-term interests | Personal preference |
| Item features | ID, category, price, creator | Item appeal and type |
| Context features | Device, time, page position | Situational intent |
| Behavior sequences | Recent clicks and views | Short-term interest |
| Cross features | User category times item category | Explicit interactions |
Model families from logistic regression to deep ranking
CTR models evolved from linear models toward architectures that learn interactions automatically. Early production systems used logistic regression with hand-crafted cross features and online learning. Factorization machines and field-aware factorization machines then modeled pairwise interactions through latent vectors, which generalize to feature pairs rarely seen together.
Deep models combine embeddings with neural layers. Wide & Deep pairs a memorizing linear part with a generalizing deep part; DeepFM replaces the hand-crafted wide part with a factorization machine; Deep & Cross Network adds explicit bounded-degree crossing layers; attention-based models summarize a user’s behavior sequence relative to the candidate item. The following table compares these families.
| Model family | Interaction learning | Strength | Limitation |
|---|---|---|---|
| Logistic regression | Manual cross features | Fast, interpretable | Feature engineering burden |
| Factorization machine | Pairwise latent vectors | Handles sparse pairs | Only second order |
| Wide & Deep | Linear plus MLP | Memorization and generalization | Wide part still manual |
| DeepFM | FM plus MLP, shared embeddings | No manual crosses | Implicit higher orders |
| Deep & Cross Network | Explicit cross layers | Efficient high-order crosses | Tuning of cross depth |
| Sequence attention models | Attention over history | Captures current intent | Higher serving cost |
In large systems, most parameters sit in the embedding tables, which can reach billions of rows. Engineering effort therefore concentrates on feature hashing, embedding sharding and memory-efficient lookups as much as on the network layers.
Where CTR prediction fits in a recommender pipeline
CTR prediction normally runs in the ranking stage of a multi-stage ranking pipeline. Candidate generation, often a two-tower model with approximate nearest neighbor search, narrows millions of items to a few hundred or thousand. A heavier CTR model then scores this shortlist, and a re-ranking step applies diversity, freshness or business rules.
CTR prediction is related to, but distinct from, several neighboring tasks. The comparison below clarifies the differences.
| Task | Predicts | Typical label | Main use |
|---|---|---|---|
| CTR prediction | Click probability per impression | Clicked or not | Ranking, ad auctions |
| Rating prediction | Explicit score | 1 to 5 stars | Preference estimation |
| Conversion rate prediction | Purchase after click | Converted or not | Bidding on outcomes |
| Learning to rank | Relative order of items | Graded relevance | Search result ordering |
Modern feeds rarely optimize clicks alone. Multi-objective recommendation combines predicted CTR with predicted watch time, conversion, likes or dissatisfaction signals into a single score, because optimizing pure CTR rewards clickbait.
Evaluating CTR models offline and online
Offline, CTR models are judged on ranking quality and calibration. AUC measures how well the model orders clicked above non-clicked impressions, and in mature systems an AUC gain of 0.001 to 0.003 is often considered meaningful. Log loss and the ratio of predicted to observed CTR measure calibration, which matters whenever the probability itself is used, as in ad pricing.
Offline metrics are only a proxy. Final decisions rely on online A/B tests that measure click-through rate, engagement, revenue and longer-term retention. A model can raise offline AUC and still lose online if it shifts exposure toward a narrow set of items.
Biases and pitfalls in click data
Click logs reflect what the previous system chose to show, so CTR prediction inherits systematic biases. The table below lists the most common problems and how practitioners address them.
| Problem | Cause | Typical mitigation |
|---|---|---|
| Position bias | Top slots get clicks regardless of relevance | Position feature at training, fixed at serving |
| Exposure bias | Unshown items have no labels | Exploration traffic, inverse propensity weighting |
| Cold start | New items lack ID history | Content features, embedding warm-up |
| Feature leakage | Features computed after the impression | Strict point-in-time feature joins |
| Data drift | Interests and catalog change daily | Frequent or online retraining |
- A feedback loop forms when the model trains on clicks it caused, which can amplify popularity bias and narrow recommendations.
- Negative downsampling speeds up training but shifts predicted probabilities, so outputs must be recalibrated before use in auctions.
- A high click rate does not prove satisfaction; quick returns and hides are important negative signals.
Understanding it simply
CTR prediction is a system’s best guess about whether you will tap on something. Before an app shows you a video, a product or an ad, it scores hundreds of options. Each gets a number such as 3% or 12%. The options most likely to interest you move to the top.
It works a bit like a shop assistant with a good memory. The assistant recalls what you looked at last time and when you usually visit. The guess is never certain. A good system also checks that you were actually happy with what you clicked, not only that you clicked.
Applied in practice
An online retailer shows eight product recommendations on each product page. Its first system ranked items by overall popularity, and the widget reached a click-through rate of about 1.8%. The data science team replaces it with a two-stage pipeline: item-to-item retrieval returns 500 candidates, and a DeepFM-style CTR model scores them using user history, product category, price band, device and page position.
The team trains on 30 days of impression logs, includes slot position as a feature during training and sets it to a fixed value at serving to reduce position bias, and recalibrates outputs after negative downsampling. Offline AUC improves from 0.71 to 0.75. In a two-week A/B test on 10% of traffic, the widget’s click-through rate rises to about 2.4% and attributed revenue grows by roughly 6%.
Because clicks on heavily discounted items rose faster than purchases, the team adds a conversion rate prediction term to the final score, which keeps revenue gains while reducing low-value clicks.