Adversarial Label Invariant Graph Data Augmentations for Out-of-Distribution Generalization
Authors: Simon Zhang, Ryan P. DeMilt, Kun Jin, Cathy H. Xia
Organizations: Department of Computer Science, Purdue University, West Lafayette, USA · Department of Computer Science and Engineering, The Ohio State University, Columbus Ohio, USA · Department of Industrial and Systems Engineering, The Ohio State University, Columbus Ohio, USA
Out-of-distribution (OoD) generalization occurs when representation learning encounters a distribution shift. This occurs frequently in practice when training and testing data come from different environments. Covariate shift is a type of distribution shift that occurs only in the input data, while the concept distribution stays invariant. We propose RIA - Regularization for Invariance with Adversarial training, a new method for OoD generalization under convariate shift. Motivated by an analogy to Q-learning, it performs an adversarial exploration for counterfactual data environments. These new environments are induced by adversarial label invariant data augmentations that prevent a collapse to an in-distribution trained learner. It works with many existing OoD generalization methods for covariate shift that can be formulated as constrained optimization problems. We develop an alternating gradient descent-ascent algorithm to solve the problem in the context of causally generated graph data, and perform extensive experiments on OoD graph classification for various kinds of synthetic and natural distribution shifts. We demonstrate that our method can achieve high accuracy compared with OoD baselines.
Figures & tables
Figure 1: (a): A casual graph for the data generation process. The exogenous variable E is an integer that indexes a data environment. (b) A labeled attributed graph instance with the joining operation for causal/spurious attributes and edges shown. In the figure, the joining operation JX is shown as the node-wise concatenation of causal and spurious attribute tensors. The joining operation JA shown in the figure provides the sum of the adjacency matrices AC and AS where the hadamard product AC⊙AS=0 . The half grey color on nodes represents the XS while the half blue color represents the XC .
Figure 2: Geometric view of the minimax optimization procedure RIA algorithm on Regularized_Loss(θ,w) as given in Equation 20 where w∈W indexes the artificial search environments, θ indexes the learner’s neural weights. The map πj,...,k:j<k is a projection of a set into k−j+1 independent dimensions.
Dataset (acc)
CMNIST ↑
SST2 ↑
Motif ↑
AMotif ↑
Synth ↑
covariate
color
length
basis
size
basis
size
basis+std, r=1
ID
OOD
ID
OOD
ID
OOD
ID
OOD
ID
OOD
ID
OOD
ID
OOD
RIA-RICE
61.7 ± 1.6
48.1±0.8
89.4 ± 0.6
81.9±0.2
92.4±0.2
65.1 ± 5.9
92.4±0.2
55.3±0.4
79.3 ± 1.6
36.8 ± 4.2
67.4 ± 1.5
33.4 ± 1.3
48.0 ± 9.0
58.5 ± 1.5
RIA-IRM
65.5±2.8
41.6±0.6
89.7±0.6
81.7±0.5
33.7±0.8
33.9±0.7
33.5±0.8
34±2.9
89.6±0.8
40.5±3.8
48.6±0.4
48.6±2
51±0.6
54±0.8
RIA-VREx
79.3±0.7
38.7±0.7
89.8±2
80.2±4
32.2±2.3
34±1.7
33.5±0.5
34±1.0
90.5±4.5
42.4±0.6
90.3±0.9
47±0.87
40±0.8
60±1.9
ERM
77.5 ± 0.5
28.3 ± 0.3
89.4 ± 0.4
81.2 ± 0.2
92.3 ± 0.3
68.3 ± 0.3
92.1 ± 0.1
51.4 ± 0.4
80.8 ± 1.1
33.2 ± 1.0
67.9 ± 2.2
33.2 ± 1.0
53.5 ± 1.5
53.5 ± 1.5
Table 1: Accuracy of all baseline approaches as well as RIA-RICE , RIA-IRM , RIA-VREx on all datasets under different covariate shifts. For each covariate shift, the columns labeled ID refer to the in-distribution test accuracies while the columns labeled OOD refer to the out-of-distribution test scores. Red and gray entries are the max and second max test accuracies, respectively, for each column.
Figure 3: Illustration of ERM Collapse on the CMNIST (above) and SST2 (below) dataset. Left: Training loss where ERM collapse is happening to traditional constrained optimization OoD generalization methods. Red and Green are RIA on IRM and VRex, respectively. Right: Test OoD loss. The consequences of ERM collapse are prevented.
School of Cyberspace, Hangzhou Dianzi University, China · State Key Laboratory of AI Safety, Beijing · School of Computer Science, Wuhan University, China +1