MeasureBase.jl icon indicating copy to clipboard operation
MeasureBase.jl copied to clipboard

Pushforwards from Lebesgue-dominated measures

Open cscherrer opened this issue 1 year ago • 1 comments

Say we have spaces $A$ and $B$, a function $f:A \to B$, and a measure $\mu \in \mathcal{M}(A)$. Choose a point $x ∈ A$, and $y = f(x) ∈ B$.

Given the pushforward $\nu = f_*(\mu) \in \mathcal{M}(B)$ and some other $β ∈ \mathcal{M}(B)$, our goal is to compute $\frac{d\nu}{d\beta}(y)$.

I was talking about this with @mschauer, who pointed out that it's the same problem as knowing whether $f$ is differentiable. We just don't have the semantics to express this.

This comparison got me thinking, maybe we can specialize for the differentiable case. In the most common case, we can express each of $\beta$ and $\nu$ as a density over a (restricted) Lebesgue pushforward.


Ok, so let's start over, and work in these terms directly. Variable names from this point have no relation to the ones above.

Let's use $\lambda$ for Lebesgue measure on $\mathbb{R}$. Let $f:\mathbb{R}^n → A$ and $g:\mathbb{R}^n → B$ be partial functions (so limited domain is ok) that are also differentiable embeddings, and say we have pushforwards

$$ \begin{aligned} \alpha &= f_* (\lambda^n) \ \beta &= g_* (\lambda^n) \end{aligned} $$

In practice, what we really have might not be represented as just a pushforward - there might also be a density on top of it. But let's solve this case first.

Ok, so maybe we have a point $z ∈ A∩ B$ and want to compute $\frac{d\alpha}{d\beta}(z)$. Because $\alpha$ and $\beta$ both come from smooth maps from Lebesgue measure, this density is well-defined whenever the tangent spaces of these two pushforward have have the same span. If not, we have singular measure, and we'll end up with NaN, -Inf, or Inf.

Let's put that case off for now, and assume the tangent spaces do match. Let $x_0 = f^{-1}(z)$, and $y_0 = g^{-1}(z)$. The linear approximations are

$$ \begin{aligned} f(x) &= J_f(x_0)(x-x_0) + o(|x-x_0|) \ g(y) &= J_g(y_0)(y-y_0) + o(|y-y_0|) \ \end{aligned} $$

Since $f(x) = z=g(y)$, we can solve for $y$ to get

$$ \begin{aligned} y &= J_g(y_0)^{-1}\left[z + o(|y - y_0|)\right] + y_0 \ &= J_g(y_0)^{-1}\left[J_f(x_0)(x-x_0) + o(|x-x_0|) + o(|y - y_0|)\right] + y_0 \ &≈ J_g(y_0)^{-1}J_f(x_0)(x-x_0) + y_0 \end{aligned} $$


Anyway, I hope you can see where this is going. All we really need to do in practice is work in terms of $(g^{-1} ∘ f)$. Things work out because Lebesgue measure is translation-invariant. For cases where we have not just a Lebsegue pushforward but a density on top of that, we'll need some extra steps. But I think it's still not too bad.

cscherrer avatar Sep 17 '22 22:09 cscherrer