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
1
vote
0answers
37 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: $$ \...
0
votes
0answers
17 views

KL divergence between two sampling?

I was wondering if it is possible to find the KL between two samplings? not probabilities. Each one sampled from a multivariate gaussian distribution.
0
votes
1answer
41 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 ...
2
votes
1answer
79 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
0answers
13 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 ...
1
vote
1answer
38 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
18 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 ...
2
votes
2answers
100 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
33 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(\...
0
votes
0answers
35 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
42 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
25 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.
0
votes
0answers
15 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 ...
7
votes
1answer
398 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
0answers
18 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
65 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
41 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. ...
0
votes
1answer
137 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
18 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
26 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 ...
2
votes
1answer
79 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 ...
2
votes
0answers
42 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
29 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\...
1
vote
0answers
108 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}...
1
vote
0answers
32 views

Approximating the Kullback-Leibler Divergence with a Laplace approximation

Suppose I wish to compute the (asymptotic) Kullback-Leibler Divergence (KLD) between the exact Bayesian posterior $$q_{n}(\theta|x_{1:n}) \propto \pi(\theta)\prod_{i=1}^n p(x_i|\theta)$$ and the ...
0
votes
1answer
120 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 ...
4
votes
1answer
190 views

Does the Jensen-Shannon divergence maximise likelihood?

Minimising the KL divergence between your model distribution and the true data distribution is equivalent to maximising the (log-) likelihood. In machine learning, we often want to create a model ...
0
votes
0answers
32 views

Are there alternatives like KL divergence between continuous and discrete dist?

With KL divergence, I found it's impossible to see Is it possible to apply KL divergence between discrete and continuous distribution? . But I wanted to indicate using KL divergence, for example, ...
1
vote
0answers
45 views

skew G-Jensen-Shannon divergence between multivariate gaussian calculation discrepancy

I'm trying to calculate the Jensen-Shannon divergence between two multivariate Gaussians. I found a closed-form expression both for the KL divergence and JS divergence between two Gaussians in this ...
0
votes
0answers
15 views

Difference of mutual informations / Kullback-Leibler divergences for dependent arbitrary- and Gaussian random variables with similar second moments

Let $(Y_1, Y_2)$ be arbitrarily jointly distributed random variables, and let $(Y_{1,G}, Y_{1,G})$ be jointly distributed Gaussian random variables with the same mean and second moments as those of $(...
2
votes
1answer
46 views

On a mistake computing the Kullback Liebler Information Criterion

THE FRAMEWORK: Let $X_1$ be an observation from a normal random variable with mean zero and variance $\sigma^2$ and lets call the PDF $f(x)$. I want to minimize the Kullback Liebler Information ...
0
votes
0answers
58 views

Bounding the KL divergence of a non-invertible transform of distributions

Let $p$ and $q$ be the distributions of random variables $x_1$ and $x_2$, and consider $p'$ and $q'$ to be the distributions of $g(x_1)$ and $g(x_2)$. For an invertible function $g$, it's true that ...
0
votes
0answers
10 views

What should the form of error be on CrossEntropy or KL-divergence loss function across samples of distributions?

Suppose your model produces (discrete) probability distributions and you have some truth distributions you want to compare to. For each sample $i$, you can compute the loss as the KL divergence or ...
0
votes
0answers
30 views

When do these two definitions of KL-divergence match?

Suppose $P$ and $Q$ are two distributions on a space ${\cal H}$ (could be a subset of an infinite dimensional function space) with p.d.fs denoted by the same letter then one can define the $KL$ ...
0
votes
1answer
101 views
0
votes
1answer
88 views

Total Variation Distance Uniform Distribution

Hello I am trying to solve the following but the answer is wrong and I cant seem to see my mistake. Question : Find the total variation distance between P = Unif([0,s]) and Q = Unif([0,t]) where 0 ...
1
vote
0answers
99 views

Relationship between KL divergence, JS divergence, and MMD?

What kind of relationship is there between the KL (Kullback-Leibler) divergence, JS (Jensen-Shannon) divergence, and MMD (maximum mean discrepancy)? I know that they all share a global minimum at $P=...
3
votes
1answer
2k views

KL Divergence loss in variational autoencoders

I was studying VAEs and came accross the Loss function that consists of KL Divergence. I wanted to intuitively make sense of the KL divergence part of the loss function. It would be great if somebody ...
0
votes
1answer
881 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, ...
1
vote
2answers
310 views

KL-Divergence and the chain rule

I was trying to understand the mathematical proof of KL-Divergence when using the chain rule: $D(p(y|x)||q(y|x)) = D(p(x)||q(x)) + D(p(y|x)||q(y|x))$ And I'm a bit lost in the last step (https://www....
0
votes
1answer
54 views

Expectation of multivariate gaussian w.r.t. other multivariate gaussian

I want to calculate the Kullbach Leibler Divergence of two multivariate Gaussians as in KL divergence between two multivariate Gaussians. At one point one has to solve the following expression (...
1
vote
0answers
156 views

KL divergence between sample and true (multivariate normal) distribution

I was wondering, whether there is a possible interpretation of the KL-Divergence between sample and true distribution in terms of probabilities. E.g. given $P=\mathcal{N}\left(\mu,\Sigma\right)$ and $...
9
votes
1answer
177 views

Why does the Bayesian posterior concentrate around the minimiser of KL divergence?

Consider the Bayesian posterior $\theta\mid X$. Asymptotically, its maximum occurs at the MLE estimate $\hat \theta$, which just maximizes the likelihood $\operatorname{argmin}_\theta\, f_\theta(X)$. ...
1
vote
0answers
20 views

What scenario corresponds to choosing the “true distribution” $p$ in $\textsf{KL}(p\parallel q)$?

I understand that when you think about changing $q$ in the Kullback-Leibler divergence $\textsf{KL}(p\parallel q)$, this corresponds to trying to find the distribution that minimizes information loss ...
0
votes
0answers
113 views

rewriting ELBO to highlight the role of priors

I am reading this paper which rewrites ELBO. I am stuck in verifying the mathematics used for doing the rewriting. Essentially, the paper writes the KL term involved in ELBO as follows (equations 13 ...
1
vote
0answers
204 views

cont. KL divergence in python

...
1
vote
0answers
208 views

compute the KL divergence between two datasets

I have two datasets $D1$ and $D2$ in two different feature spaces $\mathcal{X}_{1} \in \Re^{m}$ and $\mathcal{X}_{2} \in \Re^{n}$. Further assume that the datasets have different number of data points....
4
votes
1answer
93 views

KL divergence of models with both continuous and discrete variables

When $x$ is discrete, KL divergence is $D_{KL}(P||Q)=\sum\limits_{x}P(x)\log \frac{P(x)}{Q(x)}$, when $x$ is continuous, $D_{KL}(P||Q)=\int\limits_{x}p(x)\log \frac{p(x)}{q(x)}dx$. However, when the ...