Work / Machine learning

Sliding-window embeddings, read topologically

Persistent homology over delay-embedded sliding windows to find structure in noisy series.

Try the project

Compare a repeating signal and white noise.
−1.21.2 Reading 12 samples later Current reading
The repeating signal traces a loop.
−33 Reading 12 samples later Current reading
Noise makes a cloud of points. The axes expand to fit its wider range.
§ 1 · Problem

A time series as a geometric object

Topological Data Analysis treats a time series as a geometric object. The question this project asks: if you lift a one-dimensional signal into a point cloud, does its shape tell you whether the signal is periodic — even when the raw trace is too noisy to read by eye?

§ 2 · Data

Synthetic series, controlled contrast

The data is synthetic time series generated for the analysis — a sine signal against white noise. Using generated series keeps the ground truth known: one series is periodic by construction, the other is not, so any topological difference the pipeline reports can be checked against what was actually put in.

§ 3 · Method

Delay embedding, then persistent homology

Delay vectors are constructed from time-lagged observations, turning the signal into a high-dimensional point cloud. Persistent homology is then computed over that cloud to identify connected components, loops, and the longer-lived topological features that survive across scales. The last step maps those signatures back to temporal properties: a persistent loop in the embedding corresponds to recurrence and periodicity in the original series. The stack is Python with ripser for the persistence computation and persim for the diagrams.

§ 4 · Results

Periodicity shows up as a persistent loop

SIGNAL · SINE VS NOISE EMBEDDING · S(T) VS S(T+12)
Fig. 1 — Takens embedding reveals periodicity: the sine series traces a closed ring in delay coordinates while noise fills space

The pipeline made periodic structure visible through persistent H1 features: the periodic signal embeds into a ring whose loop persists across scales, while the noise series embeds into a scattered cloud with no long-lived features. The persistence diagrams and barcode plots record that contrast directly, and the accompanying writeup lays out the mathematical basis for why the method works.

§ 5 · Discussion

Embedding choices are the model

The practical lesson was that embedding dimension and delay act as first-order modeling choices — closer to hyperparameters in an ML workflow than to fixed preprocessing. Get them wrong and the topology you measure is an artifact of the embedding, not the signal. The project also connected fields that usually sit apart: signal processing, clustering, dimensionality reduction, and algebraic topology all meet in the same pipeline.