blackfeather-wang / ISDA-for-Deep-Networks

An efficient implicit semantic augmentation method, complementary to existing non-semantic techniques.
582 stars 93 forks source link

augmentation features or logits? #33

Closed Bunnyqiqi closed 1 year ago

Bunnyqiqi commented 2 years ago

Hi, thanks a lot for your works. There are two questions that confused me a lot:

(1) I think CV_temp is the covariance matrix corresponding to each class, but following augmentations happened on y, and y is logits. If features shape is [N, A], then y's shape is [N, C]. As your paper said, we should augment in features, should we augment on features not y? As the sigma2 is [N, C] , features is [N, A], If I'd like to augment directly on features, where should I correct?

(2)And what's the meaning of these two steps on sigma2 computation?

Thanks a lot ! image

Panxuran commented 1 year ago

Thanks for your attention to our work.

For question (1), your understanding is correct than isda needs to augment on features instead of logits. In the code, as we define the last classifier (fc) out of the whole model in an explicit way (see in mage classification on CIFAR/train.py line 347), thus the output y precisely represents the feature.

For question (2), this is because we only consider approximating the diagonal values of covariance matrix due to GPU memory limitation.