Discrete Morse Sandwich: Fast Computation of Persistence Diagrams for Scalar Data – An Algorithm and a Benchmark

This paper introduces an efficient algorithm for persistence diagram computation, given an input piecewise linear scalar field <inline-formula><tex-math notation="LaTeX">$f$</tex-math><alternatives><mml:math><mml:mi>f</mml:mi></mml:math><inline-graphic xlink:href="tierny-ieq1-3238008.gif"/></alternatives></inline-formula> defined on a <inline-formula><tex-math notation="LaTeX">$d$</tex-math><alternatives><mml:math><mml:mi>d</mml:mi></mml:math><inline-graphic xlink:href="tierny-ieq2-3238008.gif"/></alternatives></inline-formula>-dimensional simplicial complex <inline-formula><tex-math notation="LaTeX">$\mathcal {K}$</tex-math><alternatives><mml:math><mml:mi mathvariant="script">K</mml:mi></mml:math><inline-graphic xlink:href="tierny-ieq3-3238008.gif"/></alternatives></inline-formula>, with <inline-formula><tex-math notation="LaTeX">$d \leq 3$</tex-math><alternatives><mml:math><mml:mrow><mml:mi>d</mml:mi><mml:mo>≤</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq4-3238008.gif"/></alternatives></inline-formula>. Our work revisits the seminal algorithm <italic>“PairSimplices”</italic> (Edelsbrunner et al. 2002), (Zomorodian, 2010) with discrete Morse theory (DMT) (Forman, 1998), (Robins et al. 2011), which greatly reduces the number of input simplices to consider. Further, we also extend to DMT and accelerate the stratification strategy described in <italic>“PairSimplices”</italic> (Edelsbrunner et al. 2002), (Zomorodian, 2010) for the fast computation of the <inline-formula><tex-math notation="LaTeX">$0^{th}$</tex-math><inline-graphic xlink:href="tierny-ieq5-3238008.gif"/></inline-formula> and <inline-formula><tex-math notation="LaTeX">$(d-1)^{th}$</tex-math><alternatives><mml:math><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>d</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mi>h</mml:mi></mml:mrow></mml:msup></mml:math><inline-graphic xlink:href="tierny-ieq6-3238008.gif"/></alternatives></inline-formula> diagrams, noted <inline-formula><tex-math notation="LaTeX">$\mathcal {D}_{0}(f)$</tex-math><alternatives><mml:math><mml:mrow><mml:msub><mml:mi mathvariant="script">D</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>f</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq7-3238008.gif"/></alternatives></inline-formula> and <inline-formula><tex-math notation="LaTeX">$\mathcal {D}_{d-1}(f)$</tex-math><alternatives><mml:math><mml:mrow><mml:msub><mml:mi mathvariant="script">D</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>f</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq8-3238008.gif"/></alternatives></inline-formula>. Minima-saddle persistence pairs (<inline-formula><tex-math notation="LaTeX">$\mathcal {D}_{0}(f)$</tex-math><alternatives><mml:math><mml:mrow><mml:msub><mml:mi mathvariant="script">D</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>f</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq9-3238008.gif"/></alternatives></inline-formula>) and saddle-maximum persistence pairs (<inline-formula><tex-math notation="LaTeX">$\mathcal {D}_{d-1}(f)$</tex-math><alternatives><mml:math><mml:mrow><mml:msub><mml:mi mathvariant="script">D</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>f</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq10-3238008.gif"/></alternatives></inline-formula>) are efficiently computed by processing, with a Union-Find, the unstable sets of 1-saddles and the stable sets of <inline-formula><tex-math notation="LaTeX">$(d-1)$</tex-math><alternatives><mml:math><mml:mrow><mml:mo>(</mml:mo><mml:mi>d</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq11-3238008.gif"/></alternatives></inline-formula>-saddles. This fast pre-computation for the dimensions 0 and <inline-formula><tex-math notation="LaTeX">$(d-1)$</tex-math><alternatives><mml:math><mml:mrow><mml:mo>(</mml:mo><mml:mi>d</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq12-3238008.gif"/></alternatives></inline-formula> enables an aggressive specialization of (Bauer et al. 2014) to the 3D case, which results in a drastic reduction of the number of input simplices for the computation of <inline-formula><tex-math notation="LaTeX">$\mathcal {D}_{1}(f)$</tex-math><alternatives><mml:math><mml:mrow><mml:msub><mml:mi mathvariant="script">D</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>f</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math><inline-graphic xlink:href="tierny-ieq13-3238008.gif"/></alternatives></inline-formula>, the intermediate layer of the <italic>sandwich</italic>. Finally, we document several performance improvements via shared-memory parallelism. We provide an open-source implementation of our algorithm for reproducibility purposes. Extensive experiments indicate that our algorithm improves by two orders of magnitude the time performance of the seminal <italic>“PairSimplices”</italic> algorithm it extends. Moreover, it also improves memory footprint and time performance over a selection of 14 competing approaches, with a substantial gain over the fastest available approaches, while producing a strictly identical output.