Introduction
Sequence modeling typically operates at two extremes: strict linear order (e.g., LSTMs, standard Transformers) or complete order-invariance (e.g., Deep Sets). However, real-world data often occupies a "messy middle" known as partially ordered sequences. In these datasets, events are generally ordered over time, but multiple events may occur simultaneously or within the same discrete time-step due to coarse timestamping, sensor latency, or overlapping occurrences.
Common examples include Internet of Things (IoT) sensor arrays where multiple readings are logged at once, or meeting transcripts where multiple participants speak simultaneously. Standard approaches often handle these "equal-time" sets by averaging them into a single vector, a method that acts as an information bottleneck and destroys the internal relationships between concurrent events. This paper proposes a novel hierarchical transformer-based architecture designed to preserve and leverage the structure within these simultaneous event sets.
Proposed Methodology
The authors introduce a hierarchical framework that processes sequences in two stages: first, summarizing the set of simultaneous events, and second, modeling the progression of these summaries over time.
1. Transformer-based Set Processing
To represent a set of simultaneous events without assuming an internal order, the model employs a Transformer-style self-attention mechanism. Unlike standard Transformers used in Natural Language Processing, this component omits positional encodings. Because self-attention is naturally permutation-invariant, it allows the model to compute a representative vector for the set while considering the interactions between all events within that specific time-step.
2. Transition Matrix Integration
In scenarios where an underlying "true" order likely exists but is obscured by simultaneous logging (such as in language), the authors refine the attention mechanism using a transition matrix $T$. This matrix is derived from the ordered portions of the training data and is injected into the attention calculation:
$$x_j = \sum_i [\text{softmax}(q_j k_i) + (q_j + b)^T T_{ij}] v_i$$
This modification allows the model to utilize historical patterns to "guess" the probable sequence of events within a simultaneous set, effectively untangling the data based on learned transition probabilities.
3. Model Variants
The study evaluates several architectural combinations, including:
- ds-LSTM: Deep Sets for set processing combined with an LSTM for sequence modeling.
- trans-trans: A Transformer for the set processing stage and a second Transformer for the temporal sequence.
Experimental Evaluation
The proposed models were benchmarked against four diverse datasets to test their versatility:
- Environmental Sensors (Chicago): A binary classification task predicting if sensor readings (e.g., humidity, light) will exceed specific thresholds.
- Household Power: A prediction task based on appliance power consumption.
- Meeting Transcripts (AMI): A language modeling task involving overlapping speakers, evaluated using next-word prediction (perplexity).
- Business Use Case: A proprietary dataset involving long-duration events.
Results and Key Insights
The experimental results demonstrate that attention-based pooling significantly outperforms traditional averaging.
- Performance Gains: In the Environmental Sensors dataset, the
trans-transmodel achieved an F1-score of 0.983, marking a 10.1% improvement over the LSTM-LSTM baseline. In the Household Power dataset, the improvement reached 21.7% over the naïve averaging model. - Language Modeling: For the AMI meeting transcripts, the inclusion of the transition matrix led to an 8.21% reduction in test perplexity. This confirms that leveraging historical transition data helps the model resolve the ambiguity of simultaneous speech.
- Information Preservation: The study highlights that averaging simultaneous events creates a significant information bottleneck. By using Transformers as set processors, the model maintains the nuances of concurrent data points.
Limitations and Future Directions
While the hierarchical approach shows promise, the authors identify specific limitations:
- Event Nature: The model assumes events are discrete "points-in-time." In the Business Use Case, where events represented overlapping durations rather than instantaneous points, the model's performance was less robust.
- Computational Overhead: Hierarchical Transformers are more computationally intensive than simpler models like Deep Sets or averaging.
- Data Requirements: The transition matrix approach relies on having a subset of strictly ordered data to learn the transition probabilities, which may not be available in all domains.
Future work may explore probabilistic co-occurrence models to better handle events with extended durations and overlapping timeframes.
Summary updated