← All articles
Label definition
ML strategy
Churn modeling

Your label is a product decision nobody made

· 7 minute read · Pivot-al

Ask the finance lead, the product lead, and the head of customer success how many customers churned last quarter. You will get three numbers, each defensible and each from a different query against a different system. Then someone trains a model on one of them, usually whichever was easiest to pull, and the other two teams do not believe its output.

In one representative, anonymized teardown of a Series-B B2B SaaS company, we found "churn" defined three incompatible ways, with no dated label table anywhere. The modeling had started months earlier, and the definition of what was being predicted had never been written down.

How one outcome becomes three

Each team defines the outcome by the system it lives in.

  • Finance counts a churn when recurring revenue goes to zero. The date is the end of the paid term. A customer who gave notice in January on an annual contract ending in June churns in June.
  • Product counts a churn when usage stops, for example when there has been no active user for 30 days. The date is inferred, and a customer can "churn" and come back without ever touching their subscription.
  • Customer success counts a churn when the customer says they are leaving. The date is the notice, recorded in the CRM, sometimes weeks after the conversation.

These disagree on more than the count.

  • The date. The same customer can have three churn dates spread over six months.
  • The unit. Subscription, account, workspace, or parent company. One customer closing one of four workspaces is a churn in one definition and nothing in another.
  • The population. Whether trials, free plans, and customers in their first month are included.
  • The cause. Whether a failed card counts the same as a deliberate cancellation. They respond to different interventions.
  • Partial outcomes. Whether a downgrade from 200 seats to 20 is churn, contraction, or neither.

A model trained on the finance label learns that giving notice predicts churn, which is true and arrives too late to help. A model trained on the product label predicts inactivity, which may be seasonal. Neither is wrong as analysis, but nobody decided that either was the outcome the model should predict.

Why this is a product decision

A label is a statement of what you intend to do with the prediction, so it has to be decided and cannot be looked up.

Start from the action. Who will act on the score, what will they do, and how much lead time do they need for that to work? If an account manager needs six weeks to turn an account around, a model that predicts cancellation seven days ahead is accurate and of no use to them. If the intervention is an automated email on failed payment, the label should be involuntary churn and the horizon is days.

These questions belong to whoever owns the outcome. When that person does not answer them, the data scientist answers them implicitly by choosing a column, and the product decision is made without anyone having decided it.

What a label definition contains

A usable definition has five parts.

  • Eligible population. Who gets a prediction at all. For example: paying accounts, at least 60 days old, not already in a cancellation process.
  • Prediction time. When the score is produced. For example: the first of each month.
  • Observation window. The period before the prediction time that features may draw on. For example: the previous 90 days.
  • Label window. The period after the prediction time in which the outcome counts. For example: the following 60 days.
  • Outcome event. The exact, dated event. For example: a cancellation request recorded by the account owner, excluding payment failures.

Some teams add a gap between prediction time and the start of the label window, so that the model is not rewarded for predicting things already in motion.

Two consequences matter in practice.

First, the most recent data has no labels yet. With a 60-day label window, a prediction made 20 days ago cannot be labeled negative, because the customer has 40 more days to churn. Rows whose label window has not closed must be left out of training. Counting them as negatives teaches the model that recent customers never leave.

Second, the window length is a trade-off. A longer label window gives more positives and more time to act. It also delays every evaluation by that length and blurs what the model is predicting.

The dated label table comes first

Before features and before model choice, build one table: one row per entity per prediction time, with the outcome and the definition that produced it.

CREATE TABLE churn_labels AS
SELECT
  p.account_id,
  p.prediction_time,
  'cancel_request_60d_v1' AS label_version,
  MIN(c.requested_at)     AS outcome_time,
  CASE WHEN MIN(c.requested_at) IS NOT NULL
       THEN 1 ELSE 0 END  AS label
FROM prediction_points p
LEFT JOIN cancellation_requests c
  ON c.account_id = p.account_id
 AND c.reason_category <> 'payment_failure'
 AND c.requested_at >= p.prediction_time
 AND c.requested_at <  p.prediction_time + INTERVAL '60 days'
WHERE p.prediction_time + INTERVAL '60 days' <= CURRENT_TIMESTAMP
GROUP BY p.account_id, p.prediction_time;

Here prediction_points holds the eligible population at each prediction time, and the WHERE clause drops rows whose label window is still open.

This table does several jobs.

  • It forces the definition to be explicit, reviewed, and versioned. If the definition changes, add a version and leave the old one in place.
  • It is the left side of every feature join. Without a prediction time on each row, features cannot be computed as of anything. That is the subject of point-in-time correct features.
  • It makes temporal leakage checkable, because every feature timestamp can be compared with a known prediction time and outcome time.
  • It lets you count what you have, before spending anything on modeling.

It is also often harder to build than expected. Outcome dates live in a system that overwrites them, or the cancellation reason is free text. That difficulty is itself a finding, and it is better to have it in week one.

Signal density: count positives per segment

Once the label table exists, the first query to run is a count of positives, by segment and by time period. The overall number is rarely the problem. The trouble is usually in the counts for individual segments.

An illustrative example, with made-up numbers. A company has 4,000 paying accounts and a monthly churn rate of 2%. That is about 80 positives a month, or roughly 960 over a year, which is enough to work with.

Now split by segment. Suppose 300 of those accounts are enterprise, with a monthly churn rate of 0.5%. That is 1.5 positives a month, about 18 a year. The enterprise segment is where the revenue is, and where the business wants the model most. Eighteen examples will not support a segment-specific model, and they will barely support evaluating one: with 18 positives, moving two of them across the threshold changes recall by 11 points.

There are three options:

  • Pool segments into one model with segment as a feature, and accept that enterprise behavior is mostly inferred from smaller accounts.
  • Lengthen the label window or broaden the outcome, for example to include major contraction, if that still matches an action someone will take.
  • Decide that this segment gets rules and human review, not a model, until more history accumulates.

Any of the three is acceptable, provided the constraint is found before the model is built.

Why a calibrated gradient-boosted model wins here

With a few hundred to a few thousand positives and a table of mixed numeric and categorical features, gradient-boosted trees are the right default, and a deep network usually loses.

  • Data volume. Deep models earn their capacity on large datasets and on raw inputs such as text, images, and long sequences. On small tabular data, that capacity mostly fits noise.
  • Fit to the data. Boosted trees handle missing values, skewed distributions, and unscaled features without much preparation. Business tables are full of all three.
  • Cost of iteration. Training takes seconds to minutes. That allows many strict temporal backtests, and those backtests are what give confidence in the result.
  • Inspectability. When one feature dominates, you see it at once, which is often how leakage is caught.

Calibration matters as much as ranking. A score of 0.3 should mean that about 30 in 100 such accounts churn. The people using the model will multiply that probability by contract value to decide where to spend time, and an uncalibrated score makes that arithmetic wrong.

Boosted models are not calibrated automatically, especially after reweighting or subsampling for class imbalance. Check with a reliability plot on a later time period, and fit a calibrator on held-out data if needed. With thin positives, prefer the sigmoid (Platt) method; isotonic regression is more flexible and tends to overfit on small samples.

Report metrics that respect the base rate: precision and recall at the number of accounts the team can handle, and precision-recall AUC alongside ROC AUC. When positives are few, give intervals instead of point values. The same reasoning for preferring simpler models applies when choosing between an LLM and a classic model, covered in LLM vs classic ML.

Check your own data

If you have a training table already, the leakage check runs in your browser on a CSV sample and flags suspected label, leakage, and drift problems; the data never leaves the browser. If the definition itself is the open question, bring it to a teardown clinic, a free 30-minute live session with a senior engineer. Label definition and signal density are two of the dimensions assessed in the Data & Model Feasibility Teardown, described in data readiness for machine learning.