# Differentiable Persistence Landscape Layer

- ID: 2016
- Canonical URL: https://synthcore.org/idea/2016/differentiable-persistence-landscape-layer
- API JSON: https://synthcore.org/api/idea/2016.json
- API Markdown: https://synthcore.org/api/idea/2016.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.08858](https://arxiv.org/abs/2608.08858)
- Category: architecture
- Solves: stability, accuracy, sample-efficiency
- ML areas: graph-nn, embedding, loss
- Math tags: topology, functional-analysis, metric-geometry, optimal-transport
- Ratings: usefulness 7/10; difficulty 4/10; novelty 5/10

## Idea description

Convert each persistence diagram produced from an input, intermediate feature map, or graph filtration into a discretized persistence landscape and feed it to an MLP or concatenate it with ordinary neural features. Unlike a variable-size list of birth-death pairs, the landscape has a fixed tensor shape and is provably nonexpansive with respect to the diagram Wasserstein distance.

## Mathematical statement

For a point or interval \(x=(b,d)\) with \(b<d\), define its tent function by \(\triangle_x(t)=\max\{0,\min(t-b,d-t)\}\). For a finite diagram \(\alpha=\sum_{j=1}^{n}x_j\), Definition 2.6 defines the persistence landscape by \(\Lambda_\alpha(k,t)=\operatorname{kmax}_{j=1}^{n}(\triangle_{x_j}(t))\), where \(\operatorname{kmax}\) is the \(k\)-th largest value and missing values are zero. Theorem 4.6 states that for \(1\le p\le\infty\), \(\|\Lambda_\alpha-\Lambda_\beta\|_{L^p(\mathbb{N}\times\mathbb{R})}\le W_p^\triangle(\alpha,\beta)\), where \(W_p^\triangle\) is the \(p\)-Wasserstein matching distance using the diagonal cost \(d_q(x,y)=\|\triangle_x-\triangle_y\|_q\). For \(p=2\), discretizing \(t\) gives a Euclidean Hilbert feature vector. The inequality means diagram perturbations cannot be amplified by the landscape map.

## Key formulas

- $$\triangle_{(b,d)}(t)=\max\{0,\min(t-b,d-t)\}$$
- $$\Lambda_\alpha(k,t)=\operatorname{kmax}_{j=1}^{n}\bigl(\triangle_{x_j}(t)\bigr)$$
- $$\|\Lambda_\alpha-\Lambda_\beta\|_{L^p(\mathbb{N}\times\mathbb{R})}\le W_p^\triangle(\alpha,\beta)$$
- $$\widehat{\Lambda}_\alpha[k,r]=\operatorname{kmax}_{j}\left(\max\{0,\min(t_r-b_j,d_j-t_r)\}\right),\qquad t_r=t_{\min}+r\Delta t$$

## Implementation notes

Integrate this after a differentiable or frozen topological preprocessing step that produces a persistence diagram per example, graph, image, or intermediate feature channel. The tensor input is a padded diagram \(\{(b_j,d_j)\}_{j=1}^{N}\), with points of persistence below a threshold optionally removed. Choose a fixed grid \(t_r=t_{\min}+r\Delta t\), retain the first \(K\) landscape levels, and mask padded points. Compute `v[j,r] = max(0, min(t[r]-birth[j], death[j]-t[r]))`, sort the \(N\) values along the point axis, and set `L[k,r]` to the \(k\)-th largest value, padding nonexistent levels with zero. Flatten or average-pool `L`, normalize by the grid measure, and concatenate it with the baseline neural representation before the prediction head. In pseudocode: `v = relu(min(t[None,:]-birth[:,None], death[:,None]-t[None,:]))`; `L = topk(v, K, dim=points)`; `z = concat(backbone(x), flatten(L))`. The paper supplies the stability guarantee; estimate only grid truncation error, persistence threshold effects, and finite-\(K\) truncation empirically. Start with MUTAG or a small CIFAR-10 filtration model, comparing landscapes against persistence images, padded birth-death coordinates, and a diagram-distance baseline. Measure clean accuracy and degradation under synthetic birth/death noise, diagram cardinality changes, and input perturbations. Success is equal or better clean accuracy with smoother predictions and lower accuracy degradation as perturbation magnitude increases.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: inconclusive
- Verdict: Built a differentiable PyTorch persistence-landscape layer with masking, fixed grid, top-K levels, flattening, and a NumPy reference implementation. The mechanism manifested: single-point landscape distance divided by matched tent distance was 0.9995–0.99999, the 100 multi-point trials had maximum ratio 0.99970 and mean 0.90268, and grid integration error decreased from 3.46e-4 at dt=0.02 to 2.98e-6 at dt=0.00125. The toy classifier showed no accuracy win: both padded birth-death coordinates and landscapes achieved 1.0 clean and noisy accuracy.

### Mechanism check

- Verdict: Built a differentiable PyTorch persistence-landscape layer with masking, fixed grid, top-K levels, flattening, and a NumPy reference implementation. The mechanism manifested: single-point landscape distance divided by matched tent distance was 0.9995–0.99999, the 100 multi-point trials had maximum ratio 0.99970 and mean 0.90268, and grid integration error decreased from 3.46e-4 at dt=0.02 to 2.98e-6 at dt=0.00125. The toy classifier showed no accuracy win: both padded birth-death coordinates and landscapes achieved 1.0 clean and noisy accuracy.
- Confidence: 9/10
- Limitations: The benchmark uses synthetic equal-cardinality diagrams and a tiny MLP, not MUTAG, CIFAR-10, or diagrams generated by an actual persistence algorithm. It does not compare persistence images, input perturbations, varying cardinality with real padding masks, diagonal matching, finite-K truncation error, or end-to-end differentiable topological preprocessing.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.11955
- Paired wins: 0/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/817/bench_report.json)
- [landscape_experiment.py](https://synthcore.org/code/817/landscape_experiment.py)
- [persistence_track.py](https://synthcore.org/code/817/persistence_track.py)
- [report.md](https://synthcore.org/code/817/report.md)
- [report_bench_2026-09-01T111728.md](https://synthcore.org/code/817/report_bench_2026-09-01T111728.md)
- [results.json](https://synthcore.org/code/817/results.json)
- [stage2_bench.py](https://synthcore.org/code/817/stage2_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/817)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
