Guide

Click-through rate (CTR) is the chance that a user clicks an item in a given context. A CTR model estimates P(click | user, item, context). Ads, feeds and many recommenders use it. Often the score is multiplied by a value, such as the money an ad earns when clicked, to get an expected value.

Concept

A categorical feature is a field with a fixed set of values, such as device = mobile. Models usually turn each value into a learned vector called an embedding. Sparse categorical features, such as user IDs, make up most of the input to CTR models.

Four generations

The models you will hear about, in order:

  1. Logistic regression on sparse one-hot or hashed features. It is interpretable and can be calibrated with care. You must build feature crosses by hand, such as user_id × item_category.
  2. Gradient-boosted trees (XGBoost or LightGBM) on dense and sparse tabular features. They are strong at medium scale and work for ranking too.
  3. Wide & Deep (Google, 2016). A linear "wide" part memorizes sparse crosses. A deep MLP generalizes over embeddings. The output is:
y = σ( w_wide · φ_cross(x) + MLP(embeddings(x)) + b )
  1. DLRM-style models (Meta and successors). Embedding tables hold the categorical IDs. An MLP handles the dense features. Dot products between embeddings model interactions, and a top MLP produces the score. This is the common choice when the ID space is huge.

A feature sketch and an expected value

For one feed candidate, a model might use:

  • User: click rate over the last 7 days, follow-graph size, topic preferences.
  • Item: age in hours, the author's past CTR, and how similar its embedding is to the user's.
  • Context: device, country, hour, and the surface (home feed or related items).
  • Crosses: user cluster × author ID for the wide part, and an embedding dot product for the deep part.

The ranker scores each candidate independently, sorts them, and then re-ranking applies diversity rules.

For an ad, the expected value is the click probability times the value of a click. Suppose the model gives pCTR = 0.12 and a click is worth $0.40:

expected value = 0.12 × 0.40 = $0.048 per impression

That number is what an ads auction compares, which is why the probability has to be trustworthy. See calibration.

Common mistakes

  • Using raw position as a feature. The model learns that the top slot causes clicks. See position bias.
  • Using features that are not available at serving time. A feature computed from future data looks great in training and vanishes in production. See ML in production.
  • Expecting a bigger model to fix bad labels. Architecture rarely fixes a label problem.

Check yourself

  1. Why multiply the click probability by the click value? Answer: the expected value is what the platform gets per impression, so the ranking should use it.
  2. What does the wide part of Wide & Deep memorize? Answer: sparse feature crosses, such as a specific user cluster paired with a specific author.

Key takeaways

  • CTR models estimate the chance of a click for a user, item and context.
  • The family grew from logistic regression to boosted trees, Wide & Deep, and DLRM-style embedding networks.
  • Expected value is click probability times the value of a click.
  • Keep features honest: no position leaks and nothing unavailable at serving time.

Further learning

Next, see why raw click logs are biased and how to correct them in position bias.