Interpretable Purchase Intent Prediction Using BERT4Rec Session Embeddings and XGBoost
摘要
Purchase intent prediction from clickstream data is important for e-commerce analytics but remains difficult due to extreme class imbalance and the sequential, context-dependent nature of browsing behavior. We propose an interpretable hybrid framework that couples Transformer based sequential representations with an imbalance-aware gradient-boosted classifier. Specifically, a pretrained BERT4Rec encoder provides contextual item embeddings, which are aggregated into session-level vectors and fused with lightweight behavioral features to form a 71 dimensional representation. An XGBoost model with class weighting and threshold tuning predicts whether a session ends with a purchase, while TreeSHAP delivers global, interaction-level, and local explanations. Experiments on 67 million events and 200,000 constructed sessions achieve an F1-score of 0.459 on the minority purchase class, outperforming classical, sequential, and hybrid baselines. Explanations consistently highlight session depth, product diversity, temporal activity, and several embedding dimensions as key drivers of purchase decisions. These results suggest a practical and transparent approach for conversion-oriented analytics in large-scale e-commerce systems.