arXiv:2610.27549cs.LGOct 2026

Manuscript Offprint

arXiv:2610.27549

Timing-Aware and Interpretable Self-Attention for Event-Based Wearable Task Transition Detection

Anda Ouyang, Siyuan Chen, Julien Epps

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Anda Ouyang, Student Member, IEEE, Siyuan Chen, Member, IEEE and Julien Epps, Senior Member, IEEE

Abstract—Task transition detection aims to identify when a person shifts from one task to another, providing a foundation for continuous health monitoring and timely context-aware interventions. While statistical and deep feature representations have demonstrated strong classification performance, they often rely on aggregated or latent features that are difficult to interpret in behavioural terms. Event-based features provide a compact and interpretable alternative by encoding salient behavioural and physiological patterns as discrete tokens with explicit semantic meaning, making them well suited for behavioural analysis in health informatics. Self-attention offers a natural mechanism for modelling interactions among such tokens, however conventional self-attention classifiers primarily rely on token order and do not explicitly incorporate real-valued timing or duration information. As a result, temporally informative cues present in event representations may not be fully exploited for task transition detection. This study proposes an event-based time-aware self-attention framework that represents behavioural signals as sequences of discrete events augmented with onset timestamps and durations. Event timing is encoded using a parameter-efficient kernel-based representation, while a novel type-aware duration embedding modulates information propagation according to event persistence. Experiments on a semi-naturalistic wearable dataset show that the proposed model outperforms existing event-based approaches, achieves performance beyond or comparable with statistical and deep-learning models with a more compact input representation, and provides improved interpretability through integrated-gradient-based analysis. These results indicate that explicit modelling of event timing and duration enhances both classification performance and interpretability, supporting reliable deployment in biomedical and health informatics applications.

Index Terms—Event-based representation, attention attribution, integrated gradients, self-attention, task transition detection, time-aware modelling, wearable sensors

I. INTRODUCTION

HUMAN task transition refers to the shift of attention and behaviour from one task to another and is a fundamental component of daily human activity. Accurate detection of task transitions is a key enabler for many biomedical and health informatics applications, particularly in continuous monitoring and context-aware assistive intervention systems. In elderly care, for example, reminders of the change of presbyopic eyeglasses in the transition between sedentary and physical tasks can help reduce the risk of accidental falls [1]. Furthermore, many existing task classification systems operate at the task level [2], [3], requiring tasks to be manually segmented during experiments—an approach that demands substantial human effort and is impractical for real-life systems. Automatic task segmentation based on transition point identification is not only helpful in reducing annotation effort in research studies, but essential for real-world task classification systems that must function without predefined task boundaries [4]. By identifying transitions between functional tasks, such systems enable quantitative analysis of patient activity patterns, therapy engagement, and recovery progression without manual labeling [5], [6].

Fixed sensors and wearable sensors are two main approaches to collect physiological and behavioural signals to detect task transition points. While fixed sensors like cameras and infrared motion sensors installed in the environment [7] provide better infrastructure integration in smart environments, e.g. smart house and car drive systems, wearable sensor devices, such as mobile phones [8], [9] and smart eyeglasses [1], [10] do not restrict the spatial activity range of users and are therefore more suitable for continuous daily-life monitoring. Among the physiological and behavioral signals collected from wearable sensors, body movement characteristics, for example linear acceleration and angular velocities collected from accelerometers and gyroscopes, and eye characteristics, for example blinking, saccade, and pupil diameter change collected from near-field cameras embedded into smart eyeglasses, were shown to be effective in task transition detection [1], [10], as they reflect both physical activity execution and cognitive workload.

Although conventional task transition detection systems primarily rely on statistical features [1], [8], [9] or deep features [11], [12], event-based features, which tokenize continuous-valued signals into discrete events, offer a representation that aligns more closely with how humans perceive and annotate task-related behaviours. Previous studies have shown that event-based features can achieve performance comparable to statistical features while providing enhanced interpretability [10]. Moreover, the discrete nature of event-based features en-

The authors are with the School of Electrical Engineering and Telecommunications, University of New South Wales, Kensington, NSW 2033, Australia (e-mail: {a.ouyang, siyuan.chen, j.epps}@unsw.edu.au;)

IEEE TRANSACTIONS AND JOURNALS TEMPLATE

ables the application of various Natural Language Processing (NLP) techniques. While the effectiveness of combining Bag-of-Words with a conventional Support Vector Machine (SVM) has been validated [10], the potential of more advanced NLP models, such as neural network-based architectures, remains underexplored in the context of event-based task transition detection. In parallel, there is a growing trend across domains such as weather forecasting, electrical grid analysis, and traffic modeling [13], [14] to tokenize continuous time series into discrete deep-learned representations—not primarily for interpretability, but to enable compatibility with transformer-based architectures and to facilitate large-scale pre-training and cross-field transfer learning. These approaches have demonstrated consistent performance improvements in imputation, forecasting, anomaly detection and classification.

Among modern NLP techniques, self-attention-based models such as Transformers [15] and their variants have become dominant in recent research due to their ability to model token-level interactions and their compatibility with parallel computation on GPUs. However, event timing information, which has been demonstrated to be important for task transition detection [10], is typically absent from conventional NLP token representations. While several recommender systems in e-commerce have proposed mechanisms to incorporate event timestamps into self-attention-based models [16]–[19], such time-aware mechanisms have not yet been explored in the context of event-based task transition detection. Moreover, these models only encode timestamps and do not account for the duration of each event, which may also carry essential temporal cues.

Interpretability is critical for deploying wearable-based machine-learning systems in healthcare and human-centred bioinformatics, where model transparency supports clinical trust, system validation, and principled feature design. For task transition detection in healthcare and health informatics applications, understanding event-level contributions provides insight into how behavioural and physiological changes are used by the model, supporting transparent analysis of task transitions that may reflect changes in cognitive or physical state. Network analysis techniques such as Integrated Gradients (IG) [20], [21] enable the analysis of attention mechanisms to reveal token-level contributions, providing a principled basis for interpreting model decisions at the level of individual events. However, such attribution analyses have received limited attention in event-based task transition detection, particularly in conjunction with self-attention models designed to preserve temporal structure.

In this paper, we propose an Event-based Time-Aware Self-Attention model (EvtTiSA) for task transition detection. In addition to adopting the Mercer Kernel approach [16] to encode event timestamps, we introduce a novel encoding scheme for representing event durations within the self-attention framework. Furthermore, we apply the IG technique to analyse the contribution of individual input events to the model's predictions, enhancing the transparency (interpretability) and reliability of event-based task transition detection in real-world scenarios.

References (43)