NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unsupervised Extraction of Test Scenarios from Time-Series Sensor Data using Trace Graphs

Jannik Brinkmann, Noah Metzger, Christian BarteltHICSS 2024

Abstract

Testing autonomous agents requires diverse and representative test scenarios, yet manual scenario generation is labor-intensive and prone to bias. This paper introduces a fully unsupervised framework to extract meaningful test scenarios from raw time-series sensor data. By representing agent behavior as a "trace graph" and identifying "normal states"—points of high attraction and stability—as natural boundaries, the proposed method segments continuous data into a compact, representative suite of test cases. Evaluation on simulated driving and professional soccer datasets shows a data reduction of 92–96% while preserving the diversity of observed behaviors.

Introduction

The evaluation of autonomous agents, such as self-driving vehicles, relies heavily on scenario-based testing. These scenarios represent specific "scenes"—like navigating an intersection or overtaking a slower vehicle—that challenge the agent's decision-making. However, defining these scenarios remains a significant bottleneck. Manual design requires expensive domain expertise, while existing data-driven methods often rely on supervised learning or rigid, domain-specific assumptions.

This research addresses the challenge of identifying scenario boundaries in continuous sensor streams without prior knowledge of the agent's activities. The goal is to transform massive amounts of raw data into a manageable set of unique test cases.

Methodology

The proposed pipeline automates the transition from raw sensor logs to a refined test suite through four distinct stages.

Overview of the unsupervised scenario extraction pipeline.

1. Trace Graph Construction

Continuous sensor readings (e.g., velocity, orientation) are first discretized into finite states. These states form the nodes of a Trace Graph, where edges represent observed transitions over time. This graph provides a topological map of the agent's entire operational experience, aggregating multiple individual "traces" into a single structure.

2. Normal State Identification

The core innovation lies in identifying "Normal States"—states that serve as natural anchors or boundaries for scenarios. These are identified using two primary metrics:

  • Attraction: Measured via a Markov process stationary distribution, representing the agent's tendency to gravitate toward a specific state.
  • Stability: The probability that the agent remains in a state during the next time step.

States scoring high in both metrics are partitioned as "normal states" using the Fisher-Jenks algorithm. These states typically represent stable, routine behaviors (e.g., cruising at a constant speed).

A Trace Graph with identified "Normal States" (shaded) acting as scenario boundaries.

3. Scenario Extraction and Clustering

A "scenario" is defined as a sequence of states that begins in a normal state, traverses through non-normal states (the "interesting" maneuvers), and concludes in a normal state. To eliminate redundancy, the extracted segments are grouped using Hierarchical Clustering. The Needleman-Wunsch algorithm is employed to calculate distances between sequences of varying lengths, ensuring that only unique, representative scenarios are included in the final test set.

Experimental Results

The framework was evaluated across two distinct domains to demonstrate its versatility: simulated driving (CARLA) and professional soccer player movement.

Dataset Raw Scenarios Clustered Scenarios Data Reduction
CARLA Driving 2,352 83 96%
Soccer Movement 10,002 794 92%

In the CARLA dataset, the system identified three normal states corresponding to linear trajectories at different speeds. The resulting 83 scenarios covered all observed state transitions, ranging from simple cruising to complex overtaking maneuvers. Similarly, in the soccer dataset, six normal states (primarily low-speed linear movement) were used to condense over 10,000 segments into 794 unique tactical scenarios.

Discussion and Conclusion

The "Normal State" heuristic proves to be a powerful, domain-agnostic tool for segmenting time-series data. By focusing on the transitions between stable behaviors, the method captures the most "interesting" parts of an agent's experience.

However, the approach is sensitive to the initial discretization of sensor data; bins that are too wide may merge distinct behaviors, while bins that are too narrow can lead to a state-space explosion. Furthermore, as a purely data-driven method, it is limited to extracting scenarios present in the input logs and cannot inherently generate "black swan" edge cases. Future work involves integrating this extraction method with generative models to synthesize critical variations of the discovered scenarios.

Summary updated

BibTeX
@inproceedings{brinkmann2024unsupervised,
  author = {Jannik Brinkmann and Noah Metzger and Christian Bartelt},
  title = {{Unsupervised Extraction of Test Scenarios from Time-Series Sensor Data using Trace Graphs}},
  booktitle = {HICSS},
  year = {2024},
}
Figure