Introduction
Sequential Pattern Mining (SPM) is a fundamental task in data science, typically used to identify frequent sub-sequences within databases—such as identifying that customers who purchase bread often subsequently buy milk. However, traditional SPM often overlooks "negative" patterns: events that were expected but did not occur. This paper introduces One-off Negative Sequential Pattern (ONP) mining, a framework designed to identify these absent events while accounting for their frequency and specific distance constraints. The proposed ONP-Miner algorithm addresses the limitations of existing methods by incorporating a "one-off" condition and user-defined gap constraints, offering significant improvements in efficiency and actionable insight discovery.
The Challenge of Negative Sequential Patterns
Negative Sequential Pattern Mining (NSPM) is critical for applications like fraud detection or medical diagnosis, where the absence of an action is as informative as its presence. For instance, a student missing breakfast multiple times before a failing grade constitutes a negative pattern.
Existing NSPM methods face two primary hurdles:
- Binary Representation: Many algorithms treat patterns as binary (present or absent), ignoring the frequency of occurrences within a single sequence.
- Constraint Management: Most methods fail to account for "gap constraints"—the maximum allowable distance between events. Without these, algorithms often produce a surplus of mathematically frequent but practically irrelevant results.
The ONP-Miner Algorithm
The ONP-Miner algorithm is built upon three technical pillars designed to optimize search and accuracy:
1. The One-off Condition
To provide a realistic measure of frequency, the algorithm ensures that each character in a sequence is utilized at most once for any single pattern match. This "one-off" rule prevents over-counting in dense data streams like traffic logs or genomic sequences.
2. MatchDB and Backtracking
Instead of building memory-intensive "nettrees," ONP-Miner utilizes the MatchDB algorithm. MatchDB employs depth-first search (DFS) and backtracking to identify occurrences. This approach allows the system to "fail fast," avoiding the creation of redundant nodes and unnecessary parent-child relationships.
3. Pattern Join and Pruning
The search space for negative patterns is exponentially larger than for positive ones. ONP-Miner manages this complexity through a "pattern join" strategy and pruning based on anti-monotonicity: if a positive version of a pattern is infrequent, its negative counterpart is also unlikely to be significant.
Experimental Evaluation
The researchers evaluated ONP-Miner across nine diverse datasets, including biological sequences (ASTRAL, DNA), human behavior (credit card records), transportation (bike-sharing, traffic volume), and medical data (diabetic symptoms).
Key Results
- Efficiency: On protein data (SDB1), ONP-Miner was approximately 4x faster than the baseline SRMP-N algorithm, completing tasks in 0.625s compared to 2.094s.
- Search Space Reduction: The "Pattern Join + Pruning" strategy reduced candidate patterns by orders of magnitude—in one instance, from 400 candidates to just 32.
- Real-World Utility: In a traffic volume case study (SDB10), the algorithm identified 89 frequent negative patterns (e.g., traffic failing to reach a threshold during peak hours) compared to only 4 positive ones, providing a superior basis for flow prediction.
Discussion and Future Directions
The shift to a DFS/backtracking approach represents a significant performance breakthrough. Furthermore, by allowing users to set gap constraints, the algorithm effectively filters noise, focusing on events that occur within a relevant temporal or spatial window.
While ONP-Miner is a major advancement, future work could explore incorporating "utility" metrics such as profit or risk, or developing "self-adaptive" gaps that can be learned from the data itself. In conclusion, ONP-Miner provides a robust framework for discovering complex, non-overlapping negative patterns, transforming the way we analyze the significance of absent events in sequential data.
Summary updated