Datasets:
Tasks:
Question Answering
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
100K - 1M
ArXiv:
License:
Add files using upload-large-folder tool
Browse filesFiles changed (5)
99 unmodified lines10010110210310410510699 unmodified lines# 4.3 CROSS-ENTROPY BASED ALTERNATIVE (ER-ACE)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.Now, our loss applied at each step would be:99 unmodified lines10010110210310410510699 unmodified lines# 4.3 CROSS-ENTROPY BASED ALTERNATIVE (ER-ACE)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.Now, our loss applied at each step would be:
113 unmodified lines114115116117118119120113 unmodified lines\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 } .$$
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