# TotalVI probabilistic model

Hi, great work creating these ML models. I have recreated a subset of the TotalVI VAE model handling ADT data in Tensorflow. I the process I noticed that the distribution for the background rate is a function of the z latent variable. However I can not find any documentation for that in the TotalVI paper. There it is only stated that the prior (beta_nt) for that distribution is Lognormal with mean/sd for each batch X protein, but I don’t see any reference stating that the posterior is computed from z (while the functions computing the foreground scale and the mixing are explicitly described) So, should the background rate depend on Z, or should it only depend on the batch?

Cheers,
Atanas

Hi Atanas,

In equation 10 of the manuscript methods, we show the factorization of the approximate posterior. In this factorization indeed \beta depends on z. I’ll admit it’s likely confusing as to why this computation is in the generative function and not the inference function of the model.

In the loss method you will find the following term:

which is the kl divergence between the approximate posterior and the prior.

I also encourage you to check out supplementary note 6 of the manuscript.