Skip to main content
ExplainerClick PredictionMeta· 7 min read· in Content Types

How Odds-Ratio Recalibration Restores Click Probabilities Distorted by Negative Downsampling

Machine learning models predicting ad clicks train on artificially balanced data to save compute, inflating their output probabilities. A mathematical correction called odds-ratio recalibration shifts these predictions back to reality, preventing ad auctions from overcharging advertisers.

By Naina Verma

In short

  1. Machine learning models predicting ad clicks discard up to 99 percent of negative examples to save compute costs, artificially inflating their predicted probabilities.
  2. Because ad auctions multiply cash bids by predicted click rates, these inflated probabilities would cause platforms to drastically overcharge winning advertisers.
  3. Odds-ratio recalibration applies a mathematical correction to the model's output, compressing the inflated predictions back to the true real-world base rate.

The binding constraint for any online advertising auction is that the predicted probability of a user clicking an ad must be perfectly calibrated to reality. If a model predicts a 1 percent click-through rate, exactly one out of one hundred users must actually click. Today, that constraint is routinely shattered during training.[2]

Modern recommendation systems cannot efficiently process the true, overwhelming ratio of ignored ads to successful clicks. To survive the sheer volume of incoming data, platforms like Meta and Google artificially alter the universe their models see before training even begins.[1]

They discard the vast majority of negative examples—impressions that did not result in a click. This practice, known as negative downsampling, saves millions of dollars in compute costs. However, it forces the model to learn in a distorted reality where clicks appear vastly more common than they actually are.

The result is a highly discriminative model that ranks ads perfectly but outputs wildly inflated probabilities. If deployed directly into a live auction, these overconfident predictions would cause the system to drastically overvalue bids, bankrupting advertisers and destroying the market's economic equilibrium.

Restoring the model's connection to reality requires a mathematical intervention known as odds-ratio recalibration. By applying a closed-form prior correction to the model's output, engineers can shift the predicted probabilities back to the true production base rate without having to retrain the system.

Downsampling discards the vast majority of ignored ad impressions to create a balanced training dataset.

The Compute Bottleneck

In a realistic production environment, the baseline click-through rate for display advertising is exceptionally low. Positives, or actual clicks, generally account for merely 1 to 2 percent of the total dataset. The remaining 98 to 99 percent consists of negative examples, representing users who scrolled past without interacting.[1]

Training a gradient-boosted decision tree or a deep neural network on billions of these negative observations is computationally wasteful. The model spends the majority of its processing time learning that most users ignore most ads. This is a trivial baseline that does not help it distinguish between candidates.

To accelerate training and focus the model on the boundary between success and failure, engineers employ negative downsampling. They retain 100 percent of the rare positive clicks but randomly sample only a small fraction—often 1 percent or 10 percent—of the negative impressions.

This technique balances the dataset, providing the algorithm with a much denser concentration of signal. A 2014 paper by Facebook AI researchers demonstrated that downsampling accelerates training times by orders of magnitude while maintaining the model's ability to rank candidates accurately.[1]

Distorting the Base Rate

While downsampling solves the compute bottleneck, it introduces a severe calibration penalty. As the machine learning documentation at DSWOK notes, "The raw model output is calibrated to the training sample, not the production base rate." The model learns a baseline that simply does not exist in the real world.

Consider a scenario where the true historical engagement rate is 0.5 percent. If engineers downsample the negative examples by retaining only 1 percent of them, the observed class proportions in the new training sample shift dramatically. In this downsampled space, the ratio of clicks to non-clicks becomes roughly 34 to 66.

Models trained on downsampled data output wildly inflated probabilities that do not match real-world engagement rates.

When the trained model evaluates a new ad, it outputs a probability based on the 34 percent baseline it was taught to expect. An ad that would genuinely receive a 0.5 percent click-through rate in production might receive a predicted probability of 50 percent from the model.

In a purely ranking-based system, this inflation would not matter. If the model simply needed to sort ten ads from best to worst, the relative order would remain correct regardless of the absolute probability values. However, modern ad platforms do not merely rank; they run real-time generalized second-price auctions.

The Economics of Calibration

In an ad auction, the predicted click-through rate is a direct financial multiplier. Platforms calculate the expected value of an impression by multiplying the advertiser's cash bid by the model's predicted probability of a click.[2]

If a model predicts a 50 percent chance of a click for an advertiser bidding two dollars, the auction engine values that impression at one dollar. If the true probability is actually 0.5 percent, the real expected value is exactly one penny.[2]

Feeding uncalibrated, downsampled predictions into the auction would cause the platform to overcharge winning advertisers by a factor of one hundred. The system would optimize for phantom clicks, draining campaign budgets in minutes and destroying the trust required to sustain the advertising ecosystem.

To prevent this catastrophic failure, the model's output must be recalibrated before it reaches the auction logic. The predicted score must be mathematically translated from the artificial downsampled space back into the original, highly imbalanced production space.

The closed-form prior correction mathematically reverses the distortion introduced during training.

The Recalibration Formula

The industry standard for this translation is a closed-form prior correction, often referred to as odds-ratio recalibration. The calibrated probability is calculated by dividing the predicted probability by a specific denominator. That denominator is the predicted probability plus the quantity of one minus the prediction, divided by the downsampling rate.

Expressed mathematically, the correction is q = p / (p + (1 - p) / w). Here, p is the raw prediction from the model, w is the negative downsampling rate used during training, and q is the final, calibrated probability.

Applying this formula to our previous example perfectly reverses the distortion. If the model predicts a 50 percent probability and the engineers used a 1 percent downsampling rate, the denominator becomes 0.5 plus 50.[2]

Dividing the 0.5 numerator by 50.5 yields a calibrated probability of 0.0099, or roughly 1 percent. The mathematical correction successfully compresses the inflated 50 percent prediction back down to the reality of the production environment, allowing the auction to price the bid accurately.[2]

Evaluating the Correction

Because calibration is critical to revenue, engineering teams cannot rely on standard classification metrics like the Area Under the Receiver Operating Characteristic Curve. This metric only measures discrimination—how well the model ranks positives above negatives—and completely ignores the absolute scale of the probabilities.

Instead, platforms evaluate calibration using the Expected Calibration Error or the Brier score. The Brier score is a strictly proper scoring rule, meaning "its expected value is minimized only when reported probabilities equal the true probabilities."

Applying the prior correction reduces calibration error by more than an order of magnitude without requiring model retraining.

A 2026 empirical analysis of tabular models demonstrated the sheer power of the odds-ratio correction. For a gradient-boosted tree trained with a class weight of 4.73, the raw Expected Calibration Error was a heavily distorted 0.260.

Applying the standard closed-form prior correction without any model retraining reduced the error to 0.007, an improvement of more than an order of magnitude. The correction proved equally effective across LightGBM, Random Forest, and logistic regression architectures.

Limitations and Edge Cases

While odds-ratio recalibration is a mathematical necessity, it is not a flawless panacea. The formula assumes that the prior shift is uniform, meaning the sampling probability depended exclusively on the class label, with all negative examples downsampled at the exact same rate.

If the downsampling rate varies by feature, user segment, or time of day, the global odds-ratio adjustment will leave residual miscalibration in specific slices of the data. In these complex scenarios, teams must rely on importance weighting during training or isotonic regression on an unbiased validation set.

Furthermore, recalibration cannot fix a model that is fundamentally misspecified. If a deep neural network is poorly regularized or trained on stale data, its internal logic will be flawed. The recalibration formula will faithfully translate those flawed predictions back to the base rate, but the resulting probabilities will still be wrong.

Illustration: Recalibration ensures that the final probabilities fed into the auction engine accurately reflect the real world.

Ultimately, negative downsampling and odds-ratio recalibration represent a pragmatic compromise. By decoupling the computational heavy lifting of pattern recognition from the strict economic requirements of the auction, platforms can train massive models efficiently without losing their grip on reality.[2]

How we did this

Method
Calculated the financial distortion in a generalized second-price auction by applying uncalibrated downsampled probabilities to a standard advertiser bid.
What we found
Demonstrated that a model trained with a 1% negative downsampling rate would inflate the expected value of a $2.00 bid from its true value of $0.01 to an artificial $1.00, overcharging the advertiser by a factor of 100.
What we worked from
Limits of this analysis
This financial calculation assumes a pure expected-value auction without additional bid shading or budget-pacing constraints applied by the platform.

Jargon, explained

Negative Downsampling
The practice of randomly discarding a large percentage of negative examples (such as ignored ads) from a dataset to accelerate machine learning training.
Odds-Ratio Recalibration
A mathematical formula used to translate inflated probability predictions back to their true, real-world base rate.
Expected Value
In ad auctions, the financial worth of an impression, calculated by multiplying the advertiser's bid by the predicted probability of a click.
Expected Calibration Error (ECE)
A metric that measures how closely a model's predicted probabilities match the actual empirical outcomes.
Brier Score
A strictly proper scoring rule that evaluates the accuracy of probabilistic predictions, penalizing models that are overconfident or miscalibrated.
Base Rate
The true, historical frequency of an event occurring in the real world, such as the actual 1 percent click-through rate of display ads.

Common questions

Why can't models just train on the raw, imbalanced data?

Training on billions of negative examples is computationally expensive and yields diminishing returns. The model spends most of its compute power learning the trivial fact that most ads are ignored, rather than learning the subtle differences between successful and unsuccessful ads.

Does negative downsampling hurt the model's accuracy?

It generally improves the model's ability to rank ads by providing a denser concentration of useful signal. However, it destroys the absolute scale of the predicted probabilities, which is why recalibration is strictly required before the auction.

Can this formula fix predictions if the downsampling rate wasn't uniform?

No. The standard odds-ratio formula assumes every negative example had the exact same chance of being discarded. If engineers downsampled mobile users at a different rate than desktop users, a single global correction will leave residual miscalibration.

Why is calibration more important than ranking in an ad auction?

Auctions multiply the advertiser's cash bid by the predicted click probability to determine the expected value of the impression. If the probability is inflated, the platform will overvalue the bid and overcharge the winning advertiser, breaking the market's economics.

Competing readings

Machine Learning Engineers

Focus on computational efficiency and signal density during model training.

For the engineering teams building recommendation systems, negative downsampling is a survival mechanism. Processing billions of negative impressions requires massive GPU clusters and weeks of training time, yielding diminishing returns. By discarding the noise, engineers can iterate faster, test new features daily, and train highly discriminative models that rank candidates perfectly. To this camp, the resulting calibration distortion is merely a downstream mathematical artifact that is easily fixed with a closed-form equation.

Ad Auction Economists

Focus on market equilibrium, expected value, and accurate pricing.

Economists designing the auction mechanics view uncalibrated probabilities as an existential threat to the platform. Because generalized second-price and Vickrey-Clarke-Groves auctions rely on expected value to clear the market, an inflated click probability acts as an artificial multiplier on the advertiser's bid. This camp insists on rigorous odds-ratio recalibration and strict monitoring of the Brier score, knowing that even a slight calibration drift can overcharge buyers, exhaust campaign budgets prematurely, and destroy advertiser trust.

Advertisers and Media Buyers

Focus on return on investment and avoiding artificially inflated costs.

Advertisers care exclusively about the actual return on their ad spend. They rely on the platform's internal models to accurately assess the likelihood of a conversion so that their automated bids remain profitable. From their perspective, any failure in the recalibration pipeline means they are paying premium prices for low-quality impressions. They demand transparency in how platforms calculate expected value, as their campaign profitability hinges entirely on the accuracy of the final, calibrated click-through rate.

Machine Learning Engineers 40%Ad Auction Economists 35%Advertisers and Media Buyers 25%
Machine Learning Engineers
Focus on computational efficiency and signal density during model training.
Ad Auction Economists
Focus on market equilibrium, expected value, and accurate pricing.
Advertisers and Media Buyers
Focus on return on investment and avoiding artificially inflated costs.

Perspectives this story doesn't cover

  • Retail Advertisers
  • Privacy Advocates

Sources

Source coverage

2 outlets

3 viewpoints surfaced

Machine Learning Engineers 40%Ad Auction Economists 35%Advertisers and Media Buyers 25%
  1. [1]Quinonero.netMachine Learning Engineers

    Practical Lessons from Predicting Clicks on Ads at Facebook

    Read on Quinonero.net →
  2. [2]Factlen Editorial TeamAdvertisers and Media Buyers

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team →

Comments

Stay informed

Every angle. Every day.

Get Content Types stories with full source coverage and perspective breakdowns, free every day.