Cs236 Lecture15

JInwoo·2025년 2월 12일

cs236

목록 보기
13/15

Evaluation

Classifier 같은 discriminative models에 대한 evaluation은 비교적 쉽다. 왜냐하면 task-specific 한 loss를 바로 적용할 수 있기 때문이다.(e.g. top-1 accuracy) 그러나 generative models에 대한 evaluation은 non-trivial 하다. generative models를 가지고 어떤 task를 할 것인지에 따라 다양하게 evaluation을 생각해 볼 수 있다.

Density Estimation or Compression

Density estimation의 경우 likelihood를 통해 model의 evaluation을 진행할 수 있다. train dataset을 가지고 model pθp_\theta를 학습 한 후, test dataset에 대한 likelihood를 측정하면 어떤 모델이 더 density estimation을 잘 하는지 비교가 가능하다.

Compression에 대한 평가도 likelihood를 이용하여 측정이 가능하다. compression이 잘되었다는 것은 model이 data의 idnetified patterns(redundancy) 를 잘 찾았다는 것을 의미한다.

그러나 likelihood를 이용한 측정 방식은 likelihood가 intractable 한 models(e.g. VAE, GAN, Energy-based model 등) 에서는 사용할 수 없다. 이때는 samples를 가지고 KDE를 사용하여 distribution을 추정하고 likelihood를 측정해 볼 수 있다.

Sample Quality

생성된 data의 sample quality를 측정하는 제일 좋은 방식은 사람을 투입하는 것이다. HYPEHYPE (Human eYe Perceptual Evaluation) 은 이러한 방식 중 하나이다. 그러나 당연하게도 human evaluation 방식은 비용이 매우 많이 들고, biased 가 발생 할 수 있으며 다시 측정하기 어렵다. 따라서 Quantitative evaluation 방식이 필요하다. 아래는 대표적인 quantitative evaluation 들이다.

  • Inception Score
    lable dataset을 가지고 sharpnessdiversity 를 측정, 두 값을 곱한 값을 metric으로 사용. 높을 수록 좋은 모델임을 의미.
    S=exp(Exp[c(yx)logc(yx)dy])S=\exp(E_{\mathbf{x}\sim p}[\int c(y|\mathbf{x})\log c(y|\mathbf{x})dy]) (cc는 pre-trained classifier. 예를 들면 inception network)
    D=exp(Exp[c(yx)logc(y)dy])D=\exp(-E_{\mathbf{x}\sim p}[\int c(y|\mathbf{x})\log c(y)dy]), c(y)=Exp[c(yx)]c(y)=E_{\mathbf{x}\sim p}[c(y|\mathbf{x})]
    IS=D×SIS=D\times S
  • FID(Frechet Inception Distance)
    generated samples에 대한 feature representation을 구하고, test set에 대한 feature representation을 구해 gaussian으로 fit 하고 Wasserstein-2 distance를 metric으로 사용. 낮을 수록 좋은 모델임을 의미.
    FID=μτμG2+Tr(Στ+ΣG2(ΣτΣG)1/2)FID=||\mu_\tau-\mu_\mathcal{G}||^2+\operatorname{Tr}(\Sigma_\tau+\Sigma_\mathcal{G}-2(\Sigma_\tau\Sigma_\mathcal{G})^{1/2}), G,τ\mathcal{G},\tau는 각각 generated samples와 test dataset을 의미
  • KID(Kernel Inception Distance)
    generated samples와 test dataset에 대한 feature representation을 구하여 Maximum Mean Discrepancy(MMD) 를 측정. 낮을 수록 좋은 값을 의미.
    수식은 생략

나머지 내용 생략

Reference

cs236 Lecture 15

profile
Jr. AI Engineer

1개의 댓글

comment-user-thumbnail
2025년 12월 28일

If you’re a Roblox player who loves to experiment, tweak, and explore new ways to play, you’ve probably heard of Delta Executor. It’s one of the most talked-about tools in the Roblox modding world https://delta-exploit.com/ a powerful exploit platform that lets players execute scripts, unlock hidden features, and fully customize their gameplay experience.

답글 달기