Information
WWW 2018
Netflix, MIT, Google AI
Background
VAE recommender systems(1)의 CDAE는 denosing autoencoder를 기반으로 한다면, 해당 논문은 VAE를 기반으로 한다.

ABSTRACT
We introduce a different regularization parameter for the learning objective, which proves to be crucial for achieving competitive performance. Remarkably, there is an efficient way to tune the parameter using annealing. The resulting model and learning algorithm has information-theoretic connections to maximum entropy discrimination and the information bottleneck principle.
we identify the pros and cons of employing a principled Bayesian inference approach and characterize settings where it provides the most significant improvements.
1 INTRODUCTION
we extend variational autoencoders (vaes) [24, 37] to collaborative filtering for implicit feedback. We propose a neural generative model with multinomial conditional likelihood.
Recommender systems are often evaluated using rankingbased measures, such as mean average precision and normalized discounted cumulative gain [21]. Top-N ranking loss is difficult to optimize directly and previous work on direct ranking loss minimization resorts to relaxations and approximations [49, 50]. Here, we show that the multinomial likelihoods are well-suited for modeling implicit feedback data, and are a closer proxy to the ranking loss relative to more popular likelihood functions such as Gaussian and logistic.
To make use of the sparse signals from users and avoid overfitting, we build a probabilistic latent-variable model that shares statistical strength among users and items. Empirically, we show that employing a principled Bayesian approach is more robust regardless of the scarcity of the data.
We find that two adjustments are essential to getting state-of-the-art results with vaes on this task:
- First, we use a multinomial likelihood for the data distribution. We show that this simple choice realizes models that outperform the more commonly used Gaussian and logistic likelihoods.
- Second, we reinterpret and adjust the standard vae objective, which we argue is over-regularized. We draw connections between the learning algorithm resulting from our proposed regularization and the information-bottleneck principle and maximum-entropy discrimination.
2 METHOD
$u \in \{1, ..., U\}$ to index users, $i \in \{1, ..., I\}$ to index items
user-by-item interaction matrix $X \in \mathbb{N}^{U \times I} = \{x_{1}, ..., x_{U}\}$
interaction for each item from user $u$ $x_{u}=[x_{u1}, ..., x_{uI}]^{\top} \in \mathbb{N}^{I}$
2.1 Model
a K-dimensional latent representation $z_{u} \sim \mathcal{N}(0, I_K) \in \mathbb{R}^{K}$ from a standard Gaussian prior.
$\pi(z_{u}) = softmax(MLP(z_{u})), MLP \in \mathbb{R}^{K \times I}$
total number of interactions $N_{u} = \sum_{i} x_{ui}$ from user $u$
observed feedback $x_u$ is assumed to be sampled from a multinomial distribution with probability $\pi(z_u)$.
the log-likelihood for user $u$ is:
$$\log p_\theta(x_u \mid z_u) \overset{\underset{\mathrm{c}}{}}{=} \sum_i x_{ui} \log \pi_i(z_u)$$
$\log p_\theta(x_u \mid z_u)$: 주어진 latent vector $z_u$가 주어졌을 때 observed interaction $x_u$일 확률
$\sum_i x_{ui} \log \pi_i(z_u)$: 아이템 별 로그 확률의 가중합. $x_{ui} \in \{0, 1\}$로 interaction 여부이고, $\pi_i(z_u)$는 $z_u$로부터 계산된 item $i$와 interaction을 했을 확률.
we present two popular choices of likelihood functions used in latent-factor collaborative filtering:
- Gaussian
$$ \log p_\theta(x_u \mid z_u) = - \sum_i \frac{c_{ui}}{2} (x_{ui} - f_{ui})^2 $$
$c_{xu_i} \equiv c_{ui}$ where $c_1 > c_0 $, 균형을 위해 관찰된 데이터에 관찰되지 않은 데이터보다 큰 가중치를 부여함
- logistic likelihoods.
$$\log p_\theta(x_u \mid z_u) = \sum_i x_{ui} \log \sigma(f_{ui}) + (1 - x_{ui}) \log(1 - \sigma(f_{ui}))$$
$\sigma(x) =1/1 + \exp(-x)$ is the logistic function.
2.2 Variational inference
2.2.1 Amortized inference and the variational autoencoder
VAE에서는 encoder에 input $x_u$를 입력해 latent representation $z_u$를 샘플링하기 위한 평균과 표준편차를 생성한다. 즉, $\mu_u$가 encoder에 $x_u$를 입력해 얻은 $z_u$의 평균이고 $\sigma_u$가 encoder에 $x_u$를 입력해 얻은 $z_u$의 표준편차라고 하면 latent representation $z_u$의 distribution은 다음과 같다.
$$q(z_u) = \mathcal{N} \left( \mu_u, \text{diag} \left( \sigma_u^2 \right) \right)$$
그리고 위 식에서 $\mu_u$과 $\sigma_u$를 최적화하기 위해 다음의 식을 최소화한다.
$$\text{KL}(q(z_u) \parallel p(z_u | x_u))$$
그런데 여기서 사용자 $u$에 대한 $\mu_u$와 $\sigma_u$를 최적화하게되면, 사용자가 늘어날수록 최적화해야 할 파라미터 수가 급격히 증가하게 된다. 그러므로 사용자 정보 $x_u$가 입력되면 최적화된 $\mu_u$와 $\sigma_u$를 추정하는 인코더 $g_\phi$를 학습한다.
$$\mathbf{g}_\phi(x_u) \equiv [\mu_\phi(x_u), \sigma_\phi(x_u)] \in \mathbb{R}^{2K}$$
그러므로 $x_u$가 주어졌을 때 $z_u$의 distribution는 다음과 같다.
$$q_\phi(z_u | x_u) = \mathcal{N} \left( \mu_\phi(x_u), \text{diag} \left\{ \sigma_\phi^2(x_u) \right\} \right)$$
그러나 $z_u$를 위 분포에서 샘플링하면, 샘플링 결과가 확률적이고 랜덤한 값이기 때문에 입력 $x_u$에 대한 기울기(변화 정도)를 $\phi$에 대해 미분할 수 없다. $\phi$가 변화함에 따라 랜덤하게 샘플링된 $z_u$가 어떻게 변하는지 알 수 없기때문이다. 그러므로 reparametrization trick를 도입하여 다음과 같이 $z_u$를 샘플링한다.
$$z_u = \mu_\phi(x_u) + \epsilon \cdot \sigma_\phi(x_u)$$
$\epsilon \sim \mathcal{N}(0, I_K)$은 정규분포부터 샘플링된 랜덤한 값이지만, $\mu_phi(x_u)$와 $\sigma_phi(x_u)$는 네트워크의 출력이므로 미분 가능하다. 지금까지 네트워크의 정의를 내렸다면, 이제 $x_u$를 복원하도록 $\log p(x_u;\theta)$를 최대화한다. 일반적으로 VAE는 ELBO(evidence lower bound)를 최적화하며 $\log p(x_u;\theta)$를 다음과 같이 전개한다.
$$\log p(x_u; \theta) \geq \mathbb{E}_{q_\phi(z_u | x_u)} \left[ \log p_\theta(x_u | z_u) \right] - \text{KL}(q_\phi(z_u | x_u) \parallel p(z_u)) \equiv L(x_u; \theta, \phi)$$
2.2.2 Alternative interpretation of ELBO
VAE의 기존 ELBO는 두 가지 관점으로 해석할 수 있다: 첫번째 항은 reconstruction error를 나타내며 입력 $x_u$를 잠재 변수 $z_u$를 통해 얼마나 잘 복원되었는지 측정한다. 두번째 항은 $x_u$가 주어졌을 때 $z_u$의 분포 $ q_\phi(z_u | x_u) $가 사전에 정의한 분포 $p(z_u)$와 얼마나 다른지 측정하여 보정하는 regularization으로 볼 수 있다. 이 관점에서 정규화 강도를 제어하기 위해 매개변수 $\beta$를 도입해 ELBO 식을 다음과 같이 확장한다.
$$L_\beta(x_u; \theta, \phi) \equiv \mathbb{E}_{q_\phi(z_u | x_u)} \left[ \log p_\theta(x_u | z_u) \right] - \beta \cdot \text{KL}(q_\phi(z_u | x_u) \parallel p(z_u)).$$
$\beta$를 통해 데이터를 얼마나 잘 복원하는지와 학습 중 근사된 사후 분포가 사전 분포에 얼마나 가까운지 사이의 trade-off를 도입할 수 있다. 그러므로 $\beta < 1$이면, 모델이 샘플링을 통해 복원에 더 집중해 새로운 사용자 기록을 생성하는 능력 약해질 수 있다. 궁극적인 목표는 좋은 추천을 만드는 것이지 새롭게 사용자 기록을 상상으로 생성하는 것이 아니다. 또한 $\beta$를 도입하는 것은 비용이 들지 않으며, 성능이 상당히 개선된다.
Selecting $\beta$: we start training with $\beta = 0$, and gradually increase $\beta$ to 1 and record the best $\beta$ when its performance reaches the peak. 1) blue solid: without KL annealing, 2) green dashed: with KL annealing all the way to $\beta = 1$, $\beta$ reaches 1 at around 80 epochs. 3) red dot-dashed: with KL anneliing to all the way 0.2

2.2.3 Computational Burden
A computational challenge that comes with our approach, however, is that when the number of items is huge, computing the multinomial probability $\pi(z_u)$ could be computationally expensive, since it requires computing the predictions for all the items for normalization. If this becomes a bottleneck when working with larger item sets, one can easily apply the simple and effective method proposed by Botev et al. [6] to approximate the normalization factor for $\pi(z_u)$.