Skip to content

Commit

Permalink
weird redundant formulation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludwig Winkler committed Dec 9, 2024
1 parent 2e895ab commit 64b3fc7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 20 deletions.
19 changes: 8 additions & 11 deletions _site/blog/FlowMatching/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,28 +272,25 @@ <h3 id="the-score-in-flow-matching">The Score in Flow Matching</h3>
<h4 id="characteristic-functions">Characteristic Functions</h4>

<p>What we’re aiming for is to determine the score term $\nabla_x \log p_\tau(x_t)$ from the stochastic process that connects the two random variables $x_0$ and $\epsilon$.
But the random variable $x_t$ during simpling is the sum of two unknown random variables $x_0$ and $\epsilon$, namely via $x_t = \alpha(t) x_0 + \beta(t) \epsilon$.
This is the sum of two random variables.</p>
But the random variable $x_t$ during sampling is the sum of two random variables $x_0$ and $\epsilon$, namely via $x_t = \alpha(t) x_0 + \beta(t) \epsilon$.
The probability distribution of the sum of two random variables is the convolution of the respective probability density functions.</p>

<p>The probability distribution of the sum of two random variables is the convolution of the probability density functions of the two respective random variables.
So in our case we have the sum of two independent weighted random variables $\alpha(t) x_0$ and $\beta(t)\epsilon$.
For the time being we will first consider the sum of two independent random variables $x_0$ and $\epsilon$ without their respective scaling.</p>

<p>Considering only $Z = X + Y$ the PDF of $Y$ is then the convolution of the PDFs of $X$ and $Y$:</p>
<p>To ease into the topic, we will for starters only consider $Z = X + Y$, where the PDF of $Z$ is consequentially the convolution of the PDFs of $X$ and $Y$:</p>
<div style="overflow-x: auto;">
$$
\begin{align*}
p(z) &amp;= p(x) \star p(y) \\
&amp;= \int_{x=-\infty}^{\infty} p(x) \ \cdot \ p(z - x) \ dx \\
&amp;= \int_{x=-\infty}^{\infty} p(x) \ \cdot \ p(z - x) \ dx
% &amp;= \hat{p}_{x_0}(k) \cdot \hat{p}_\epsilon(k) \\
\end{align*}
$$
</div>

<p>which is a bit difficult to work with.</p>
<p>That doesn’t seem to be the most equation to be working with.</p>

<p>Also, why is actually the convolution of the two PDF’s?</p>

<p>Also, why is actually the convolution of the two PDF’s?
In the case of the sum of $X$ and $Y$ we have to consider all possible values of $X$ and $Y$ that sum up to $Z$.
<p>In the case of the sum of $X$ and $Y$ we have to consider all possible values of $X$ and $Y$ that sum up to $Z$.
For example, let’s consider the probability of obtaining $Z=5$.
We can then first choose $X$ and choose $Y$ as the remainder such that $Y = Z-X$.
In order to get $Z=5$ we need to consider the joint probability of all permissible combinations of $X$ and $Y$, so for example $X=2$ and $Y=3$, or $X=3$ and $Y=2$, or $X=4$ and $Y=1$ or $X=-1000$ and $Y=995$.
Expand Down
Binary file modified _site/blog/FlowMatching/sample_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _site/blog/FlowMatching/trained_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blog/FlowMatching/.DS_Store
Binary file not shown.
Binary file modified blog/FlowMatching/sample_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/FlowMatching/trained_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions blogposts/_posts/2024-12-08-FlowMatching.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,24 @@ In order to derive the score term $\nabla_x \log p_\tau(x_\tau)$ we have to do a
#### Characteristic Functions

What we're aiming for is to determine the score term $\nabla_x \log p_\tau(x_t)$ from the stochastic process that connects the two random variables $x_0$ and $\epsilon$.
But the random variable $x_t$ during simpling is the sum of two unknown random variables $x_0$ and $\epsilon$, namely via $x_t = \alpha(t) x_0 + \beta(t) \epsilon$.
This is the sum of two random variables.
But the random variable $x_t$ during sampling is the sum of two random variables $x_0$ and $\epsilon$, namely via $x_t = \alpha(t) x_0 + \beta(t) \epsilon$.
The probability distribution of the sum of two random variables is the convolution of the respective probability density functions.

The probability distribution of the sum of two random variables is the convolution of the probability density functions of the two respective random variables.
So in our case we have the sum of two independent weighted random variables $\alpha(t) x_0$ and $\beta(t)\epsilon$.
For the time being we will first consider the sum of two independent random variables $x_0$ and $\epsilon$ without their respective scaling.

Considering only $Z = X + Y$ the PDF of $Y$ is then the convolution of the PDFs of $X$ and $Y$:
To ease into the topic, we will for starters only consider $Z = X + Y$, where the PDF of $Z$ is consequentially the convolution of the PDFs of $X$ and $Y$:
<div style="overflow-x: auto;">
$$
\begin{align*}
p(z) &= p(x) \star p(y) \\
&= \int_{x=-\infty}^{\infty} p(x) \ \cdot \ p(z - x) \ dx \\
&= \int_{x=-\infty}^{\infty} p(x) \ \cdot \ p(z - x) \ dx
% &= \hat{p}_{x_0}(k) \cdot \hat{p}_\epsilon(k) \\
\end{align*}
$$
</div>

which is a bit difficult to work with.
That doesn't seem to be the most equation to be working with.

Also, why is actually the convolution of the two PDF's?

In the case of the sum of $X$ and $Y$ we have to consider all possible values of $X$ and $Y$ that sum up to $Z$.
For example, let's consider the probability of obtaining $Z=5$.
We can then first choose $X$ and choose $Y$ as the remainder such that $Y = Z-X$.
Expand Down

0 comments on commit 64b3fc7

Please sign in to comment.