PANTHER: Generative Pretraining Beyond Language for Sequential User Behavior Modeling

Guilin Li, Yun Zhang, Xiuyuan Chen, Chengqi Li, Bo Wang, Linghe Kong, Wenjia Wang, Weiran Huang, Matthias Hwai Yong Tan · DOI

Abstract

User behavior modeling in industrial systems faces significant challenges due to high-cardinality, sparse, and irregular transaction data. We present PANTHER (Pattern AttentioN Transformer with Hybrid User ProfilER), a generative pretraining framework that treats multi-dimensional user activities as "behavioral tokens." By utilizing a hybrid generative-discriminative architecture and a novel Sequence Pattern Recognition Module (SPRM), PANTHER captures periodic routines and long-term user states. Evaluated on billions of transactions, PANTHER achieves a 25.6% improvement in next-transaction prediction and a 38.6% boost in fraud detection recall.

Introduction

Industrial payment systems like WeChat Pay or PayPal process billions of transactions daily. Modeling these sequences is critical for fraud detection and personalization but is hindered by label scarcity, overfitting to high-frequency categories, and strict real-time latency constraints. Traditional discriminative models often fail to capture the underlying "grammar" of human behavior—periodic routines like daily commutes or weekly shopping trips.

PANTHER addresses these issues by bringing the "GPT moment" to the behavioral domain, learning robust representations from unlabeled transaction sequences before adapting to specific downstream tasks. This approach allows the model to learn "world knowledge" of how humans spend money before encountering a single fraud label.

Methodology

PANTHER employs a two-stage "pretrain then adapt" strategy centered around three key architectural innovations:

  1. Structured Tokenization: To manage the combinatorial complexity of transaction attributes (e.g., time, amount, merchant), PANTHER maps the top 60,000 most frequent attribute combinations into a unified vocabulary. This covers 96% of all transactions while effectively filtering noise.
  2. Sequence Pattern Recognition Module (SPRM): This module uses depthwise dilated convolutions to capture local and periodic patterns in linear time, avoiding the quadratic computational cost of standard self-attention. It incorporates cross-attention with learnable prototypes—interpretable "spending motifs"—to align raw sequences with behavioral anchors.
  3. Unified User-Profile Embedding: A dedicated "profile token" fuses static demographics with dynamic history. A contrastive learning (CL) objective ensures that users with similar profiles and behaviors are clustered together in the latent space, facilitating knowledge transfer for users with sparse histories.
The PANTHER architecture featuring the SPRM and User Profile Contrastive Learning components.

To meet real-time production demands, the heavy generative model runs offline to cache user embeddings. Online, a lightweight discriminative head fuses these cached long-term insights with the immediate transaction context, adding only ~5ms of overhead.

Experiments and Results

The model was evaluated on a massive scale, including 5.3 billion anonymized transactions from 38 million WeChat Pay users, as well as financial benchmarks (CCT, MBD-mini) and recommendation datasets (MovieLens-1M, Yelp).

  • Next-Transaction Prediction: PANTHER delivered a 25.6% boost in HitRate@1 over standard Transformer baselines on the WeChat Pay dataset. It also achieved a 21% gain on MovieLens-1M, proving the SPRM's general effectiveness.
  • Fraud Detection: In live A/B testing at WeChat Pay, the integration of user profile embeddings and behavioral anomaly scores led to dramatic improvements. The system improved Top-0.1% fraud recall by 38.6% and Top-0.01% recall by 109.5% relative to the DeepFM baseline.
Model improvement in fraud detection recall across different configurations and top-tier percentages.

Conclusion

PANTHER demonstrates that treating user behavior as a distinct modality for generative pretraining can overcome the limitations of traditional supervised learning in industrial settings. By separating compute-intensive understanding from latency-sensitive decision-making, the framework achieves state-of-the-art performance in high-throughput environments. Future work will focus on enhancing the interpretability of these representations to assist human investigators in regulatory and compliance tasks.

Summary updated

BibTeX
@inproceedings{li2025panther,
  author = {Guilin Li and Yun Zhang and Xiuyuan Chen and Chengqi Li and Bo Wang and Linghe Kong and Wenjia Wang and Weiran Huang and Matthias Hwai Yong Tan},
  title = {{PANTHER: Generative Pretraining Beyond Language for Sequential User Behavior Modeling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=4FUdUFvvmp},
}
Figure