ZHANGYUXUAN-zR commited on
Commit
1b7a03f
·
verified ·
1 Parent(s): d73beb8

Add files using upload-large-folder tool

Browse files
md/dev/N8MaByOzUfb/N8MaByOzUfb.md CHANGED
@@ -100,7 +100,7 @@ in the feature space, consider the case of a ER-AML’s $\mathcal { L } _ { 1 }$
100
 
101
  # 4.3 CROSS-ENTROPY BASED ALTERNATIVE (ER-ACE)
102
 
103
- Having demonstrated the effect of controlling the incoming batch loss in avoiding a drastic representation drift, we now extend it to be applicable to the standard cross-entropy loss typically studied in ER (Aljundi et al., $2 0 1 9 \mathrm { a }$ ; Chaudhry et al., 2019). Given an incoming data batch, consider $C _ { o l d }$ the set of previously learned classes and $C _ { c u r r }$ the set of classes observed in the current incoming mini-batch. Denoting $C$ the set of classes included in the cross-entropy loss, we define the $\mathcal { L } _ { c e } ( \mathbf { X } , C )$ cross-entropy loss as: Lce(X, C) = − Px∈X log Psim(wc(x),fθ(x))c∈C sim(wc,fθ(x)) where $C \subset C _ { a l l }$ denotes the classes used to compute the denominator. We note that restricting the classes used in the denominator has an analogous effect to restricting the negatives in the contrastive loss. Consider the gradient for a single datapoint $x$ , ∂Lce(x,C)∂fn = W(\~p − \~y) 1\~y∈C . Here \~p denotes the softmax output of the network, $\vec { y }$ a one-hot target, $\mathbb { 1 } _ { \vec { y } \in C }$ a binary vector masking out classes not in $C$ , and W the matrix with all class prototypes $\{ \mathbf { w } _ { c } \} _ { c \in C _ { a l l } }$ . When the loss is applied in the batch setting, it follows that only prototypes whose labels are in $C$ will serve roles analogous to positives and negatives in the contrastive loss. We can then achieve a similar control as the metric learning approach on the learned representations.
104
 
105
  Now, our loss applied at each step would be:
106
 
 
100
 
101
  # 4.3 CROSS-ENTROPY BASED ALTERNATIVE (ER-ACE)
102
 
103
+ Having demonstrated the effect of controlling the incoming batch loss in avoiding a drastic representation drift, we now extend it to be applicable to the standard cross-entropy loss typically studied in ER (Aljundi et al., $2 0 1 9 \mathrm { a }$ ; Chaudhry et al., 2019). Given an incoming data batch, consider $C _ { o l d }$ the set of previously learned classes and $C _ { c u r r }$ the set of classes observed in the current incoming mini-batch. Denoting $C$ the set of classes included in the cross-entropy loss, we define the $\mathcal { L } _ { c e } ( \mathbf { X } , C )$ cross-entropy loss as: Lce(X, C) = − Px∈X log Psim(wc(x),fθ(x))c∈C sim(wc,fθ(x)) where $C \subset C _ { a l l }$ denotes the classes used to compute the denominator. We note that restricting the classes used in the denominator has an analogous effect to restricting the negatives in the contrastive loss. Consider the gradient for a single datapoint $x$ , ∂Lce(x,C)∂fn = W(\~p − \~y) 1\~y∈C . Here \~p denotes the softmax output of the network, $\vec { y }$ a one-hot target, $\mathbb { 1 } _ { \vec { y } \in C }$ a binary vector masking out classes not in $C$ , and W the matrix with all class prototypes $\{ \mathbf { w } _ { c } \} _ { c \in C _ { a l l } }$ . When the loss is applied in the batch setting, it follows that only prototypes whose labels are in $C$ will serve roles analogous to positives and negatives in the contrastive loss. We can then achieve a similar control as the metric learning approach on the learned representations.
104
 
105
  Now, our loss applied at each step would be:
106
 
md/dev/TJUNtiZiTKE/TJUNtiZiTKE.md CHANGED
@@ -114,7 +114,7 @@ $$
114
  \mathbb { Q } ^ { x , \mathrm { b b } , f } : \mathrm { ~ } \mathrm { ~ } \mathrm { ~ } \mathrm { ~ d ~ } Z _ { t } = \left( \sigma _ { t } f _ { t } ( Z _ { t } ) + \sigma _ { t } ^ { 2 } \frac { x - Z _ { t } } { \beta _ { 1 } - \beta _ { t } } \right) \mathrm { d } t + \sigma _ { t } \mathrm { d } W _ { t } , \quad Z _ { 0 } \sim \mu _ { 0 } .
115
  $$
116
 
117
- In Appendix A.4 and A.5, we show that $\mathbb { Q } ^ { x , \mathrm { b b } , f }$ is a bridge to $x$ if $\mathbb { E } _ { \mathbb { Q } ^ { x , \mathrm { b b } } } [ \left. f _ { t } ( Z _ { t } ) \right. ^ { 2 } ] < + \infty$ and $\sigma _ { t } > 0 , \forall t$ , which is very mild condition and is satisfied for most practical functions. The intuition is that the Brownian drift 2t xZt1 t is singular and grows to infinite as $t$ approaches 1. Hence, introducing an $f$ into the drift would not change of the final bridge condition, unless $f$ is also singular and has a magnitude that dominates the Brownian bridge drift as $t \to 1$ .
118
 
119
  ![](images/fed0f1744fb6d9b7b796699236364764933dfcfc9b71cdbeb14b1192bec4fe55.jpg)
120
  Figure 1: An overview of our training pipeline with molecule generation as an example. Initialized from a given distribution, we pass the data through the network multiple times, and finally get the meaningful output.
 
114
  \mathbb { Q } ^ { x , \mathrm { b b } , f } : \mathrm { ~ } \mathrm { ~ } \mathrm { ~ } \mathrm { ~ d ~ } Z _ { t } = \left( \sigma _ { t } f _ { t } ( Z _ { t } ) + \sigma _ { t } ^ { 2 } \frac { x - Z _ { t } } { \beta _ { 1 } - \beta _ { t } } \right) \mathrm { d } t + \sigma _ { t } \mathrm { d } W _ { t } , \quad Z _ { 0 } \sim \mu _ { 0 } .
115
  $$
116
 
117
+ In Appendix A.4 and A.5, we show that $\mathbb { Q } ^ { x , \mathrm { b b } , f }$ is a bridge to $x$ if $\mathbb { E } _ { \mathbb { Q } ^ { x , \mathrm { b b } } } [ \left. f _ { t } ( Z _ { t } ) \right. ^ { 2 } ] < + \infty$ and $\sigma _ { t } > 0 , \forall t$ , which is very mild condition and is satisfied for most practical functions. The intuition is that the Brownian drift 2t xZt1 t is singular and grows to infinite as $t$ approaches 1. Hence, introducing an $f$ into the drift would not change of the final bridge condition, unless $f$ is also singular and has a magnitude that dominates the Brownian bridge drift as $t \to 1$ .
118
 
119
  ![](images/fed0f1744fb6d9b7b796699236364764933dfcfc9b71cdbeb14b1192bec4fe55.jpg)
120
  Figure 1: An overview of our training pipeline with molecule generation as an example. Initialized from a given distribution, we pass the data through the network multiple times, and finally get the meaningful output.
md/dev/plKu2GByCNW/plKu2GByCNW.md CHANGED
Binary files a/md/dev/plKu2GByCNW/plKu2GByCNW.md and b/md/dev/plKu2GByCNW/plKu2GByCNW.md differ
 
md/train/-iu9-C_lan/-iu9-C_lan.md CHANGED
@@ -189,7 +189,7 @@ Main insights. Theorem 2 justifies CST under the expansion assumption. The gener
189
 
190
  # 4.2 Hard Case for Feature Adaptation and Standard Self-Training
191
 
192
- To gain more insight, we study UDA in a quadratic neural network $f _ { \theta , \phi } ( x ) = \theta ^ { \top } ( \phi ^ { \top } x ) ^ { \odot 2 }$ , where $\odot$ is element-wise power. In UDA, the source can have multiple solutions but we aim to learn the one working on the target [34]. We design the underlying distributions $p$ and $q$ in Table 6 to reflect this. Consider the following $P$ and $Q$ . $x _ { [ 1 ] }$ and $x _ { [ 2 ] }$ are sampled i.i.d. from distribution $p$ on $P$ , and from $q$ on $Q$ . For $i \in [ 3 , d ]$ , $x _ { [ i ] } = \sigma _ { i } x _ { [ 2 ] }$ on $P$ and $x _ { [ i ] } = \sigma _ { i } x _ { [ 1 ] }$ on $Q$ . $\sigma _ { i } \in \{ \pm 1 \}$ are i.i.d. and uniform. We also assume realizability: for all $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ $i \in [ 2 , d ]$ for both source and target. Note that are solutions to $P$ but only $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ i ] } ^ { 2 }$ [1] [i]works on $Q$ . We visualize this specialized setting in Figure 4.
193
 
194
  Table 1: The design of $p$ and $q$ .
195
 
@@ -198,7 +198,7 @@ Table 1: The design of $p$ and $q$ .
198
  ![](images/c5b098da78c5868e7858cc364d018d8dfcb55a8acb4b0000cd134653d0e02a42.jpg)
199
  Figure 4: The hard case where $d = 3$ . Green dots for $y = 1$ , red dots for $y = 0$ , and blue dots for $y = - 1$ . The grey curve is the classification boundary of different features. The good feature $x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ works on the target domain (shown in (a) and (c)), whereas the spurious feature $x _ { [ 1 ] } ^ { 2 } - x _ { [ 3 ] } ^ { 2 }$ only works on the source domain (shown in (b) andwhile CST learns tion 4.2, we show that feature adaptation and standard self-training learn . $x _ { [ 1 ] } ^ { 2 } - x _ { [ 3 ] } ^ { 2 }$ , $x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$
200
 
201
- To make the features more tractable, we study the norm-constrained version of the algorithms (details are deferred to Section A.3.2). We compare the features learned by feature adaptation, standard selftraining, and CST. Intuitively, feature adaptation fails because the ideal target solution $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ has larger distance in the feature space than other spurious solutions y = x2[1] $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ i ] } ^ { 2 }$ x2[i] . Standard selftraining also fails since it will choose randomly among all solutions. In comparison, CST can recover the ground truth, because it can distinguish the spurious solution resulting in bad pseudo-labels. A classifier trained with those pseudo-labels cannot work on the source domain in turn. This intuition is rigorously justified in the following two theorems.
202
 
203
  Theorem 3. For $\epsilon \in ( 0 , 0 . 5 )$ , the following statements hold for feature adaptation and self-training:
204
 
 
189
 
190
  # 4.2 Hard Case for Feature Adaptation and Standard Self-Training
191
 
192
+ To gain more insight, we study UDA in a quadratic neural network $f _ { \theta , \phi } ( x ) = \theta ^ { \top } ( \phi ^ { \top } x ) ^ { \odot 2 }$ , where $\odot$ is element-wise power. In UDA, the source can have multiple solutions but we aim to learn the one working on the target [34]. We design the underlying distributions $p$ and $q$ in Table 6 to reflect this. Consider the following $P$ and $Q$ . $x _ { [ 1 ] }$ and $x _ { [ 2 ] }$ are sampled i.i.d. from distribution $p$ on $P$ , and from $q$ on $Q$ . For $i \in [ 3 , d ]$ , $x _ { [ i ] } = \sigma _ { i } x _ { [ 2 ] }$ on $P$ and $x _ { [ i ] } = \sigma _ { i } x _ { [ 1 ] }$ on $Q$ . $\sigma _ { i } \in \{ \pm 1 \}$ are i.i.d. and uniform. We also assume realizability: for all $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ $i \in [ 2 , d ]$ for both source and target. Note that are solutions to $P$ but only $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ i ] } ^ { 2 }$ [1] [i]works on $Q$ . We visualize this specialized setting in Figure 4.
193
 
194
  Table 1: The design of $p$ and $q$ .
195
 
 
198
  ![](images/c5b098da78c5868e7858cc364d018d8dfcb55a8acb4b0000cd134653d0e02a42.jpg)
199
  Figure 4: The hard case where $d = 3$ . Green dots for $y = 1$ , red dots for $y = 0$ , and blue dots for $y = - 1$ . The grey curve is the classification boundary of different features. The good feature $x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ works on the target domain (shown in (a) and (c)), whereas the spurious feature $x _ { [ 1 ] } ^ { 2 } - x _ { [ 3 ] } ^ { 2 }$ only works on the source domain (shown in (b) andwhile CST learns tion 4.2, we show that feature adaptation and standard self-training learn . $x _ { [ 1 ] } ^ { 2 } - x _ { [ 3 ] } ^ { 2 }$ , $x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$
200
 
201
+ To make the features more tractable, we study the norm-constrained version of the algorithms (details are deferred to Section A.3.2). We compare the features learned by feature adaptation, standard selftraining, and CST. Intuitively, feature adaptation fails because the ideal target solution $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ 2 ] } ^ { 2 }$ has larger distance in the feature space than other spurious solutions y = x2[1] $y = x _ { [ 1 ] } ^ { 2 } - x _ { [ i ] } ^ { 2 }$ x2[i] . Standard selftraining also fails since it will choose randomly among all solutions. In comparison, CST can recover the ground truth, because it can distinguish the spurious solution resulting in bad pseudo-labels. A classifier trained with those pseudo-labels cannot work on the source domain in turn. This intuition is rigorously justified in the following two theorems.
202
 
203
  Theorem 3. For $\epsilon \in ( 0 , 0 . 5 )$ , the following statements hold for feature adaptation and self-training:
204
 
md/train/_IY3_4psXuf/_IY3_4psXuf.md CHANGED
@@ -92,7 +92,7 @@ Corollary 3.2.1. Consider EXTRA $C T _ { 1 }$ , where $\forall v \in \mathcal {
92
 
93
  Corollary 3.2.2. Consider EXTRA $C T _ { 2 }$ , where $\forall u , v \in \mathcal { V }$ , $\mathcal { V } _ { [ v ] } \neq \mathcal { V } _ { [ u ] }$ . Then $| \mathcal { M } | = | \mathcal { V } | a . s$
94
 
95
- Theorem 3.2 proves SHADOW-GCN does not oversmooth: 1. A normal GCN pushes the aggregation of same-degree nodes to the same point, while SHADOW-GCN with $\mathtt { E X T R A C T } _ { 2 }$ ensures any two nodes (even with the same degree) have different aggregation. 2. A normal GCN wipes out all information in $\boldsymbol { X }$ after many times of aggregation, while SHADOW-GCN always preserves feature information. Particularly, with φG (v) = δ[v](v)−1/2, a normal GCN generates only one unique value of for all $v$ . By contrast, SHADOW-GNN generates $| \nu |$ different values for any $\phi _ { \mathcal { G } }$ function.
96
 
97
  We compare the expressivity by showing 1. SHADOW-SAGE can express all functions GraphSAGE can, and 2. SHADOW-SAGE can express some function GraphSAGE cannot. Recall, a GraphSAGE layer performs the following: $\begin{array} { r } { \dot { \overline { { h _ { v } ^ { ( \ell ) } } } } = \sigma \left( \left( W _ { 1 } ^ { ( \ell ) } \right) ^ { \top } h _ { v } ^ { ( \ell - 1 ) } + \left( W _ { 2 } ^ { ( \ell ) } \right) ^ { \top } \left( \frac { 1 } { | \mathcal { N } _ { v } | } \sum _ { u \in \mathcal { N } _ { v } } \dot { h _ { u } ^ { ( \ell - 1 ) } } \right) \right) . } \end{array}$ We can prove Point 1 by making an $L ^ { \prime }$ -layer SHADOW-SAGE identical to an $L$ -layer GraphSAGE with the following steps: 1. let EXTRACT return the full $L$ -hop neighborhood, and 2. set $\bar { \boldsymbol { W } } _ { 1 } ^ { ( \ell ) } = \boldsymbol { I }$ , $W _ { 2 } ^ { ( \ell ) } = { \bf 0 }$ for $L + 1 \leq \ell \leq L ^ { \prime }$ . For point 2, we consider a target function: $\tau \left( \boldsymbol { X } , \boldsymbol { \mathcal { G } } _ { [ v ] } \right) =$ $\begin{array} { r } { C \cdot \sum _ { u \in \mathcal { V } _ { [ v ] } } \delta _ { [ v ] } \left( u \right) \cdot \pmb { x } _ { u } } \end{array}$ for some neighborhood $\mathcal { G } _ { [ v ] }$ , scaling constant $C$ and $\delta _ { [ v ] } \left( u \right)$ as defined in Proposition 3.1. An expressive model should be able to learn well this simple linear function $\tau$ .
98
 
 
92
 
93
  Corollary 3.2.2. Consider EXTRA $C T _ { 2 }$ , where $\forall u , v \in \mathcal { V }$ , $\mathcal { V } _ { [ v ] } \neq \mathcal { V } _ { [ u ] }$ . Then $| \mathcal { M } | = | \mathcal { V } | a . s$
94
 
95
+ Theorem 3.2 proves SHADOW-GCN does not oversmooth: 1. A normal GCN pushes the aggregation of same-degree nodes to the same point, while SHADOW-GCN with $\mathtt { E X T R A C T } _ { 2 }$ ensures any two nodes (even with the same degree) have different aggregation. 2. A normal GCN wipes out all information in $\boldsymbol { X }$ after many times of aggregation, while SHADOW-GCN always preserves feature information. Particularly, with φG (v) = δ[v](v)−1/2, a normal GCN generates only one unique value of for all $v$ . By contrast, SHADOW-GNN generates $| \nu |$ different values for any $\phi _ { \mathcal { G } }$ function.
96
 
97
  We compare the expressivity by showing 1. SHADOW-SAGE can express all functions GraphSAGE can, and 2. SHADOW-SAGE can express some function GraphSAGE cannot. Recall, a GraphSAGE layer performs the following: $\begin{array} { r } { \dot { \overline { { h _ { v } ^ { ( \ell ) } } } } = \sigma \left( \left( W _ { 1 } ^ { ( \ell ) } \right) ^ { \top } h _ { v } ^ { ( \ell - 1 ) } + \left( W _ { 2 } ^ { ( \ell ) } \right) ^ { \top } \left( \frac { 1 } { | \mathcal { N } _ { v } | } \sum _ { u \in \mathcal { N } _ { v } } \dot { h _ { u } ^ { ( \ell - 1 ) } } \right) \right) . } \end{array}$ We can prove Point 1 by making an $L ^ { \prime }$ -layer SHADOW-SAGE identical to an $L$ -layer GraphSAGE with the following steps: 1. let EXTRACT return the full $L$ -hop neighborhood, and 2. set $\bar { \boldsymbol { W } } _ { 1 } ^ { ( \ell ) } = \boldsymbol { I }$ , $W _ { 2 } ^ { ( \ell ) } = { \bf 0 }$ for $L + 1 \leq \ell \leq L ^ { \prime }$ . For point 2, we consider a target function: $\tau \left( \boldsymbol { X } , \boldsymbol { \mathcal { G } } _ { [ v ] } \right) =$ $\begin{array} { r } { C \cdot \sum _ { u \in \mathcal { V } _ { [ v ] } } \delta _ { [ v ] } \left( u \right) \cdot \pmb { x } _ { u } } \end{array}$ for some neighborhood $\mathcal { G } _ { [ v ] }$ , scaling constant $C$ and $\delta _ { [ v ] } \left( u \right)$ as defined in Proposition 3.1. An expressive model should be able to learn well this simple linear function $\tau$ .
98