Inconsistency on Persistence Diagram Output and MSC Computation

15 views
Skip to first unread message

Mingzhe Li

unread,
Apr 16, 2023, 12:26:53 PM4/16/23
to ttk-...@googlegroups.com, julien...@sorbonne-universite.fr, Bei Wang
Hi Julien,

I've been using different versions of the TTK + Paraview bundle for visualization tasks (namely TTK 0.9.8 + ParaView 5.6.1 and TTK 1.1.0 + ParaView 5.10.1). I just noticed significant differences between versions in two different modules, namely the persistence diagram and the Morse(-Smale) complex.

1.  Persistence diagram computation output from the same data. You may see the screenshots in the google slides (Page 2-3): https://docs.google.com/presentation/d/1mk4oox596Bf04tIVagTYeU0lnLhwJTa0PhygLwj0lP8/edit?usp=sharing

I double-checked the underlying data and the mesh structure. The data is consistent across the two experiments, and the mesh structures look the same in the screenshots. But the output of persistence diagrams is very different from each other. 

2. Morse complex output from the same data. The screenshots are shown in the slide above on Page 5-6.

I used the same sets of persistence-simplified data to compute the Morse complex using different TTK versions. The output of the 1-dimensional skeleton is obviously different between the two TTK versions. 

The data that I used in the screenshot can be found at https://drive.google.com/file/d/1HbdmnTaJWDLHP_TEYJo4pW7EoUgCN-1A/view?usp=share_link. The persistence threshold I used for simplification is 2.5.

Would you mind taking a look into this? We are unsure about the reasons for such inconsistencies across different versions of TTK, although I suspect that some inconsistencies may come from boundary effects.

Thank you for your time! Your help would be greatly appreciated!

Best,
Mingzhe Li
Ph.D. candidate
Scientific Computing & Imaging Institute
University of Utah

Julien Tierny

unread,
Apr 17, 2023, 5:46:15 AM4/17/23
to ttk-...@googlegroups.com, Mingzhe Li, Bei Wang
Hi Mingzhe,

thanks for your email.

> I've been using different versions of the TTK + Paraview bundle for
> visualization tasks (namely TTK 0.9.8 + ParaView 5.6.1 and TTK 1.1.0 +
> ParaView 5.10.1). I just noticed significant differences between versions
> in two different modules, namely the persistence diagram and the
> Morse(-Smale) complex.
As a rule of thumb, you can safely assume that the most recent version (here 1.1.0) includes the preferred computation.

As of version 0.9.9, we have switched the backend for discrete gradient computation to the algorithm by Robins et al. (IEEE PAMI 2011), which has a better worst case runtime in practice. That explains the differences in separatrices that you can observe.

As of version 1.1, the Discrete Morse Sandwich (DMS, https://arxiv.org/abs/2206.13932) is the default backend for persistence computation. Before, FTM (https://arxiv.org/abs/1902.04805) was used by default, but:
- it could only compute extremum-saddle persistence diagrams (DMS additionally computes the saddle-saddle pairs, the really expensive ones)
- it virtually closed the boundary components if any (hence the disparity in your examples, DMS is more faithful in that regard).

I hope this helps.

Best,
--
Dr Julien Tierny
CNRS Researcher
Sorbonne Universite
http://lip6.fr/Julien.Tierny

Mingzhe Li

unread,
Apr 24, 2023, 2:39:45 PM4/24/23
to Julien Tierny, ttk-...@googlegroups.com, Bei Wang
Hi Julien,

Thank you for your reply! Now I understand the difference between these filters in the two TTK versions.

I have a follow-up question about the persistence diagram computation: below is a screenshot of the persistence diagram and critical points within a 3D domain. The critical points detected by the TTKScalarFieldCriticalPoints filter are shown in cubes, while the birth/death pairs of the TTKPersistenceDiagram filter are shown in balls. The colors of critical points encode the critical type (blue: minima; white: saddles; red: maxima). 
We see discrepancies between two outputs: in the green region, one ball is not covered by the cubes; in the yellow region, three cubes are not covered by the balls. Not surprisingly, all locations with discrepancies are at the domain's boundary.

Does it mean that MDS still cannot cover all persistence pairs involved with critical points at the boundary? What should we do if we want to compute the persistence of the critical points that are not covered by the TTKPersistenceDiagram output?

image.png

Best,
Mingzhe

Julien Tierny <julien...@sorbonne-universite.fr> 于2023年4月17日周一 03:46写道:

Julien Tierny

unread,
Apr 26, 2023, 7:22:59 AM4/26/23
to Mingzhe Li, ttk-...@googlegroups.com, Bei Wang
Dear Mingzhe,

thanks for your email.

> We see discrepancies between two outputs: in the green region, one ball is
> not covered by the cubes; in the yellow region, three cubes are not covered
> by the balls. Not surprisingly, all locations with discrepancies are at the
> domain's boundary.
These discrepancies are actually correct.

For domains without boundary, the changes in the homology of the sub-levelsets (during a filtration) do only occur on critical points and each critical point corresponds to such a change (as long as the function has only isolated, non-degenerate critical points).

For domains with boundary, this is not true anymore: the changes in the homology of the sub-levelsets (during a filtration) do only occur on critical points *but* not all critical points induce some changes in the homology of the sub-levelsets.

This is illustrated in the attached pvsm file (make sure to set the input paths to simple.off right when you load the state file from ParaView).

Once you load the state file, go to the "Forward" layout tab (top left of the render view). There, hit the "Play" button of the animation controller. You will see on the right the filtration of the sub-levelsets of a toy example (see Screenshot_20230426_130356.png).
During the entire filtration, the sub-levelset has the homology of a disk. In particular, there is no change in homology when it hits the boundary saddles and the boundary maxima (correctly identified by ScalarFieldCriticalPoints).
So, from a strict persistent homology perspective, the fact that not all critical points are captured (specifically the boundary ones) is *correct*.

If you want to have a notion of importance for these boundary critical points, you can emulate what FTM used to do by considering the opposite of your scalar data, yielding a sort of "backward" filtration.
This is illustrated in the "Backward" layout tab of the state file (see Screenshot_20230436_130433.png, and hit the "play" button in the animation controller).
If the filtration goes backwards, it does start with 4 connected components (each one started at the original boundary maxima) and you can track the persistence of these.

I hope this clarifies your concerns.

Best regards,
--
Dr Julien Tierny
CNRS Researcher
Sorbonne Universite
http://lip6.fr/Julien.Tierny

Screenshot_20230426_130356.png
Screenshot_20230426_130433.png
asymmetry.pvsm
simple.off
Reply all
Reply to author
Forward
0 new messages