Questions tagged [kullback-leibler]

An asymmetric measure of distance (or dissimilarity) between probability distributions. It might be interpreted as the expected value of the log likelihood ratio under the alternative hypothesis.

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

Use Effect Size VS p-Value when determining the best fitting distribution?

I have a large sample size of about 50,000 I want to determine what theoretical distribution fits the distribution of my samples the best. What I did is to fit all distributions I know to the data ...
2
votes
1answer
147 views

What is the relation between ELBO and SGVB?

Evidence lower bound (ELBO) can be minimised, so that to find the most appropriate approximative distribution of the target distribution, which is equivalent to the maximisation of the corresponding ...
0
votes
1answer
45 views

Different optimization behaviours on delta vs non-delta targets

I built a simple classification model that is required to predict a probability distribution for a set of two available classes. The target distributions are not necessarily delta distributions. i.e ...
3
votes
1answer
168 views

Does this bounded, continuous probability distribution have a name?

Does this bounded, continuous probability distribution over $x$ have a name? $P(x|y) \propto \big(\frac{y}{x}\big)^x\big(\frac{1-y}{1-x}\big)^{(1-x)}$ for $x, y \in (0,1)$. This comes about by ...
1
vote
2answers
410 views

KL-divergence between two products

Given factorizations of two joint densities $p(x_1,...,x_n)=\prod_{i=1}^n p(x_i\mid \textrm{cond}(x_i))$ and $q(x_1,...,x_n)=\prod_{i=1}^n q(x_i\mid \textrm{cond}(x_i))$, where $\textrm{cond}(\bullet)$...
0
votes
1answer
213 views

Label smoothing formula

I recently came across this paper in section 3.2 it talks about label smoothing loss and how it's equivalent to s equivalent to adding the KL divergence between the uniform distribution u and the ...
0
votes
0answers
7 views

Proof help for multivariate mutual information as a sum of entropies

I'm following this paper on ICA and I got to equation (1) describing the multivariate mutual information contrast function as a sum of entropies. $J(Y) = \int p(y_1,...y_D)log(\frac{p(y_1,...y_D)}{p(...
0
votes
1answer
50 views

Variational inference with dependent variables

Classical variational inference uses mean field theory because of its computational benefits, i.e. assumes that the latent variables are independent. For gaussian distribution, it wants to find a ...
1
vote
1answer
25 views

The expected log-Likelihood in Kullback Leibler Divergence

Given a true normal distribution $g(x)$ with mean $\mu_G$ and variance $\sigma_G$, and a model $f(x)$, the KL divergence involves the expected log-likelihood $\mathbb{E}_G[log f(x|\theta]$. The ...
0
votes
1answer
33 views

Compare two distributions with varying focus on different regions

I have been trying to find if my problem matches has been discussed in prior research and if any technique exists to solve it. Here's the problem: Given two distributions (pdf) D1 and D2 over a ...
2
votes
1answer
69 views

KL-Divergence of $Q(z|X)$ and $P(z)$ in Variational Autoencoder (VAE)

I aim to understand how $D_{KL}[Q(z | X) || P(z)]$ can be converted to $\frac{1}{2} \sum_{k} (\Sigma(X) + \mu^{2}(X) - 1 - \log \Sigma(X))$, where $k$ is the dimension of the Gaussian distribution. ...
0
votes
1answer
60 views

KL Divergence of two standard normal arrays

I generated two 9000,1 np arrays with a = np.random.standard_normal(9000) b = np.random.standard_normal(9000) Then I check the KL Divergence with ...
10
votes
2answers
7k views

Kullback-Leibler Divergence for two samples

I tried to implement a numerical estimate of the Kullback-Leibler Divergence for two samples. To debug the implementation draw the samples from two normal distributions $\mathcal N (0,1)$ and $\...
1
vote
1answer
25 views

Why does variational bayes use $KL(Q || P)$ and not $KL(P || Q)$

In variational Bayes, we approximate the intractable posterior $P(Z | X)$ with a tractable $Q(Z)$ and minimize $KL(Q || P)$. Why do we not minimize $KL(P || Q)$ instead?
0
votes
0answers
28 views

Weigh Kullback Leibler Divergence with P entropy?

I'm wondering if it makes sense to weight Kullback-Leibler Divergences to highlight divergences on highly distinguishing features. I am however not very well versed in Information Theory, and would ...
5
votes
1answer
2k views

Deriving the KL divergence loss for VAEs

In a VAE, the encoder learns to output two vectors: $$\mathbf{\mu} \in\ \mathbb{R}^{z}$$ $$\mathbf{\sigma} \in\ \mathbb{R}^{z}$$ which are the mean and variances for the latent vector $\mathbf{z}$, ...
0
votes
1answer
1k views

How to achieve variational autoencoder (VAE) with unrestricted input?

For a normal VAE an input and a reconstruction with values in the range of $[0, 1]$ are expected. This is necessary since the log loss only makes sense for this range. If the input is not within $[0, ...
8
votes
2answers
5k views

What is the difference Cross-entropy and KL divergence?

Both of Cross-entropy and KL divergence are tools to measure the distance between two probability distribution. What is the difference? $$ H(P,Q) = -\sum_x P(x)\log Q(x) $$ $$ KL(P | Q) = \sum_{x} P(...
1
vote
0answers
21 views

Expectation of Log Likelihood Function with given parameters Proof

I have been looking for AICc value derivation employing Kullback-Leibler distance but as a result of my search I got stuck with expectation of loglikelihood. In the link loglikelihood is given as $InL(...
1
vote
0answers
55 views

How to show an alternate data processing inequality concerning KL divergence between conditionals?

Suppose $(Y,X) \sim F \in \mathcal{P(\mathbb{R^d})}$. Consider an arbitrary transformation $f$ that acts on $X$. My intuition is that the following should be a result in information theory: $$ \...
2
votes
1answer
87 views

Variational inference with deterministic dependencies between variables

Suppose I have a probabilistic graphical model shown in the picture, in which all variables are binary, $c_1$ and $c_2$ are observed, and I want to use mean-field variational inference to estimate ...
0
votes
1answer
49 views

Meaning of expectation with respect to a function?

This might be a trivial question, but I've come across a paper where some expectation is said to be taken with respect to some pdf. See example: How am I to interpret this, and is there some ...
9
votes
3answers
2k views

Estimate the Kullback Leibler (KL) divergence with monte carlo

I want to estimate the KL divergence between two continuous distributions f and g. However, I can't write down the density for either f or g. I can sample from both f and g via some method (for ...
1
vote
1answer
51 views

KL divergence minimization

While reading Unsupervised Data Augmentation for Consistency Training, I came across an equation that describes the minimization of KL divergence. $$\min_\theta \mathscr{J}_{UDA}(\theta) = \mathbb{E}...
0
votes
0answers
17 views

What is a reasonable value for KL Divergence

I am using scipy.stats.entropy for KL Divergence. When I create distributions to test I never receive values greater than .5. When I run the function on data I ...
2
votes
2answers
107 views

Expectation of the log-likelihood under the posterior

Suppose $L(X \mid \theta)$ is a likelihood function, i.e., a probability distribution over $X \in \mathcal{X}$ indexed by a parameter $\theta \in \Theta$. Suppose further we have a prior $\pi(\theta)$,...
0
votes
0answers
20 views

“Compressing” or downsampling a discrete probability distribution

I have a discrete probability distribution $P$ which I obtained by applying a softmax transformation, with an automatically-derived exponent $-\beta$, to a set of measurements (potentially large, in ...
0
votes
0answers
57 views

Measure the distance between two probability transition matrices

I have a probability transition matrix $P$ that contains some values very close to zero. I want to sparsify this matrix by taking the k largest values for each row and setting the others to zero. For ...
0
votes
0answers
16 views

How to minimise and expectation with respect to a parameter?

Suppose that $X$ is a random variable with distribution $G$. Let $H(X;\theta)$ be a parametric function with $\theta \in \Theta \subset {\mathbb R}^p$. I want to maximize the function $$\varphi(\...
2
votes
2answers
2k views

Kullback-Leibler divergence lower bound

Are there any (nontrivial) lower bounds on the KL-divergence between two densities? Informally, I am trying to study problems where $f$ is some target density, and I want to show that if $g$ is chosen ...
2
votes
1answer
67 views

Relative Entropy decomposition

Can the relative entropy (Kullback Leibler divergence) between multivariate distributions be decomposed into relative entropies of the different variables plus some measure of dependence between the ...
1
vote
0answers
48 views

How to use KL divergence to compare two distributions?

I am trying to model the probability distribution of a multi-dimensional dataset where all the values are discrete. Suppose the training data (represented by T) is of the shape (m, n) where n is the ...
0
votes
1answer
64 views

KL divergence of a uniform prior and a custom posterior

So I was reading the Google's paper on VQ-VAE and have stumbled upon the derivation of KL divergence of the uniform prior and the given distribution: $$q(z=k \mid x)=\left\{\begin{array}{ll}{1} & ...
0
votes
0answers
27 views

How to prove KL(q(z)|p(z)) = E_q(z) [ log f(z) ] where f is the CDF of p?

As title. It was used in https://arxiv.org/abs/1905.10549 without proving.
9
votes
1answer
698 views

Why is Kullback-Leilbler divergence a better metric for measuring distance between two probability distributions than squared error? [duplicate]

I know that KL-divergence is a metric that is more suitable when we want to measure the distance between numbers which a probability form. However, I am still confused what is the benefit of using KL-...
1
vote
1answer
311 views

multidimensional KL loss

I read this question on Kullback Liebler Divergence Now i'm have a multidimensional distributions, like these: for example i try to predict if a person in image is a male: ...
4
votes
1answer
187 views

Connection between log predictive density and Kullback-Leibler information measure

I have read in Bayesian Data Analysis by Andrew Gelman that log predictive density can be used to compare Bayesian models due to its connection to the Kullback-Leibler information. The log ...
0
votes
0answers
18 views

Kullback-Leibler divergence Loss With different-length vectors

I am new to KL Divergence Loss (and indeed all similar comparisons between discrete series data). The output of my network produces a series of tuples of a length that varies during training. The ...
1
vote
0answers
8 views

Markov type bound based on KL divergence?

Given two discrete distribution $p, q$ on some universe $U$, if I know they have a bounded KL divergence, say some number $c$, can I say anything about how much each point in the universe differs in ...
1
vote
0answers
20 views

A divergence that can be extended to logistic functions?

If I have data $\{(x_i, y_i)\}_{i=1}^n$ where the dependent variable is binary $(y_i = 0,1)$ I can model it using a logistic function: $$f(x; \alpha, \beta) = \frac{1}{1 + e^{-(\alpha + \beta x)}}$$ ...
2
votes
0answers
83 views

Relation Between Wasserstein Distance and Relative Entropy

Consider the Wasserstein metric of order one $W_1$ (aka the Earth Movers Distance). I would like to know whether it is possible to link $W_1$ and relative entropy and what this would mean intuitively. ...
0
votes
1answer
51 views

Can multivariate Gaussians KL divergence be a negative value?

I'm trying to find if two hidden neurons in RBF Network overlap with each other or not? It's an online classification problem, it means data come to our network one-by-one and then discard completely. ...
1
vote
1answer
320 views

KL divergence between gaussian and uniform distribution

Is the KL divergence not defined because uniform has bounded support and gaussian has unbounded support? How else can I calculate the distance of my gaussian to a 'maximum entropy' distribution if I ...
0
votes
0answers
21 views

Quantifying information loss (KL divergence?) between a multivariate and a univariate discrete distribution

Let's say I have n discrete variables, n1, n2, ... n_n, each with a different scale, and another discrete variable ...
1
vote
0answers
27 views

Running two MCMC chains in parallel while minimizing Kullback-Leibler divergence between both sample distributions

I want to sample from a distribution $p(X)$ with $X \in R^n$. However, I can only evaluate the likelihoods of $Z = AX$ and $Z = BX$ with $A,B \in R^{m \times n}$ and $m = n-1$. Now my idea is to run ...
79
votes
2answers
77k views

KL divergence between two univariate Gaussians

I need to determine the KL-divergence between two Gaussians. I am comparing my results to these, but I can't reproduce their result. My result is obviously wrong, because the KL is not 0 for KL(p, p). ...
2
votes
0answers
43 views

Name/definition of $\int \log F(x) \cdot g(x)dx$?

We know that: $$-\int \log f(x) \cdot g(x)dx,$$ where $f$ and $g$ are density functions, is known as the cross entropy. Does $$-\int \log F(x) \cdot g(x)dx,$$ where $F$ is the cumulative ...
0
votes
2answers
30 views

Mysteriously defined KL-divergence term [duplicate]

I am trying to re-create a variational autoencoder. The loss function has two terms: reconstruction loss and KL-divergence term. KL-divergence is defined as $$ D_{KL}(P||Q) = -\sum_{x\in X}{P(X)\log\...
6
votes
3answers
1k views

Why don't we use a symmetric cross-entropy loss?

Machine learning classifiers often use the cross-entropy $\mathbb{H}[p,q]$, where $p$ is the true distribution (often a delta) and $q$ is the predicted distribution over classes (or can at least be ...
1
vote
0answers
136 views

Understanding KL divergence between two univariate Gaussian distributions

I'm trying to understand KL divergence from this post on SE. I am following @ocram's answer, I understand the following : $\int \left[\log( p(x)) - log( q(x)) \right] p(x) dx$ $=\int \left[ -\frac{1}...