Persistence Positional Encoding: A Minimal Transformer Recipe for Persistence Diagrams

Eunwoo Heo, Ganghyun Kim, Jaejun YooarXiv 2026

TL;DR

Persistence Positional Encoding (PPE) is a minimal, "Transformer-native" approach to processing topological data. By simply encoding persistence diagram points with fixed random Fourier features and a homology-dimension embedding, PPE outperforms complex, specialized architectures on nearly a dozen benchmarks, proving that how we represent topological points matters far more than the specific neural architecture used to aggregate them.

What Problem Does This Paper Address?

Topological Data Analysis (TDA) provides a powerful way to characterize the "shape" of data—whether it's a molecule, a social network, or a point cloud—using Persistence Diagrams (PDs). A PD is a multiset of points $(b, d)$ representing when topological features (like holes or clusters) are born and when they die.

While Transformers have become the go-to backbone for many fields, using them with PDs is non-trivial. A Transformer expects a sequence of tokens, but a PD is an unordered set of 2D coordinates. Previous attempts to bridge this gap, such as xPerT, Persformer, and Multiset Transformer (MST), introduced specialized designs like grid-based tokenization, custom attention mechanisms, or complex pooling layers. However, these methods are difficult to compare fairly because they often use different data splits, filtration methods, and evaluation protocols.

Methods

The authors propose a deliberately minimal recipe called Persistence Positional Encoding (PPE). Instead of reinventing the Transformer, they focus entirely on the input representation:

  1. Tokenization: Each point $(b, d)$ in the persistence diagram is treated as an individual token.
  2. Fourier Feature Encoding: To help the model resolve fine-grained differences in coordinates (and overcome "spectral bias"), each $(b, d)$ pair is mapped through fixed Random Fourier Features (RFF).
  3. Homology-Dimension Embedding: A learnable embedding is added to each token to indicate which homology dimension it belongs to (e.g., $H_0$ for connected components, $H_1$ for loops).
  4. Standard Backbone: These tokens are fed into a completely standard, vanilla Transformer encoder with a simple [CLS] token for classification.
Figure 1: A schematic overview of PPE. (a) Filtration converts topological data, e.g., graphs, point clouds, or other structured domains, into persistence diagrams. (b) Each PD point xi = (bi, di) is encoded by fixed random Fourier features, linearly projected, and augmented with a learnable homology-dimension embedding (H0 or H1). The resulting unordered token sequence is processed by a Transformer encoder without positional encoding. (c) The CLS representation drives downstream tasks, such as molecular/graph classification and shape/object classification.

Datasets

The authors evaluated PPE across a wide range of benchmarks using a unified 10-fold cross-validation protocol:

  • ORBIT5K: A standard point-cloud benchmark for neural TDA.
  • TU8: A collection of eight graph-classification benchmarks (including MUTAG, PROTEINS, and NCI1).
  • Larger-scale benchmarks: ogbg-molhiv (molecular graphs) and MCB-C (high-resolution point clouds).
  • Plain vs. Sprinkle Donuts: A newly introduced synthetic binary classification task designed to test if models can distinguish between shapes that share identical coarse topology but differ in fine-grained coordinate statistics.

Key Insights and Ideas

  • Representation is the Dominant Variable: Through "matched control" experiments, the authors found that changing the point representation (e.g., switching from raw coordinates to RFF) improved accuracy by ~6 percentage points. In contrast, changing the downstream architecture (e.g., switching from a simple MLP to a Transformer) only yielded a ~1 point gain.
  • The "Grid Trap": The paper provides a theoretical proof (Theorem 1) that grid-based methods (like xPerT) suffer from an irreducible reconstruction error. If two different topological features fall into the same grid cell, the information is lost forever. PPE avoids this by preserving fine coordinate information.
  • Universal Approximation: The authors prove that a Transformer using fixed random Fourier frequencies is almost surely a universal approximator for continuous functions of persistence diagrams.
  • Stability and Speed: PPE converges significantly faster and more stably than prior Transformer-based TDA models.
Figure 2: Coordinate-encoder ablation and validation convergence. (a) Accuracy (%) for fixed Fourier versus learned point-MLP encoders in the same PPE backbone on TU graph benchmarks, where bold marks the better encoder per row. (b) Validation accuracy versus epoch on ORBIT5K under the unified protocol. Each line is the mean over the ten cross-validation folds and each band spans those folds. Each label gives a method’s peak mean accuracy and the epoch at which it occurs.

Key Results

PPE achieved the highest mean accuracy on all 11 evaluated benchmarks. Notable results include:

  • ORBIT5K: 90.68%, a massive 6.82 percentage point (pp) jump over the next best Transformer-based baseline.
  • TU8 Macro Accuracy: 73.22%, outperforming both specialized Transformers and traditional kernel/vectorization methods.
  • MCB-C: Exceeded the next-best Transformer-based method by 9.46 pp in balanced accuracy.
Comparison of PPE against other Transformer-based methods across multiple datasets.

Limitations and Future Work

The primary limitation of PPE is the $O(N^2)$ complexity of standard self-attention. For very dense persistence diagrams (common in large point clouds), the number of tokens $N$ can become large, leading to high computational costs. The authors mitigate this by capping the number of tokens to the most "persistent" features (those with the longest lifetimes), but more efficient attention mechanisms could be explored.

Additionally, while PPE serves as a powerful "PD-only" baseline, the authors suggest that the next logical step is integrating this Transformer-native interface into hybrid models that combine topological features with raw data (e.g., GNNs for graphs).

Summary updated

BibTeX
@misc{heo2026persistence,
  author = {Eunwoo Heo and Ganghyun Kim and Jaejun Yoo},
  title = {{Persistence Positional Encoding: A Minimal Transformer Recipe for Persistence Diagrams}},
  year = {2026},
  eprint = {2610.17848},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.17848},
}
Figure