Set2Seq Transformer: Temporal and Positional-Aware Set Representations for Sequential Multiple-Instance Learning
Athanasios Efthymiou, Stevan Rudinac, Monika Kackovic, Nachoem Wijnberg, Marcel Worring
TL;DR
The paper introduces Set2Seq Transformer, a novel architecture for sequential multiple-instance learning that jointly models permutation-invariant set structure within each timestep and temporal dynamics across timesteps. It constructs per-timestep embeddings via a set encoder (DeepSets or Set Transformer) and enriches them with learnable temporal embeddings and positional encodings, producing a final sequence representation processed by a Transformer to predict outcomes from the last timestep. Evaluated on WikiArt-Seq2Rank for artistic-success ranking and Mesogeos for short-term wildfire forecasting, Set2Seq outperforms static MIL and standard temporal baselines, demonstrating cross-domain effectiveness and robustness to distributional shifts. The approach highlights the importance of integrating within-set permutation invariance with explicit temporal structure to capture both local and global patterns in complex sequential data.
Abstract
Sequential multiple-instance learning involves learning representations of sets distributed across discrete timesteps. In many real-world applications, modeling both the internal structure of sets and their temporal relationships across time is essential for capturing complex underlying patterns. However, existing methods either focus on learning set representations at a static level, ignoring temporal dynamics, or treat sequences as ordered lists of individual elements, lacking explicit mechanisms to represent sets. In this work, we propose Set2Seq Transformer, a novel architecture that jointly models permutation-invariant set structure and temporal dependencies by learning temporal and positional-aware representations of sets within a sequence in an end-to-end multimodal manner. We evaluate our Set2Seq Transformer on two tasks that require modeling both set structure alongside temporal and positional patterns, but differ significantly in domain, modality, and objective. First, we consider a fine-art analysis task, modeling artists' oeuvres for predicting artistic success using a novel dataset, WikiArt-Seq2Rank. Second, we utilize our Set2Seq Transformer for a short-term wildfire danger forecasting task. Through extensive experimentation, we show that our Set2Seq Transformer significantly improves over traditional static multiple-instance learning methods by effectively learning permutation-invariant set, temporal, and positional-aware representations across diverse domains, modalities, and tasks. We will release both the dataset and model implementations on GitHub.
