Abstract
This study investigates self-supervised learning techniques to obtain representations of Event Sequences. It is a key modality in various applications, including but not limited to banking, e-commerce, and healthcare. We perform a comprehensive study of generative and contrastive approaches in self-supervised learning, applying them both independently. We find that there is no single supreme method. Consequently, we explore the potential benefits of combining these approaches. To achieve this goal, we introduce a novel method that aligns generative and contrastive embeddings as distinct modalities, drawing inspiration from contemporary multimodal research. Generative and contrastive approaches are often treated as mutually exclusive, leaving a gap for their combined exploration. Our results demonstrate that this aligned model performs at least on par with, and mostly surpasses, existing methods and is more universal across a variety of tasks. Furthermore, we demonstrate that self-supervised methods consistently outperform the supervised approach on our datasets.
Introduction
Event Sequences (EvS) consist of discrete events occurring at irregular intervals, such as financial transactions or clinical observations. Unlike the continuous signals in computer vision or the structured tokens in NLP, EvS present unique challenges due to their non-uniform temporal spacing and heterogeneous feature sets.
While Self-Supervised Learning (SSL) has revolutionized other fields, its application to EvS has typically been split between generative models (predicting future events) and contrastive models (distinguishing between sequence variations). This research addresses the gap by integrating these paradigms into a unified framework.
The MLEM Framework
The proposed Multimodal Learning Event Model (MLEM) bridges the gap between generative and contrastive SSL by treating their respective representations as different "views" or modalities of the same underlying data.
- Contrastive Component: Utilizing the COLES framework, the model samples subsequences and trains an encoder to map related segments close together in the embedding space.
- Generative Component: Based on the GNTPP architecture, this component uses an RNN encoder and a Transformer decoder to autoregressively reconstruct the sequence.
- Alignment Module: The core innovation is a SigLIP-inspired alignment loss. Instead of a simple additive loss (the "Naïve" approach), MLEM explicitly aligns the contrastive and generative embeddings, forcing the model to learn a representation that captures both global sequence identity and local structural dependencies.
Experimental Results
The model was evaluated across five diverse datasets: ABank, Age, TaoBao, PhysioNet 2012, and a synthetic Pendulum dataset.
- Superior Performance: MLEM consistently outperformed standalone and naïve hybrid models. On the ABank dataset, MLEM achieved a ROC-AUC of 0.790, compared to 0.729 for contrastive and 0.788 for generative models.
- Computational Efficiency: MLEM offers a significant advantage over Neural Architecture Search (NAS). On ABank, MLEM required only 47 GPU hours, whereas SeqNAS required 288 GPU hours for comparable performance.
- Sequence Sensitivity: A "Bag-of-Words" stress test revealed that shuffling event order had a surprisingly low impact on performance for most datasets, suggesting that current models may rely more on event sets than strict temporal ordering.
Conclusion
MLEM demonstrates that treating different SSL objectives as modalities to be aligned is a powerful strategy for event sequence representation. While the model struggled with the high missingness in the PhysioNet medical dataset, it proved robust and efficient across other domains. Future research will focus on enhancing temporal modeling to move beyond "Bag-of-Words" representations and improving performance on sparse, high-missingness data.
Summary updated