Abstract
TimeInf is a new, model-agnostic framework designed to measure the contribution of individual data points in time series datasets. By integrating influence scores across multiple overlapping temporal windows, it successfully accounts for time-based dependencies, outperforming state-of-the-art anomaly detectors and providing a principled way to identify the most (and least) valuable data for forecasting.
Introduction
In machine learning, data attribution seeks to answer: "Which training points actually helped the model, and which ones hurt it?" For standard datasets consisting of independent and identically distributed (I.I.D.) samples, Influence Functions are used to calculate how a infinitesimal change in a specific point's weight affects the model's final parameters.
However, time series data breaks the fundamental assumption of independence. In a time series, a data point at 10:00 AM is inherently linked to what happened at 9:59 AM. Standard influence functions ignore this temporal structure, leading to poor results. Previous attempts to address this were either limited to simple linear models or required specific, complex architectures. TimeInf provides a general-purpose way to measure data contribution across diverse models, from LSTMs to Transformers.
Methodology
TimeInf shifts the focus from individual points to time blocks to preserve temporal context. The framework operates through three primary steps:
- Block Influence: Instead of asking how a single point affects the model, TimeInf calculates how a contiguous block of points (a "window") affects the model parameters.
- Integration: A single time point $z$ appears in many different overlapping windows. TimeInf calculates the total influence of $z$ by aggregating (integrating) the influence scores of every window that contains it. This ensures the point is evaluated within various historical contexts.
- Model-Agnosticism: Because it relies on gradients and Hessian approximations, TimeInf works with almost any differentiable model. For non-differentiable models, a non-parametric version based on subsampling is available.
To maintain computational efficiency and avoid the "Hessian bottleneck" common in deep learning, TimeInf utilizes efficient approximation techniques like the Conjugate Gradient method and Hessian-free optimization.
Experimental Evaluation
The researchers evaluated TimeInf across two main tasks: anomaly detection and data pruning for forecasting. Anomaly detection was tested on five major benchmarks: UCR (250 diverse univariate series), SMAP and MSL (NASA spacecraft telemetry), NAB-Traffic, and SMD (Server Machine Dataset).
Key Results
TimeInf demonstrated superior performance across nearly all benchmarks, particularly in identifying anomalies and valuable training data.
- Superior Anomaly Detection: On the UCR dataset, TimeInf achieved an AUC of 0.79, a roughly 20% improvement over established competitors like Isolation Forest and state-of-the-art transformer-based detectors like TranAD.
- Self-Influence as a Proxy: The authors found that "self-influence"—how much a point influences its own prediction—is a powerful proxy for anomaly detection. If a point is highly influential on its own outcome, it suggests the rest of the "normal" data could not explain it.
- Data Debugging: TimeInf often flagged visual anomalies that human annotators missed in standard benchmarks, suggesting it could be used to audit and improve the quality of training data.
- Efficiency: Despite its mathematical complexity, TimeInf is computationally efficient. On the UCR dataset, it ran in ~23 seconds, while some competitors took over 25 minutes.
Limitations and Future Work
While TimeInf excels on univariate and moderately multivariate data, its performance gains become marginal on very high-dimensional datasets. This may be due to the difficulty of capturing correlations across hundreds of dimensions simultaneously. Future work could explore adapting TimeInf for specific business metrics beyond validation loss or refining how it handles complex inter-dimensional dependencies in multivariate series.
Summary updated