The ML ladder for attribution
There is a ladder of sophistication for data-driven attribution, and most teams climb one rung too high. Rung one is heuristics (B2). Rung two is a learned credit method - Markov (B4), exact Shapley (B5). Rung three is the one this session lives on: train a machine-learning model to predict conversion, then attribute credit by asking how much each channel-feature moved that prediction. Rung four is deep sequence models. The trap is thinking a taller ladder is always a better ladder. It is not. The right rung is the one your data volume can hold your weight on.
Gradient boosting + SHAP: the pragmatic default 6 min live
Here is the workflow that quietly runs in most serious attribution stacks. You do not model the sequence at all - you featurize each journey (which channels touched it, how often), train a tree ensemble to predict conversion, and then read credit with SHAP. The important thing to internalize: SHAP is not a different idea from Session 5. SHAP is Shapley. It computes each feature's average marginal contribution to a specific prediction - the exact same coalition math you coded by hand - but over a trained model's features instead of over channel presence directly. That is what makes it production-friendly: the model handles interactions and non-linearity, and SHAP hands you back interpretable per-channel credit.
LiveWhy gradient boosting is the right default3 min▶
Tree ensembles - LightGBM, XGBoost - are the workhorse of applied attribution for reasons that have nothing to do with fashion:
- They handle interactions natively. "Paid social only converts when email also touched" is exactly the kind of split a boosted tree finds without you engineering the interaction term. That is the synergy Shapley cares about, learned for free.
- They tolerate modest, messy, tabular data. Thousands of journeys is plenty. No sequence padding, no embedding layers, no GPU.
- SHAP closes the interpretability gap. The classic objection to ML attribution is "it's a black box". SHAP answers it: every prediction decomposes into additive per-feature contributions that sum back to the model output. You can defend each channel's number.
A retail team replaced their linear-attribution report with LightGBM + SHAP and found paid social's credit nearly doubled - not because they changed the rule by hand, but because the model saw that social touches consistently preceded the conversions that email later closed. The heuristic could never see that; the tree split on it in the first few rounds.
Self-studyMean absolute SHAP as a channel weight3 min read▶
SHAP gives you a contribution value for every feature on every row. To turn that into a single channel-level attribution, you take the mean of the absolute SHAP values per channel across all journeys, then normalize to 100%. Absolute, because a channel that reliably pushes the prediction (up or down) is an informative channel - you want its total influence, not its net sign. Normalizing lets you compare directly against your Markov and Shapley numbers from B4 and B5 on the same Lumen data.
| Step | What it produces |
|---|---|
| Train LightGBM on featurized journeys | A conversion probability model |
| TreeExplainer over the eval set | Per-row, per-channel SHAP contributions |
| Mean absolute SHAP per channel | Each channel's total influence |
| Normalize to sum 100% | A comparable attribution split |
Deep sequence models: LSTM + attention 6 min live
Gradient boosting throws away order. Deep sequence models keep it - and that is their whole pitch. Two papers define the space you will hear cited. DNAMTA (Deep Neural net with Attention for MTA) runs an LSTM over the touchpoint sequence and adds an attention mechanism whose weights become the per-touch credit; it also folds in user-context control variables - demographics and behaviour - to reduce the estimation bias of the media effects. DeepMTA uses a Phased-LSTM for conversion prediction (an extra time gate that copes with the irregular gaps between touches) and then an additive feature-attribution layer built on Shapley values for interpretability. Notice the pattern: deep model for prediction, Shapley for credit - the same division of labour as Part 1, just with a fancier predictor.
LiveWhat attention actually buys you3 min▶
Attention is the part worth understanding, because it is where the credit comes from. An attention layer learns a weight for every touch in the sequence - how much the model should "look at" that touch when predicting the outcome. Those weights are interpretable by construction: a high attention weight on the paid-social touch means the model leaned on it to make the call. So the attribution falls straight out of the model instead of being bolted on afterward.
- DNAMTA adds control variables (user demographics, prior behaviour) so the media effect is not confounded by "this was always a high-intent user anyway" - a genuine bias reduction, not just accuracy chasing.
- DeepMTA's Phased-LSTM adds a learnable time gate, so a touch three days ago and a touch three minutes ago are handled differently - the irregular spacing of real journeys becomes a signal instead of noise.
- Both lean on Shapley or attention for the credit read-out. The interpretability problem never went away; it just got a better predictor in front of it.
Self-studyCAMTA and the causal wrinkle2 min read▶
CAMTA is a causal attention variant that adds propensity-style de-biasing on top of the attention mechanism - an attempt to move the credit from "correlates with conversion" toward "caused conversion". It is the same instinct we chase properly with incrementality in B9. Keep it filed under "interesting, and still not a randomized experiment": no observational sequence model, however causal its framing, replaces a real holdout. It sharpens the correlational story; it does not turn it into proof.
When deep learning is worth it - and when it overfits 4 min live
This is the part the papers under-sell and production teams learn the hard way. LSTMs are hungry. They need volume - tens of thousands of labelled conversions, not thousands - to learn sequence structure without memorizing noise. Most brands, Lumen included, do not have that. Overfitting a deep model on sparse conversion data is one of the top pitfalls in this whole field: the validation curve looks fine, the attribution looks precise, and it is precisely wrong, because the model fit patterns that will not repeat. The default is gradient boosting + SHAP. You reach for deep sequence models only when scale genuinely warrants it.
LiveA rule of thumb you can defend2 min▶
When someone proposes an LSTM for attribution, ask three questions before you write any Keras:
| Question | If the answer is "no" |
|---|---|
| Do we have tens of thousands of conversions? | Stay on LightGBM + SHAP. |
| Does touch order plausibly change the outcome here? | A bag-of-channels model loses nothing - stay on trees. |
| Can we hold out a validation window and watch for overfit? | Do not deploy a deep model you cannot audit. |
Featurize Lumen journeys + train LightGBM ★ 12 min · everyone
We collapse Lumen's touchpoint log into one row per journey - a channel-count matrix - and train a gradient-boosted classifier to predict whether that journey converted. Trees do not need the sequence; they need the features.
Featurize, do not sequence. The pivot gives one feature per channel - the count of touches. That is deliberately a bag-of-channels view; order is dropped and the tree still finds the interactions that matter.
Stratify the split. Conversions are the minority class. stratify=y keeps the same conversion rate in train and test so your AUC is honest.
Read AUC, not accuracy. With imbalanced conversions, accuracy is a liar - a model predicting "never converts" scores high. ROC AUC asks whether converters get higher scores than non-converters, which is what you actually care about.
Adding two cheap features to the count matrix - total touch count and journey length in days - usually lifts AUC a few points and gives SHAP something richer to attribute. Resist the urge to add fifty features on a few thousand conversions, though; that is the same overfitting trap as the LSTM, just wearing a tree costume.
SHAP values → channel attribution ★ 11 min · everyone
Now the payoff: turn the trained model into a channel attribution. We run TreeExplainer, take the mean absolute SHAP value per channel, and normalize - a credit split you can lay next to your Markov and Shapley numbers from B4 and B5.
TreeExplainer is exact and fast for trees. It computes Shapley values analytically over the ensemble - no Monte-Carlo sampling like the general case in B5. Same axioms, far cheaper.
Absolute, then mean, then normalize. Absolute value captures total influence regardless of direction; the mean aggregates across journeys; normalizing makes it a comparable 100% split.
Compare, do not just admire. Put this next to your B4 Markov split and B5 exact-Shapley split on the same Lumen data. Where they agree, you gain confidence. Where they diverge, you have found something worth investigating - usually a channel with strong interactions.
Read the tradeoff: GBM+SHAP vs an LSTM at Lumen's size ★ 8 min · everyone
Before anyone proposes a deep model, we count. Lumen's conversion volume decides the honest answer - and this tiny check is the most valuable code in the session.
Lumen has roughly 9,400 conversions. That is a healthy tabular dataset and a starvation diet for an LSTM. The check returns "stay on trees" - and it is right.
The threshold is a guide, not a law. Order-sensitivity, sequence length, and how much your context features help all move the line. But being an order of magnitude under it, as Lumen is, settles the question.
Write the recommendation down. "LightGBM + SHAP is our production attribution model; revisit deep sequence models if monthly conversions pass ~50k." That one sentence saves a quarter of GPU-shaped disappointment.
A team ran the LSTM anyway because it demoed beautifully in a notebook. In production its per-touch credit swung wildly week to week - classic overfit variance on sparse conversions - while the boosted model's SHAP attribution stayed stable. They quietly rolled back to trees and kept the LSTM as a slide. Ship the model that generalizes.
This week ◐ 45 min total
- Add two features and re-measure. Append total touch count and journey length in days to the matrix, retrain LightGBM, and note the change in AUC and in the SHAP attribution. Which channels moved?
- Line up three methods. Put your B4 Markov, B5 exact-Shapley, and today's SHAP attribution side by side on Lumen. Write two sentences on where they agree and where they diverge, and why.
- Skim one paper. Read the abstract and figures of DNAMTA (arxiv 1809.02230) or DeepMTA (2004.00384). Find the sentence where they describe how credit is read out - it is attention or Shapley every time.
- Optional: compute the SHAP-based attribution for only new customers vs returning, and see whether the channel credit shifts. That segmentation is a preview of the reconciliation work in B7.
Three questions before you go 🎯 ◐ 90 seconds
1 · What is SHAP, in one line?
SHAP is not a new idea. It is the same average-marginal-contribution Shapley math you coded by hand, read off a trained model's features - which is what makes it the production interpretability layer.
2 · How does DNAMTA produce per-touch credit?
DNAMTA runs an LSTM over the sequence and uses attention weights as the credit, plus user-context control variables to reduce media-effect bias. DeepMTA does the deep-prediction-then-Shapley variant.
3 · You have ~9,000 conversions and want per-touch attribution. Best move?
LSTMs need tens of thousands of conversions or they memorize noise and report confident, unstable credit. At Lumen's scale, gradient boosting + SHAP is both the safe and the correct default.
What this session covers
This session bridges applied ML interpretability and the deep-MTA literature into a builder-first workflow: the production GBM + SHAP path, and an honest read of the deep sequence models. Papers stay with their authors; we teach the method and the judgement.