Large‑scale behavioral pretraining offers a promising path to universal representations in online payment systems. High‑cardinality identity fields such as card numbers, device IDs, and account IDs contain rich behavioral signals, yet their ever‑growing vocabularies and limited semantic meaning make traditional token‑ or semantics‑based encodings ineffective. The transferable information lies in the patterns these identities exhibit across transaction sequences, not in the raw values themselves. To address this, we introduce the ID2Pattern framework, which injects identity behavior patterns into transaction foundation models. First, a Local Anonymous ID (LAID) tokenizer encodes identity fields by tracking each identity’s occurrence count and recurrence positions within a sequence, completely abstracting away the actual values. Then, a multi‑scale pattern codebook is pretrained on unlabeled sequences, converting LAID streams into discrete behavior patterns for downstream risk prediction. Experiments on over 100 M industrial sequences and six public datasets show that ID2Pattern consistently outperforms strong baselines, improving industrial results by 4.13% and public datasets by an average of 8.83%. Notably, the model remains equally effective when all identity values are unseen during training, highlighting strong generalization to new users and markets.
Review: ID2Pattern’s anonymous sequence modeling breaks the sparsity barrier of high‑cardinality identities, delivering a more robust and transferable foundation for transaction risk detection.