Introduction
In many real-world domains, data is naturally structured as a sequence of unordered sets, a framework referred to as "Sequential Multiple-Instance Learning" (MIL). For instance, an artist's career is a sequence of years, where each year contains a set of paintings. Similarly, environmental monitoring involves sequences of spatial sensor clusters. Traditional models often struggle with this structure: static MIL methods ignore temporal dynamics, while standard sequential models like LSTMs or Transformers require a fixed order, forcing an arbitrary flattening of sets that destroys internal structural information.
The Set2Seq Transformer Architecture
The Set2Seq Transformer addresses these challenges by explicitly modeling both the internal set structure and the overarching temporal dependencies.
The architecture consists of three primary stages:
- Set Representation: At each timestep $t_i$, a permutation-invariant encoder (e.g., DeepSets or Set Transformer) compresses the unordered instances into a fixed-length vector $s_i$. This ensures the model is indifferent to the input order of items within a single set.
- Positional and Temporal Awareness: To capture the nuances of time, the model integrates two types of embeddings:
- Positional Encodings: Represent the relative order within a sequence (e.g., early vs. late career).
- Temporal Embeddings: Capture absolute time (e.g., specific years or months), which is crucial for historical context in art or seasonality in wildfire forecasting.
- Sequence Modeling: The enriched vectors are processed by a standard Transformer Encoder to learn long-range dependencies across the entire sequence for final prediction.
Datasets and Evaluation
The model was evaluated on two distinct benchmarks:
- WikiArt-Seq2Rank: A novel dataset of 59,458 artworks by 849 artists, ranked by success metrics such as Wikipedia mentions, auction revenue, and critical reviews.
- Mesogeos: A public dataset for wildfire danger forecasting in the Mediterranean, featuring 24 environmental variables over 30-day windows.
Key Results
The Set2Seq Transformer consistently outperformed traditional baselines, including bidirectional LSTMs and flattened Transformers.
In the artistic success task, the model achieved superior Bradley-Terry scores and Kendall’s $\tau$ (~0.425) for aggregate ranking. In wildfire forecasting, it demonstrated remarkable robustness, outperforming baselines in 62 out of 64 experimental cases, particularly in "proactive" scenarios with incomplete temporal data. Ablation studies confirmed that the combination of both relative positional and absolute temporal embeddings is vital for peak performance.
Conclusion
The Set2Seq Transformer provides a robust framework for Sequential MIL tasks. By bridging the gap between permutation-invariant set modeling and sequence-aware temporal modeling, it captures complex dynamics in domains ranging from art history to environmental science. Future work will explore pre-training strategies and enhanced interpretability of the model's attention mechanisms.
Summary updated