ASAP: Time Series Smoothing Framework
- ASAP is an automated framework that smooths high-frequency time series data while preserving key deviations through a formal kurtosis constraint.
- It employs techniques like autocorrelation-based pruning and pixel-aware preaggregation, enabling interactive performance on massive data streams.
- Empirical evaluations show that ASAP improves detection accuracy and response times, eliminating the need for manual parameter tuning in dashboards.
ASAP (Prioritizing Attention via Time Series Smoothing) is an automated analytics framework designed to optimize the visual presentation of streaming time series data. It maximizes noise reduction through smoothing, while provably preserving large-scale deviations and trends in the data by formally constraining kurtosis. ASAP supports real-time interactive dashboards for infrastructure, application telemetry, and streaming analytics by enabling practitioners to perceive and diagnose significant temporal events amid possibly massive high-frequency noise, without manual parameter tuning (Rong et al., 2017).
1. Formal Problem Formulation and Optimization Objective
ASAP addresses the problem of smoothing a one-dimensional time series , where , to produce a visually intelligible plot that retains salient trends while suppressing irrelevant noise. The smoothing operator is a simple moving average (SMA) with window length , producing , i.e., for .
ASAP formalizes its objective as the following constrained optimization problem: where
- is the standard deviation of first-order differences, i.e., ,
- is the kurtosis, measuring "tailedness" or propensity to exhibit large-scale deviations.
This formulation ensures that maximum smoothing (largest possible ) is applied without sacrificing the probability of visually significant, high-amplitude events.
2. Metrics for Assessing Smoothing Quality
ASAP quantifies smoothing quality through two orthogonal metrics:
- Roughness (): captures the variance of successive values in the smoothed series, directly relating to the apparent "noise" or visual jitter in the line.
- Kurtosis constraint (): ensures preservation of heavy tails and large excursions. The constraint prevents excessive smoothing that would blur out anomalies or meaningful trends.
While additional metrics such as pixel error, anomaly-detection accuracy, and user response time were considered in user studies, ASAP's internal operation relies strictly on the roughness minimization subject to the kurtosis bound.
3. Algorithmic Techniques for Efficient Parameter Selection
ASAP achieves sub-second optimization even on million-point streams by integrating three techniques:
- Autocorrelation-based pruning: The sample autocorrelation function (ACF) is computed via FFT, and local ACF peaks (often period-aligned windows) are prioritized as candidate window sizes. Candidates are sorted by window size, and efficient lower-bound and roughness-estimate pruning strategies ensure that only windows (rather than ) are fully evaluated.
- Pixel-aware preaggregation: Recognizing that the visualization's effective horizontal resolution (number of display pixels) limits the number of visually resolvable points, ASAP pre-aggregates the series into bins (via averaging or other aggregation). All subsequent computations, including ACF, pruning, and smoothing, are performed on this reduced -length series, yielding 2-4 orders of magnitude speedup with negligible quality loss.
- On-demand perceptual refresh: Rather than updating on every new data point, ASAP recomputes and redraws at a controlled frame rate (e.g., 1–10 Hz). Incremental sliding-window techniques ("gcd-pane") efficiently update the summary statistics, and the previously chosen is reused when possible to further tighten the search.
Collectively, these optimizations allow ASAP to operate at interactive latencies on very large and high-bandwidth data streams.
4. Computational Complexity and Implementation Considerations
Baseline exhaustive search over all is . With pixel preaggregation to length , the total cost becomes per update (where is the number of ACF peaks, typically ). In practice, –$5000$, –$50$, resulting in sub-millisecond computation per smoothing operation.
For streaming data, incremental moving average maintenance is performed in per point using "paned" aggregation, and the overall work per unit time is constant with respect to the input rate, governed instead by the refresh rate.
ASAP is implemented as both a pure JavaScript library for browser or dashboard client-side integration, and as a streaming server-side operator in MacroBase, enabling use with platforms such as InfluxDB, Prometheus, OpenTSDB, or AWS CloudWatch. It is compatible with visualization frameworks including Grafana.
5. Empirical Evaluation and User Study Findings
Key results include:
- User studies (Amazon MTurk, 700 participants): ASAP increased user detection accuracy for long-term events by up to 38.4%, with average improvement of ~35% over raw plots, and reduced mean response times by up to 44.3% (average ~29%). In expert preference studies, ASAP visualizations were rated as most clear 65% of the time (random baseline: 25%).
- Performance: Compared to brute-force exhaustive search on preaggregated data, ASAP was up to 60× faster with identical parameter selection. Relative to binary search, ASAP's solutions were up to 7.5× smoother, and pixel preaggregation alone provided 2–5 orders of magnitude speedup over naïve exhaustive search on raw data. In streaming mode, on-demand updates yielded an 80× runtime reduction compared to per-point update schemes, and combined optimizations achieved up to 7 orders of magnitude reduction in compute over naïve smoothing on 1M points/sec streams.
- Integration: Practitioners saw consistent elimination of the need for manual smoothing parameter tuning.
6. Impact, Practical Usage, and Domain Integration
ASAP provides an end-to-end, automated smoothing operator for time series dashboards and analytics engines. Its ability to remove noise while provably preserving significant deviations optimizes human attention, anomaly detection, and trend interpretation in operational, scientific, and engineering applications.
Because the API takes as input raw sliding windows, target resolution, and refresh rate, and outputs a series with adaptive smoothing guaranteed to maximize trend salience, it serves as a modular component in modern telemetry pipelines. ASAP's deployment as both a client-side and MacroBase component, with explicit support for integration atop standard time series stores and visualization tools, confirms its practical utility in large-scale telemetry monitoring and analysis environments (Rong et al., 2017).