                   TopInG: Topologically Interpretable Graph Learning via Persistent Rationale Filtration

from features associated with Gϵ (shorter bars introduced              diagrams, dtopo (P(TX ), P(Tϵ )) can be lower bounded by:
later with shorter persistence). Our topological discrepancy
                                                                              max | EP ∼P(TX ) [ψ(P )] − EQ∼P(Tϵ ) [ψ(Q)] |
measure, introduced subsequently, is designed to quantify                     ψ∈Ψ
and optimize such a distinguishing topological gap.
                                                                       Learnable Vectorization for the Lower Bound To prac-
We denote the induced probability distributions of persistent          tically compute the lower bound of dtopo , we need a set of
homologies as P(TX ) and P(Tϵ ) respectively.                          1-Lipschitz continuous functions Ψ = {ψ1 , ψ2 , · · · , ψk }
Definition 3.2 (Topological Discrepancy). The topological              that map persistence diagrams to a Euclidean space where
discrepancy dtopo between P(TX ) and P(Tϵ ) is defined as              expectations are tractable. TDA offers well-studied vector-
                                                                       ization methods for this purpose. We adopt the learnable
dtopo (P(TX ), P(Tϵ )) ≜          inf           E(P,Q)∼π [dB (P, Q)]   vectorization approach from (Hofer et al., 2019), which rep-
                           π∈Π(P(TX ),P(Tϵ ))
                                                                       resents persistence diagrams as k-dimensional vectors. This
where Π(P(TX ), P(Tϵ )) is the set of all couplings between            is achieved by learning k parameterized kernels, termed
P(TX ) and P(Tϵ ), and dB (P, Q) is the bottleneck distance            structure elements, to capture point distributions on the
(Definition B.1 in Appendix B) between the persistent ho-              diagrams. These structure elements are designed to be Lips-
mologies P and Q.                                                      chitz continuous with some constant C. Specifically, on a
                                                                       given persistence diagram p, we employ the Rational Hat
Essentially, dtopo is the 1-Wasserstein distance between the           structure element with learnable center c ∈ R2 and radius
distributions of persistent homologies TX and Tϵ under the             r ∈ R, which is defined as:
metric dB . Now we are ready to introduce the target loss of                          X         1                     1
our model based on our topological discrepancy property.                φ(p; c, r) =                     −
                                                                                      x∈p
                                                                                          1 + ∥x  − c∥ 2   1+  | |r| − ∥x − c∥2 |
  L(ϕ) = EG [Lce (ŷG , yG )] − αLtopo (P(TX ), P(Tϵ )) (2)
                                                                       By setting ψ = C1 φ, we get a 1-Lipschitz continuous repre-
The topological constraint term Ltopo is realized by the topo-         sentation function as we want. The expectations E[ψ(P )]
logical discrepancy dtopo . The prediction loss term Lce is            are approximated by empirical means over the data in prac-
the standard cross-entropy loss between the predicted label            tice. To select the maximum in the lower bound formulation,
ŷG and the ground truth label yG . The predicted label ŷG =          in our experiments, instead of a simple softmax, we utilize
hϕ σfϕ (G) is obtained by applying prediction network hϕ               a 2-head attention mechanism to identify and sum the top-
on the subgraph GX extracted through σ from the filtra-                2 maxima from the k vectorized representations. We use
tion fϕ (G). hϕ and fϕ share the same backbone GN Nϕ                   k = 8 Lipschitz continuous representation functions in our
model, which outputs a permutation equivalent representa-              experiments. This learnable vectorization, combined with
tion (node or edge representation). fϕ = M LPf ◦ GN Nϕ                 multi-head attention, not only provides an efficient approx-
applys a simple multi-layer perceptron (MLP) model to get a            imation of dtopo but also facilitates a self-adjusted focus
1-dimensional edge representation as the filtration function.          on data-dependent topological features. This mechanism
hϕ = M LPh ◦ P ool ◦ GN Nϕ first pools the permutation                 guides the model to learn the most task-relevant topolog-
equivalent presentation of GN Nϕ to get a permutation in-              ical information, which we found empirically to enhance
variant graph representation, then applys another MLP to               training stability and improve performance. All topological
get the final graph representation for predicting ŷG . Here           representations are Lipschitz continuous and differentiable
we omit other details of learnable parameters in the MLP               almost everywhere, enabling end-to-end training. Com-
for simplicity. The persistent homologies TX and Tϵ , as               putations for these representations and their gradients are
permutation invariant graph representations, are also used             performed using the codebase from (Zhang et al., 2022).
in the final representation M LPh through combining with
                                                                       In the rest of the paper, we use dtopo to denote the lower
the graph representation P ool ◦ GN Nϕ . See Figure 1 as a
                                                                       bound used in practice. Finally, we give the following theo-
high-level illustration of the architecture of our model.
                                                                       rem to show that our loss L(ϕ) with dtopo is guaranteed to
                                                                       be optimized by the ground truth.
3.1. Self-adjusted Topological Constraint
                                                                       Theorem 3.4. Assume ∀G, |EX | < |Eϵ |, and G∗X is min-
In this subsection, we will discuss the construction and prop-         imal with respect to yG in the sense that any subgraph
erties of our topological features in details. The original            GX ⊂ G∗X losses some information of label, then L(ϕ) is
construction of dtopo is intractable in general. Here we pro-          uniquely optimized by fϕ∗ (e) = 1{e ∈ G∗X }.
vide a tractable lower-bound through Kantorovich duality               Remark 3.5. Note that our guarantee does not depend on
of 1-Wasserstein distance (Villani, 2009) as follows:                  any stability or invariance assumptions on GX , therefore,
Proposition 3.3. Given a set of 1-Lipschitz continuous func-           it will not be affected by variform rationale subgraphs in
tions, Ψ = {ψ1 , ψ2 , · · · , ψk }, on the space of persistence        theory. The proof is deferred to the appendix C.

                                                                   6
