Fast and Adversarial Robust Kernelized SDU Learning

Yajing Fan, Wanli Shi, Yi Chang, Bin GuAISTATS 2024

Abstract

SDU learning, a weakly supervised learning problem with only pairwise similarities, dissimilarities data points and unlabeled data available, has many practical applications. However, it is still lacking in defense against adversarial samples, and its learning process can be expensive. To address this gap, we propose a novel adversarial training framework for SDU learning. Our approach reformulates the conventional minimax problem as an equivalent minimization problem based on the kernel perspective, departing from traditional confrontational training methods. Additionally, we employ the random gradient method and random features to accelerate the training process. Theoretical analysis shows that our method can converge to a stationary point at a rate of $\mathcal{O}(1/T^{1/4})$. Our experimental results show that our algorithm is superior to other adversarial training methods in terms of generalization, efficiency and scalability against various adversarial attacks.

Introduction

In many real-world scenarios, obtaining full labels for every data point is prohibitively expensive or raises significant privacy concerns. Similar-Dissimilar-Unlabeled (SDU) learning offers a solution by utilizing "weak" supervision: it is often much easier to determine if two samples are similar (belonging to the same class) or dissimilar (belonging to different classes) than to assign absolute labels.

Despite its potential, SDU learning faces two major hurdles. First is adversarial vulnerability; because SDU relies on weak supervision, models are particularly sensitive to adversarial noise—tiny, intentional perturbations that can trick a classifier. Second is computational complexity. Existing robust SDU methods often rely on kernel matrices that scale poorly ($O(n^3)$ time and $O(n^2)$ space), making them unusable for large-scale datasets. Furthermore, standard adversarial training requires an expensive "inner loop" to generate adversarial samples during every training step.

Methodology: The QSG-ATSDU Framework

To address these challenges, we propose QSG-ATSDU (Quadruple Stochastic Gradient Adversarial Training for SDU). The framework is built on three pillars designed to optimize both robustness and efficiency.

Minimax Reformulation in RKHS

Traditionally, adversarial training is framed as a minimax problem where the model minimizes loss while an adversary maximizes it. By leveraging the properties of Reproducing Kernel Hilbert Spaces (RKHS), we prove that this worst-case scenario can be mathematically replaced by a regularized loss function. This eliminates the need for expensive iterative processes (like Projected Gradient Descent) to generate adversarial samples during training.

Conceptual illustration of SDU learning and adversarial perturbations in input space vs. kernel feature space.

Scalability via Random Fourier Features (RFF)

To overcome the $O(n^3)$ complexity of exact kernel methods, we utilize Random Fourier Features. RFF maps data into a lower-dimensional space that approximates the kernel, shifting the computational burden from the number of samples ($n$) to the number of random features ($m$), where $m \ll n$. This allows kernel-based methods to be applied to massive datasets.

Quadruple Stochastic Gradient (QSG)

The training process employs a quadruple sampling strategy, drawing simultaneously from similar pairs, dissimilar pairs, unlabeled data, and the random features. This approach ensures a theoretical convergence rate of $O(1/T^{1/4})$ to a stationary point, even in non-convex settings.

Experimental Results

We evaluated QSG-ATSDU on six binary classification benchmarks, including image data (MNIST, CIFAR-10) and tabular/sensor data (a9a, Acoustic, Combined, and Covertype).

Robustness and Efficiency

QSG-ATSDU consistently outperformed baselines such as SDU-DH and nSU across various attack vectors (FGSM, PGD, and CW). For example, on MNIST under a PGD attack, our method maintained approximately 75% accuracy, while standard SDU methods saw performance plummet.

In terms of efficiency, the proposed method achieved a 20x speedup over traditional adversarial training (AT-SDU). While baseline methods often ran out of memory or required thousands of seconds on larger datasets, QSG-ATSDU demonstrated a linear relationship between training size and time, handling the covtype dataset (over 580,000 samples) with ease.

Running time comparison on the covtype dataset, demonstrating the superior scalability of the proposed method.

Conclusion

QSG-ATSDU represents a significant advancement in SDU learning by baking robustness directly into the loss function and utilizing random features for scalability. Future work will focus on extending this framework to multi-class classification and exploring automated hyperparameter tuning for the kernel width and feature count.

Summary updated

BibTeX
@inproceedings{fan2024fast,
  author = {Yajing Fan and Wanli Shi and Yi Chang and Bin Gu},
  title = {{Fast and Adversarial Robust Kernelized SDU Learning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=ICIWuBBkKs},
}
Figure