Subscription drivers: an XGBoost model explained with SHAP
A model that predicts whether a trial user of a language-learning app will subscribe, and a SHAP analysis of which signals move that prediction and in which direction.
Why the company needed it
Bright Mobile Apps sells subscriptions to language-learning apps. A user starts with a free trial and then either pays or leaves. The team had long-standing assumptions about who subscribes: users who practise more, users from richer countries, owners of expensive phones, users who start in a good season, and so on. They were discussed one by one, but nobody had tested them on large data.
I built a model that predicts subscription from 100+ signals about each user and used SHAP to see which factors the model relies on in its forecast. The output was a ranked list of factors of future subscription for potential product hypotheses. Each hypothesis was then tested in an A/B test.
The task
- Prediction: whether a user who activated a trial subscribes (1) or not (0). The model gives the probability of 1.
- Data: all user events exported through the Amplitude API for about two years. Only users who activated a trial were included.
- Split: 249,323 users for training and 43,999 users in a separate test set that the model did not see during training. About 33% of users subscribed (33.4% in both sets).
- Model quality on the test set: ROC-AUC 0.916, accuracy 0.836, F1 0.772, precision 0.72, recall 0.83.
What the quality metrics mean
ROC-AUC is the chance that the model gives a random subscriber a higher score than a random non-subscriber. 0.5 is a coin toss and 1.0 is a perfect ranking, so 0.916 means the model separates the two groups well. Precision 0.72: of the users the model marked as future subscribers, 72% actually subscribed. Recall 0.83: the model found 83% of the users who subscribed.
Data and features
More than 100 features in five groups:
- Trial and plan: trial cancellation, plan type, start month.
- Geography and device: country, app language, device price, display settings.
- Survey: age, goal, language level, welcome test.
- Learning in the first days: lessons, word repetitions, sessions, return visits.
- Feedback: the answer to "Do you like the app?".
How the features were prepared
All features were rescaled to a 0–1 range: 0 is the lowest value in the data, 1 the highest. For device price, 0 is a $40 device and 1 is a $1,400 device. Yes/no features become 0 and 1. Country and locale enter the model as numbers: the historical subscription conversion of that country or locale. On the charts, a country further to the right is a country where trials historically converted better.
Model and why SHAP
XGBoost builds hundreds of small decision trees, and each new tree corrects the errors of the previous ones. It works well on tabular data and picks up non-linear effects and combinations of features.
SHAP then provides the explanations. For every user it starts from the model's average prediction and assigns each feature a push up or down. The pushes add up exactly to that user's prediction. The average size of the pushes ranks the features. Their sign and their link to the feature value show the direction.
Charts

Each row is a feature and each dot is a user. The horizontal position shows how far that feature pushed this user's prediction: right is towards subscription, left is away from it. Colour is the feature's value: red is high, blue is low. Rows are sorted by average impact. Example: for trial_cancel_any_day_except_0, red dots (cancelled) lie far to the left, so a cancellation pulls the prediction down sharply. The key insight lies in the shapes of the features: for example, sometimes high values of a feature raise the probability of subscribing, while low values barely lower it.

The horizontal axis is the feature value: total number of sessions, from 1 to 11+. The vertical axis is that feature's SHAP value. Colour is a second feature: red means the user cancelled the trial on day 0. The black line is the median and the grey band holds 95% of users. The chart shows how the effect of sessions grows with their number. For users who cancelled on day 0, each extra session raises the forecast more than for the rest: among those who cancelled, many sessions are a strong sign that the user will still subscribe. The cancellation itself stays a strong negative, so overall their chance of subscribing is lower.

This chart breaks down the subscription probability for one user. The bottom value E[f(X)] = −2.754 is the starting value in the internal scale. The top value f(x) = −2.576 is the final score for this user, which corresponds to a 7.1% probability of subscribing. User #400 did not subscribe. Each bar is one feature's push, with the feature value on the left. For this user, not cancelling the trial pushed the prediction up (+0.87 and +0.85). Country (−0.81), locale (−0.71) (here India, hi) and an inexpensive device pulled it down. The "Do you like the app?" answer added +0.27.
What the SHAP numbers mean
SHAP values here are in the model's internal scale, log-odds, and are not percentages. A push of +1 changes the probability by different amounts depending on where the user starts: it matters more for a user at 50% than for a user at 5%. The base value on the waterfall chart, E[f(X)] = −2.754, is the average in this internal scale. Converted to a probability it gives about 6%, which is not the share of subscribers: the model is very confident about most users, and on this scale confident "no" predictions pull the average far down. Where this page gives percentage points (pp), they were computed for a user at about 31% with everything else unchanged. They are approximate. The SHAP ranges below are the typical (median) values at the lowest and highest feature values, not the extremes.
Some specific findings
Trial cancellation. The two strongest features in the model. The typical SHAP value of a cancellation is −3.5 on day 0 and −3.8 on later days, about −29 pp and −30 pp for a user at about 31% (Fig. 4). 70–75% of trial users do not cancel on day 0, and all of them got a positive push. A later cancellation weighs more than a day-0 one. The team's hypothesis: day-0 cancellations often come from users who are afraid to forget, and later ones from users who did not like the app.

Sessions after a day-0 cancellation. Among users who cancelled on day 0, each extra session raised the prediction more than among users who did not cancel, starting from about 3 sessions (Fig. 2). Cancellation itself stays strongly negative. No such pattern appears for later cancellations. Hypothesis: these users subscribe to a discounted cross-grade plan.
Country and locale. Third and fourth by importance. Country: SHAP from −1 to 0.8 (−17 to +19 pp). Locale: from −1.2 to 0.8 (−19 to +19 pp). Countries with a historical conversion above 0.33 push the prediction up on average. From the strongest: Israel, Switzerland, Norway, the USA, Japan, Austria, Finland, Australia, Sweden, the Czech Republic, Canada, Germany, the Netherlands, Taiwan, France, Turkey, Spain (Fig. 5). Locales in the same order: he, nb, ja, fi, nl, pt-BR, sv, de, cs, es-419, es-ES, fr, tr, zh-Hant, el, it, ko.

Device price. Fifth of 100+ features. SHAP from −1 to 0.4 (−17 to +9 pp). The push turns positive above about $700 (Fig. 6). A plain comparison gives the same direction: subscribers' devices have a higher mean and median price at every language level, and the gap is largest among beginners (Fig. 7). An expensive device in a low-conversion country gets a larger push than the same device in a high-conversion country (in poorer countries an expensive smartphone is a stronger sign of wealth).


Learning in the first days. Lessons on day 0 and day 1 barely move the prediction. Lessons beyond the daily plan on those days have a small negative effect. From day 2 the pattern reverses: two or more lessons push the prediction up. Lessons on days 3–4 have one of the strongest activity effects, SHAP from −0.1 to 0.7 (−2 to +16.5 pp), and one finished lesson already gives a visible rise (Fig. 8). Total sessions: SHAP from −0.1 to 0.4 (−2 to +9 pp), positive from 4 sessions including day 0. Word repetitions after day 0 help from 4 repetitions.

Survey and settings. Ages 35–50 (up to +7 pp) and 50+ (up to +12 pp) push the prediction up, and 16–25 pulls it down (to −4.4 pp). A larger system font is linked to a higher prediction (−3 to +6.5 pp), partly because older users choose bigger fonts. About 40% of users always see the app in dark mode. The more time a user spends in dark mode, the lower the push (−2 to +1.3 pp). Users with 20–60% correct answers in the welcome test subscribe worse than those with 80%+ (−2.6 to +1 pp).
Plan, feedback, season. A trial on the yearly $80 plan lowers the prediction (−5.5 to +4 pp), and a trial on the weekly $10 plan raises it (0 to +4 pp). Answering "yes" to "Do you like the app?" adds up to +5.6 pp. "No" and no answer both lower the prediction. The trial start month has a small effect (−4 to +2 pp). May is the weakest month in both the model and the raw monthly conversion.
How the results were used
The analysis produced a list of hypotheses. These were taken further:
- Payment anxiety: a "Trial info" screen.
- Dark theme improvements, because users who spent more time in dark mode converted worse.
- A soft paywall for users on cheaper devices.
- Price experiments in different countries.
- Special offers for young users (students).
More than 10 hypotheses from the analysis were later confirmed by A/B tests. The analysis also gave ideas for UA (country and device segments with trial LTV, a seasonal country mix) and for the first days of the trial (more varied tasks, so that more users reach days 3–4).