이 논문을 읽기 위해 M2m 논문을 읽었다가 Score-based modeling과 SDE 논문까지 읽었다. 그럼 이제 충분히 배경지식이 갖춰진 것 같으니 본 논문을 분석해보자.
1. Introduction
tabular data는 data mining과 machine learning에서 자주 등장하는 데이터지만, imbalanced situation이 발생하는 경우가 많다. imbalanced situation은 각 class에 해당하는 샘플의 수가 크게 차이 나는 현상으로, 계속하여 연구되어온 주제이다. 이를 해결하기 위해 classical statistical method부터 recent deep generative method까지 다양한 방법이 제시되었다.
다양한 deep generative model 중, 최근에는 score-based generative model (SGM)이 많은 관심을 받았다. SGM은 stochastic differential equation (SDE)를 기반으로 한 framework를 착안하여 i) (forward) diffusion process와 ii) (reverse) denoising process를 모델링했는데, 이를 그림으로 표현하면 Fig.1(a)와 같다. diffusion process는 original data $\mathbf{x}_0$에 increasing noise를 추가하는 과정이고, denoising process는 diffusion process의 reverse로 noisy data $\mathbf{x}_T$로부터 noise를제거하는 과정이다. 이때 $t \in [0, T]$에 대해 score function $\nabla_\mathbf{x} \log p_t(\mathbf{x})$는 score neural network로 근사되고, 이때 diffusion과 denoising process에서의 step size는 1이다. generative adversarial network (GAN)과 비교했을때, SGM이 더욱 좋은 퀄리티의 샘플을 생성한다는 결과가 알려져 있다. 그러나, SGM은 다른 generative model과 비교했을 때 더욱 많은 computation을 요구한다는 단점이 있다. 예를 들어 SGM 논문에서는 $T=1000$으로 설정되어 있는데, 이러한 long-step SDE에 대한 denoising process를 수행하는 데는 많은 시간이 걸린다.
본 논문에서, 우리는 tabular data를 다루기 위한 Score-based OverSampling (SOS) method를 제안하여 i) model design을통해 $T$의 값을 줄일 수 있고, ii) score network architecture가 redesigned되어야 하며, iii) fine-tuning method가 synthesis quality를 향상시킬 수 있다는 것을 찾아냈다.
Fig.1(b)에 보여진 것처럼, 우리는 non-target (major) class와 oversample해야 하는 target (minor) class에 대한 SDE를 학습시다. 일반성을 잃지 않고 binary class data를 사용했지만, 본 모델은 multiple minor classes의 경우로 확장될 수 있다. 이 경우 target과 non-target class의 ground-truth score value를 모으고 각각의 score network를 학습시켰기 때문에 매우 다른 revesrse SDE를 얻게 된다.
이렇게 얻어진 SDE를 이용하여 Fig.1(b)의 Option 1과 2로 표기된 두 모델을 만든다. Option 1은 non-target class의 forward SDE와 target class의 reverse SDE를 결합하여 style transfer를 만드는 것이다. 이 경우 non-target record $\mathbf{x}_0^+$가 noisy record $\mathbf{x}_T^+$로 변환되고, 이로 인해 fake target record $\hat{\mathbf{x}}_0^-$가 생성된다. Option 2는 noisy vector $\mathbf{z}$로부터 fake target record를 만드는 것이다.
우리는 이 방법을 Fig.1(c)와 같이 fine-tuning을 적용함으로써 더욱 향상시킬 수 있다. fine-tuning은 tabular data $\mathcal{T}$에 대해 $\mathbf{x} \in \mathcal{T}$로부터 얻은 두 gradient $S_{\theta_-}$와 $S_{\theta_+}$ 간의 angle을 비교하여 $S_{\theta_-}$를 조절하는 것이다.
우리는 6개의 benchmark tabular dataset과 10개의 baseline으로 실험을 진행했다. 6개의 dataset 중 4개는 binary classification, 2개는 multi-class classification이었다. baseline의 경우 다양한 종류의 oversampling algorithm, GAN, VAE 등을 사용하였다. 이 실험에서 우리의 방법은 다른 방법과 비교했을 때 더욱 우수한 성능을 보였으며, 모든 benchmark dataset에 대해 test score를 성공적으로 높일 수 있었다.
본 연구를 요약하면 다음과 같다.
(1) oversampling tabular data를 다루기 위한 score-based generative model (SGM)을 디자인하였다. (현 시점의 SGM은 주로 image synthesis를 학습하는 모델)
(2) tabular data의 score function을 근사하기 위한 neural network를 디자인하고 style transfer-based oversampling technique를 제시하였다.
(3) 샘플링 퀄리티를 향상시키기 위해 fine-tuning method를 디자인하였다.
(4) 6개의 benchmark dataset과 10개의 baseline에 대해 실험했을 때 우리의 방법은 성능이 더 뛰어났을 뿐만 아니라 모든 케이스에 대한 test score도 높일 수 있었다.
(5) 또한, 우리의 방법은 full fake tabular data를 생성하는 데도 다른 baseline보다 좋은 성능을 보여주었다.
2. Related Work and Preliminaries
이 section에서는 본 연구에서 필요로 하는 선행연구를 소개하고 있다.
2.1. Score-based Generative Models
SGM에서의 diffusive process의 SDE와 reverse SDE는 각각 다음과 같다.
이때 $f$와 $g$의 type에 따라 SGM은 i) variance exploding (VE), ii) variance preserving (VP), 또는 iii) sub-variance preserving (sub-VP) model로 분류될 수 있다. 일반적으로 $\mathbf{x}_0$는 real sample을 의미하고 diffusive process Eq (1)을 이용하여 $t \in [0, T]$에 대해 $\mathbf{x}_t$를 구할 수 있다. 반대로 reverse SDE Eq (2)는 $t=T$에서의 noisy sample을 $t=0$의 data sample로 변환해준다.
forward SDE는 해석적으로 계산할 수 있기 때문에 그 과정에서 log transition probability의 gradient인 $\nabla_{\mathbf{x}_t} \log p(\mathbf{x}_t|\mathbf{x}_0)$를 구할 수 있다. 이를 이용하면 다음의 (3)을 이용하여 score network $S_\theta: \mathbb{R}^{\dim(\mathbf{x})} \times [0, T] \rightarrow \mathbb{R}^{\dim(\mathbf{x})}$를 훈련시킬 수 있다. 이때 $\dim(\mathbf{x})$는 $\mathbf{x}$의 차원으로, image의 경우 픽셀 수를 의미하고 tabular data의 경우 열의 수를 의미한다.
이러한 training method를 denoising score matching이라 하고, Eq (3)으로부터 얻은 $\theta^*$는 reverse SDE인 Eq (2)를 풀 수 있다. 즉 denoising score matching training의 optimal solution인 $\theta^*$는 exact score matching training의 optimal solution과 같다.
SGM은 계속해서 발전되어 왔는데, 대표적인 예로 adversarial score matching model은 SGM과 GAN을 결합한 것이다. 이때 reverse SDE는 단순히 forward SDE의 역으로 결정되는 것이 아니라 denoising score matching과 GAN의 adversarial training 사이의 균형점으로 결정되는데, 이를 그림으로 표현하면 Fig.2(a)와 같다.
training process가 완료된 후에는 predictor-corrector framework로 fake data sample을 합성할 수 있다. prediction phase에서는 Gaussian noise를 샘플링한 후 Eq (2)의 reverse SDE를 해결한다. $\hat{\mathbf{x}}_0$를 reverse SDE의 solution이라 할 때, correction phase에서는 Langevin corrector를 사용하여 $\hat{\mathbf{x}}_0$을 향상시킨다. correction phase의 핵심 아이디어를 그림으로 표현하면 Fig.2(b)와 같다. 우리가 예측한 샘플 $\hat{\mathbf{x}}_0$을 log probability의 gradient direction을 따라 수정하여 얻어진 샘플은 더 높은 log probability를 가지게 된다.
2.2. Tabular Data Synthesis
tabular data synthesis를 수행하는 가장 보편적인 deep learning-based model은 generative adversarial network (GAN)으로, generator와 discriminator를 경쟁적으로 학습시킴으로써 fake sample을 생성한다. GAN에도 여러 종류가 있는데, 그중 안정적인 학습을 위해 보편적으로 사용되는 것은 WGAN이다. 특히, WGAN-GP는 다음의 식으로 정의되는 모델이다.
여기서 $G$는 generator function, $D$는 Wasserstein critic function, $p_\mathbf{z}$는 noisy vector $\mathbf{z}$에 대한 prior distribution으로 $\mathcal{N}(\mathbf{0}, \mathbf{1})$의 분포를 따른다. $p_\mathbf{d}$는 data distribution, $\widetilde{\mathbf{x}}$는 $G(\mathbf{z})$와 $\mathbf{x}$의 randomly weighted combination이고 $\lambda$는 regularization weight이다.
tabular data synthesis은 feature의 joint probability distribution을 모델링하여 realistic table record를 생성하는데, 이를 수행하는 알고리즘으로는 CLBN, TVAE, RGAN, MedGAN, TableGAN, PATE-GAN 등이 있다. 하지만 GAN을 사용하여 tabular data를 합성하는 과정에서 드러나는 문제점은 mode collapse이다. 많은 경우, GAN에 의해 합성된 fake data distribution은 일부 mode에만 국한되어 다른 mode를 표현하지 못한다. 일부 GAN의 변형들은 이러한 문제를 해결하기 위해, generator가 가능한 다양한 mode에서 샘플을 생성하도록 강제하는 방안을 제안했다. 그 대표적인 예로는 VEEGAN, CTGAN, OCT-GAN 등이 있다.
2.3. Minor-class Oversampling
multi-class data는 주로 imbalanced class 문제를 가지는데, 이를 해결하기 위한 방법으로는 classical statistical method와 deep learning-based method의 2가지가 있다. classical statistical method는 synthetic minority oversampling technique (SMOTE) method를 기반으로 하는데, SMOTE는 두 minor sample로 synthetic sample을 생성하는 방법이다. SMOTE를 향상시킨 기법으로는 Borderline SMOTE (B-SMOTE), adaptive synthetic sampling (ADASYN) 등이 있다. deep learning-based method는 GAN을 기반으로 한 것으로, image에서의 minor class를 oversampling하는 것을 목표로 한다. 대표적인 예시로는 ACGAN, BAGAN, cWGAN, GL-GAN, GAMO 등이 있다. 각 method에 대한 정보를 정리하면 다음과 같다.