TopoLines: Topological Smoothing for Line Charts

Ashley Suh, Christopher Salgado, Mustafa Hajij, Paul Rosen

Abstract

Line charts are fundamental to data visualization but often suffer from noise that obscures underlying trends. Traditional smoothing methods like Gaussian filters are "feature-blind," frequently eroding critical peaks and valleys. We present TopoLines, a novel smoothing technique based on Topological Data Analysis (TDA) that removes noise while strictly preserving significant extrema. By leveraging persistent homology to identify and pair local minima and maxima based on their amplitude, TopoLines outperforms traditional filters in value retrieval and feature identification across diverse scientific and financial datasets.

Introduction

Real-world data is often "noisy," characterized by jagged fluctuations that hinder the interpretation of underlying patterns. Standard smoothing filters—such as Gaussian blurs, median filters, or moving averages—are commonly employed to mitigate this. However, these methods typically average values within a local neighborhood, leading to the unintended "shaving off" of important data peaks (maxima) and valleys (minima). This creates a fundamental conflict in visual analytics: the desire for reduced visual clutter versus the necessity of preserving prominent features.

Methodology: Topological Simplification

TopoLines addresses the limitations of local filters by adopting a global, topology-aware approach. The framework consists of three primary stages:

  1. Persistent Homology Extraction: The line chart is treated as a 1D landscape. Using "lower-star filtration," the algorithm tracks how connected components of the graph merge as a horizontal plane "sweeps" upward. This process identifies pairs of local minima and maxima. Each pair is assigned a persistence value, representing the vertical distance (amplitude) between the peak and its associated valley.
  2. Topological Simplification: A user-defined threshold is applied. Extrema pairs with persistence lower than this threshold are classified as noise and targeted for removal.
  3. Isotonic Regression Reconstruction: Rather than simply deleting points, the algorithm employs isotonic regression to flatten the removed sections. This ensures the resulting line remains monotonic between the preserved significant peaks, minimizing the mathematical residual error relative to the original data.
The topological simplification process. (a-f) show the sweep-line algorithm identifying persistence pairs (A-F) and the subsequent merging of components.

Unlike standard methods, TopoLines is non-local; it evaluates the importance of a feature based on its global prominence rather than its immediate neighbors.

Experimental Evaluation

The authors evaluated TopoLines against five common smoothing methods: Median, Gaussian, Cutoff, Uniform Subsampling, and Douglas-Peucker. The study utilized 20 datasets across four domains:

  • Astro: Radio astronomy spectral lines.
  • Climate: Daily high temperatures.
  • EEG: Brain activity data from visual attention tasks.
  • Stock: Five years of daily closing prices for major tech companies.

To ensure a fair comparison, the authors used Approximate Entropy—a measure of line chart complexity—to calibrate the smoothing levels across different algorithms.

Key Results and Discussion

The performance of TopoLines was assessed based on two primary tasks: Value Retrieval (accuracy of smoothed values) and Extrema Finding (preservation of original peaks).

  • Superior Value Retrieval: TopoLines consistently produced the lowest average and worst-case error across nearly all datasets. The isotonic regression step ensures the smoothed line stays as close to the original data as possible while adhering to topological constraints.
  • Robust Feature Preservation: In the Astro and Climate datasets, TopoLines excelled at preserving significant extrema. However, in high-noise datasets like EEG and Stock prices, the performance gap narrowed. In these cases, high-frequency noise often has high amplitude, making it difficult for topological methods to distinguish noise from meaningful features.
TopoLines applied to four datasets (Astro, Climate, EEG, Stock) at varying smoothing levels. Persistence-based smoothing preserves major peaks even at high levels of simplification.

Conclusion

TopoLines offers a mathematically grounded alternative to traditional smoothing, prioritizing the preservation of significant data features. While computationally more complex ($O(n \log n)$) than simple moving averages, its ability to maintain the "character" of a dataset makes it highly effective for scientific and financial visualization. Future work will focus on user studies to evaluate the perceptual impact of topological smoothing on human discovery and decision-making.

Summary updated

BibTeX
@inproceedings{suh2020topolines,
  author = {Ashley Suh and Christopher Salgado and Mustafa Hajij and Paul Rosen},
  title = {{TopoLines: Topological Smoothing for Line Charts}},
  booktitle = {Eurovis (short Papers)},
  year = {2020},
  doi = {10.2312/evs.20201053},
}
Figure