TAPES: Choosing Predictive Targets for Transaction Sequence Pretraining
How predictable a target is does not establish whether it is useful downstream; supervision should be selected as a whole target set by downstream representation utility, and the selected targets should be modeled with a joint likelihood rather than summed marginal losses.
On this page
For one transaction history, which targets should the encoder predict during pretraining before the model is fine-tuned for risk or churn? One convenient answer is to predict the next event's amount, type, time gap and occurrence flag all at once, on the intuition that more targets mean richer supervision — but that is an engineering intuition, not a documented industry consensus. TAPES tests and rejects exactly that shortcut: a target that is easy to predict may still train a history representation that is useless for the downstream task [1]. Worse, summing per-target losses fits only the marginal distribution of each target, so the conditional co-occurrence among targets never enters the objective.
The default answer: predict every target you can
The default reasoning is simple. Every field in a transaction sequence is worth predicting, more targets mean richer supervision, and a richer signal yields a more general encoder. Following that intuition, a straightforward recipe sums multi-task losses over the next event's amount, type, time gap, and occurrence flag — this describes the recipe the paper sets out to question, not a validated industry standard. The paper raises two objections. First, one field supports targets with different semantics: predicting the next amount's absolute range and predicting its change from the previous event place different demands on the representation — the first rewards capturing scale, the second rewards capturing trend, and a downstream risk model may care about only one of them. Second, summed per-target losses fit only marginal distributions. Figure 1(b) shows two historical contexts with identical per-target conditional marginals but different joint outcome distributions.
So being predictable and being useful are separate properties. A target set here means the whole group of targets predicted jointly in one pretraining run, not a single prediction task. Moving the unit of evaluation from the single target to the whole set is TAPES's first design premise.
Where targets come from: event fields times operators
TAPES defines a target as a pair: an event field plus a prediction operator defined on it, with all admissible combinations forming the target space. Two operator families appear. On categorical fields, operators describe state transitions, relations to previously observed values, or direct prediction over admissible low-cardinality vocabularies. On numerical fields, operators produce value ranges, adjacent differences, and deviations from the mean of valid prefix observations. Numerical outputs are then discretized with target-specific quantile boundaries so heterogeneous targets share one categorical likelihood.
| Operator family | Field | Target semantics | Example |
|---|---|---|---|
| Categorical | Event type and similar | State transition, relation to past values, low-cardinality direct prediction | Whether the next event type equals the previous one |
| Numerical A | Amount, time gap | Value range | Which quantile bin the next amount falls in |
| Numerical B | Amount | Adjacent difference | Increase or decrease relative to the previous event |
| Numerical C | Amount | Deviation from history mean | How far from the observed historical level |
The important point is that selecting targets changes only the output supervision while the input history stays fixed. The encoder sees the same fields; what changes is what it is asked to read out of them. The paper's motivating example is amount: absolute ranges emphasize scale, prefix deviations emphasize departure from the historical level, and the two impose different pressure on the representation.
Selecting a target set: short trials and linear probes
The target set is neither hand-picked nor chosen by lowest pretraining loss. TAPES first builds a finite bank of candidate sets, each a subset of the target space. Default candidates are obtained by changing the field or the operator of one target in a common reference set while preserving set size, and dataset-specific banks can be prespecified. For each candidate, an encoder is trained briefly under the same budget from a shared initialization, frozen, and scored with a linear probe under a common evaluation protocol.
One detail is easy to gloss over and the paper states it explicitly: pretraining, probe fitting, and candidate scoring use three disjoint subsets of the downstream training set. The probe reads only the last valid encoder state of each history and stays fixed during scoring. The resulting score estimates the set-level downstream utility, and the best-scoring set is selected. The encoder is then reinitialized, target definitions and fitted transformations are retained, and stage two begins.
Evidence: five public benchmarks and 29 million examples
Evaluation covers five public financial benchmarks — AlfaBattle, Retail X5, MBD-mini, Rosbank Churn, and Taobao — spanning tasks such as credit default, age classification and next-month purchase; the primary metric differs by dataset (AUROC, macro-AUROC or Macro-F1), so the scores cannot simply be averaged across datasets [1]. A separate private industrial dataset, TransRisk, from a real transaction-risk setting contains over 29 million transaction-level prediction examples and is scored with AUROC, AP, Recall@top1% and AddCB recall at a 0.5% intervention budget — the 29 million counts training/prediction examples, not evaluation rows [1]. Baselines include tree ensembles on aggregated features, supervised sequence encoders, and self-supervised sequence pretraining methods.
- 1. Primary result: the paper reports beating all evaluated baselines on the primary metric in four of the five public benchmarks, with a best average rank of 1.20; the gains in Table 2 are percentages relative to baselines on each dataset's own metric, so they are not one uniform improvement [1].
- 2. Cross-encoder comparison: results hold across encoder architectures, so the method is not tied to one backbone [1].
- 3. Component ablation: target-set selection and joint modeling each contribute; removing either hurts [1].
- 4. Industrial scale: the 29 million figure counts transaction-level prediction examples in TransRisk, not evaluation rows, and it is not a scale the reader is assumed to hold [1].
Where this method stops working
It does not apply when downstream labels are unavailable or too scarce to fit a meaningful probe, because selection is label-guided and short-trial scores then stop tracking final utility. It fails when the useful target lies outside the prespecified candidate bank: selection returns the best set in the bank, not the global optimum of the target space. Cost scales linearly with the number of candidates M, since each one needs its own short run and probe, which is a real budget constraint at large M. Numerical targets rely on quantile discretization fitted on pretraining data and then held fixed, so the target semantics drift when the distribution shifts. Finally, evidence is concentrated on transaction and financial sequences; other event sequences are out of scope, since the paper offers no results there.
One reproduction warning matters more than it looks: target selection consumes labels from inside the training set, and careless splitting leaks information. The paper isolates pretraining, probe fitting, and scoring with three disjoint subsets, and that separation cannot be skipped when replicating [1].
