Discovering Invariant Rationales for Graph Neural Networks

1 INTRODUCTION . The eye-catching success in graph neural networks ( GNNs ) ( Hamilton et al. , 2017 ; Kipf & Welling , 2017 ; Dwivedi et al. , 2020 ) provokes the rationalization task , answering “ What knowledge drives the model to make certain predictions ? ” . The goal of selective rationalization ( aka . feature attribution ) ( Chang et al. , 2020 ; Ying et al. , 2019 ; Luo et al. , 2020 ; Wang et al. , 2021c ) is to find a small subset of the input ’ s graph features — rationale — which best guides or explains the model prediction . Discovering the rationale in a model helps audit its inner workings and justify its predictions . Moreover , it has tremendous impacts on real-world applications , such as finding functional groups to shed light on protein structure prediction ( Senior et al. , 2020 ) . Two research lines of rationalization have recently emerged in GNNs . Post-hoc explainability ( Ying et al. , 2019 ; Luo et al. , 2020 ; Yuan et al. , 2021 ; Wang et al. , 2021c ) attributes a model ’ s prediction to the input graph with a separate explanation method , while intrinsic interpretability ( Veličković et al. , 2018 ; Gao & Ji , 2019 ) incorporates a rationalization module into the model to make transparent predictions . Here we focus on intrinsically interpretable GNNs . Among them , graph attention ( Veličković et al. , 2018 ) and pooling ( Lee et al. , 2019 ; Knyazev et al. , 2019 ; Gao & Ji , 2019 ; Ranjan et al. , 2020 ) operators prevail , which work as a computational block of a GNN to generate soft or hard masks on the input graph . They cast the learning paradigm of GNN as minimizing the empirical risk with the masked subgraphs , which are regarded as rationales to guide the model predictions . Despite the appealing nature , recent studies ( Chang et al. , 2020 ; Knyazev et al. , 2019 ) show that the current rationalization methods are prone to ∗Corresponding author . exploit data biases as shortcuts to make predictions and compose rationales . Typically , shortcuts result from confounding factors , sampling biases , and artifacts in the training data . Considering Figure 1 , when the most bases of House-motif graphs are Tree , a GNN does not need to learn the correct function to reach high accuracy for the motif type . Instead , it is much easier to learn from the statistical shortcuts linking the bases Tree with the most occurring motifs House . Unfortunately , when facing with out-of-distribution ( OOD ) data , such methods generalize poorly since the shortcuts are changed . Hence , such shortcut-involved rationales hardly reveal the truly critical subgraphs for the predicted labels , being at odds with the true reasoning process that underlies the task of interest ( Teney et al. , 2020 ) and human cognition ( Alvarez-Melis & Jaakkola , 2017 ) . Here we ascribe the failure on OOD data to the inability to identify causal patterns , which are stable to distribution shift . Motivated by recent studies on invariant learning ( IL ) ( Arjovsky et al. , 2019 ; Krueger et al. , 2021 ; Chang et al. , 2020 ; Bühlmann , 2018 ) , we premise different distributions elicit different environments of data generating process . We argue that the causal patterns to the labels remain stable across environments , while the relations between the shortcut patterns and the labels vary . Such environment-invariant patterns are more plausible and qualified as rationales . Aiming to identify rationales that capture the environment-invariant causal patterns , we formalize a learning strategy , Discovering Invariant Rationales ( DIR ) , for intrinsically interpretable GNNs . One major problem is how to get multiple environments from a standard training set . Differing from the heterogeneous setting ( Bühlmann , 2018 ) of existing IL methods , where environments are observable and attainable , DIR does not assume prophets about environments . It instead generates distribution perturbations by causal intervention — interventional distributions ( Tian et al. , 2006 ; Pearl et al. , 2016 ) — to instantiate environments and further distinguish the causal and non-causal parts . Guided by this idea , our DIR strategy consists of four modules : a rationale generator , a distribution intervener , a feature encoder , two classifiers . Specifically , the rationale generator learns to split the input graph into causal and non-causal subgraphs , which are respectively encoded by the encoder into representations . Then , the distribution intervener conducts the causal interventions on the non-causal representations to create perturbed distributions , with which we can infer the invariant causal parts . Then , the two classifiers are respectively built upon the causal and non-causal parts to generate the joint prediction , whose invariant risk is minimized across different distributions . On one synthetic and three real datasets , extensive experiments demonstrate the generalization ability of DIR to surpass current state-of-the-art IL methods ( Arjovsky et al. , 2019 ; Krueger et al. , 2021 ; Sagawa et al. , 2019 ) , and the interpretability of DIR to outperform the attention- and pooling-based rationalization methods ( Veličković et al. , 2018 ; Gao & Ji , 2019 ) . Our main contributions are : • We propose a novel invariant learning algorithm , DIR , for inherent interpretable models , improving the generalization ability and is suitable for any deep models . • We offer causality theoretic analysis to guarantee the preeminence of DIR . • We provide the implementation of DIR for graph classification tasks , which consistently achieves excellent performance on three datasets with various generalization types . 2 INVARIANT RATIONALE DISCOVERY . With a causal look at the data-generating process , we formalize the principle of discovering invariant rationales , which guides our discovery strategy . Throughout the paper , upper-cased letters like G denote random variables , while lower-case letters like g denote deterministic value of variables . 2.1 CAUSAL VIEW OF DATA-GENERATING PROCESS . Generating rationales for transparent predictions requires understanding the actual mechanisms of the task of interest . Without loss of generality , we focus on the graph classification task and present a causal view of the data-generating process behind this task . Here we formalize the causal view as a Structure Causal Model ( SCM ) ( Pearl et al. , 2016 ; Pearl , 2000 ) by inspecting on the causalities among four variables : input graph G , ground-truth label Y , causal part C , non-causal part S. Figure 2a illustrates the SCM , where each link denotes a causal relationship between two variables . • C → G ← S. The input graph G consists of two disjoint parts : the causal part C and the non-causal part S , such as the House motif and the Tree base in Figure 1 . Published as a conference paper at ICLR 2022 𝑺 𝒀 𝑮 𝑪 𝑮 𝑺 𝑪 𝒀 House Cycle Crane House Cycle Crane … ( b ) Illustration of Constructing Interventional Distributions House Cycle Crane 𝒅𝒐 ( 𝑺 = ∅ ) ∅ 𝒅𝒐 ( 𝑺 = ) 𝒅𝒐 ( 𝑺 = ) … … … 𝑺 𝒀 𝑮 𝑪 Original Distribution Multiple 𝒔-Interventional Distributions ( a ) SCM 𝑺 𝒀 𝑮 𝑪 𝑮 𝑺 𝑪 𝒀 House Cycle Crane House Cycle Crane … ( b ) Illustration of Constructing Interventional Distributions House Cycle Crane 𝒅𝒐 ( 𝑺 = ∅ ) ∅ 𝒅𝒐 ( 𝑺 = ) 𝒅𝒐 ( 𝑺 = ) … … … 𝑺 𝒀 𝑮 𝑪 Original Distribution Multiple 𝒔-Interventional Distributions ( b ) Interventional Distributions . Figure 2 : ( a ) Causal view of data-generating process ; ( b ) Illustration of interventional distributions . • C → Y . By “ causal part ” , we mean C is the only endogenous parent to determine the groundtruth label Y . Taking the motif-base example in Figure 1 again , C is the oracle rationale , which perfectly explains why the graph is labeled as Y . • C L9999K S. This dashed arrow indicates additional probabilistic dependencies ( Pearl , 2000 ; Pearl et al. , 2016 ) between C and S. We consider three typical relationships here : ( 1 ) C is independent of S , i.e. , C |= S ; ( 2 ) C is the direct cause of S , i.e. , C → S ; and ( 3 ) There exists a common cause E , i.e. , C ← E → S. See Appendix B for the corresponding examples . C L9999K S can create spurious correlations between the non-causal part S and the ground-truth label Y . Assuming C → S , C is a confounder between S and Y , which opens a backdoor path S ← C → Y , thus making S and Y spuriously correlated ( Pearl et al. , 2016 ) . We systematize such spurious correlations as Y 6⊥⊥ S. Wherein , we make feature induction assumption on S to avoid the confusion of the induced subset of S between C. See Appendix C for the formal assumption . Furthermore , data collected from different environments exhibit various spurious correlations ( Teney et al. , 2020 ; Arjovsky et al. , 2019 ) , e.g. , one mostly picks House motifs with Tree bases as the training data , while another selects House motifs with Wheel bases as the testing data . Hence , such spurious correlations are unstable and variant across different distributions . 2.2 TASK FORMALIZATION OF INVARIANT RATIONALIZATION . Oracle Rationale . With the causal theory ( Pearl et al. , 2016 ; Pearl , 2000 ) , for each variable X in a SCM , there exists a directed link from each of its parent variables PA ( X ) to X , if and only if the causal mechanism X = fX ( PA ( X ) , X ) persists , where X |= PA ( X ) is the exogenous noise of X . For simplicity , we omit the exogenous noise and simplify it as X = fX ( PA ( X ) ) . Hence , there exist a function fY : C → Y in our SCM , where the “ oracle rationale ” C satisfies : Y = fY ( C ) , Y |= S | C , ( 1 ) where Y |= S | C indicates that C shields Y from the influence of S , making the causal relationship C → Y invariant across different S. Rationalization . In general , only the pairs of input G and label Y are observed during training , while neither oracle rationale C nor oracle structural equation model fY is available . The absence of oracles calls for the study on intrinsic interpretability . We systematize an intrinsically-interpretable GNN as a combination of two modules , i.e. , h = hŶ ◦ hC̃ , where hC̃ : G→ C̃ discovers rationale C̃ from the observed G , and hŶ : C̃ → Ŷ outputs the prediction Ŷ to approach Y . Distinct from C and Y which are the variables in the causal mechanisms , C̃ and Ŷ represent the variables in the modeling process to approximateC and Y . To optimize these modules , most of current intrinsicallyinterpretable GNNs ( Veličković et al. , 2018 ; Lee et al. , 2019 ; Knyazev et al. , 2019 ; Gao & Ji , 2019 ; Ranjan et al. , 2020 ) adopt the learning strategy of minimizing the empirical risk : min hC̃ , hŶ R ( hŶ ◦ hC̃ ( G ) , Y ) , ( 2 ) where R ( · , · ) is the risk function , which can be the cross-entropy loss . Nevertheless , this learning strategy relies heavily on the statistical associations between the input features and labels , and can potentially exhibit non-causal rationales . Invariant Rationalization . We ascribe the limitation to ignoring Y |= S | C in Equation 1 , which is crucial to refine the causal relationship C → Y that is invariant across different S. By introducing this independence , we formalize the task of invariant rationalization as : min hC̃ , hŶ R ( hŶ ◦ hC̃ ( G ) , Y ) , s.t . Y |= S̃ | C̃ , ( 3 ) where S̃ = G \ C̃ is the complement of C̃ . This formulation encourages the rationale C̃ seeking the patterns that are stable across different distributions , while discarding the unstable patterns .

Summary: This paper proposes to address the limitation of current interpretable graph neural networks over out-of-distribution data. In this work, the intrinsically interpretable GNN is investigated by identifying the invariant rationales corresponding to environment-invariant causal patterns. The proposed model is evaluated on the graph classification task to demonstrate its effectiveness as compared to state-of-the-arts.