docs(v2.0.0-alpha.6): convert all inline $...$ to :math: role in v2 RST pages

RST does not parse dollar-math (the dollarmath MyST extension applies
only to .md files), so every inline LaTeX expression was rendered as
raw text on Read the Docs — with backslashes silently stripped by the
RST escape mechanism (e.g. \bar s shown as 'bar s', \mathbb{E} shown
as 'mathbb{E}'). The eight v2.0 algorithm pages now use the proper
:math: role for inline math (224 expressions converted), so MathJax
renders every symbol correctly.

Affected pages: bsde, pde, stochastic_control, quadratic_impact_control,
mckean_vlasov, agent_based, robust_drift, generative_calibration_hooks.
This commit is contained in:
ThotDjehuty
2026-05-12 17:10:06 +02:00
parent 73ec6c02cb
commit ece0b31d9e
8 changed files with 143 additions and 143 deletions
+17 -17
View File
@@ -10,53 +10,53 @@ update rule
\qquad \bar s^k \;=\; \frac1N \sum_{j=1}^N s^k_j,
\qquad \xi^k_i \sim \mathcal{N}(0, \sigma^2),
with $\alpha \in (0, 1]$ the *averaging weight* and $\sigma$ the noise scale. This is the
with :math:`\alpha \in (0, 1]` the *averaging weight* and :math:`\sigma` the noise scale. This is the
DeGrootFriedkinJohnsen baseline of opinion dynamics, and the *complete-graph* limit of the
HegselmannKrause and Vicsek flocking models.
Mathematical background
-----------------------
**Mean conservation.** Averaging the update over $i$ gives
$\bar s^{k+1} = \bar s^k + \bar\xi^k$ with $\mathbb{E}[\bar\xi^k] = 0$, so the empirical mean
**Mean conservation.** Averaging the update over :math:`i` gives
:math:`\bar s^{k+1} = \bar s^k + \bar\xi^k` with :math:`\mathbb{E}[\bar\xi^k] = 0`, so the empirical mean
is a *martingale* and is exactly preserved in expectation:
.. math::
\mathbb{E}[\bar s^k] \;=\; \bar s^0 \quad \text{for all } k \ge 0.
In the noiseless case $\sigma = 0$ the mean is preserved *path-by-path*.
In the noiseless case :math:`\sigma = 0` the mean is preserved *path-by-path*.
**Geometric contraction of the spread.** Define the deviation $d^k_i := s^k_i - \bar s^k$.
**Geometric contraction of the spread.** Define the deviation :math:`d^k_i := s^k_i - \bar s^k`.
The update implies
.. math::
d^{k+1}_i \;=\; (1 - \alpha)\, d^k_i \;+\; \bigl(\xi^k_i - \bar\xi^k\bigr) ,
so in the absence of noise $\| d^k \|_\infty \le (1 - \alpha)^k \| d^0 \|_\infty$ — the spread
*contracts geometrically* with rate $1 - \alpha$. The companion notebook plots
$\max_i s^k_i - \min_i s^k_i$ on a log scale across $\alpha \in \{0.05, \dots, 1\}$ and
so in the absence of noise :math:`\| d^k \|_\infty \le (1 - \alpha)^k \| d^0 \|_\infty` — the spread
*contracts geometrically* with rate :math:`1 - \alpha`. The companion notebook plots
:math:`\max_i s^k_i - \min_i s^k_i` on a log scale across :math:`\alpha \in \{0.05, \dots, 1\}` and
recovers exactly this slope.
**Stationary variance with noise.** Treating the deviation as an AR(1) process with input
variance $\sigma^2 (1 - 1/N)$, the steady-state variance of any single agent's deviation is
variance :math:`\sigma^2 (1 - 1/N)`, the steady-state variance of any single agent's deviation is
.. math::
\mathrm{Var}_\infty(d_i) \;=\; \frac{\sigma^2 (1 - 1/N)}{1 - (1 - \alpha)^2}
\;\xrightarrow[\alpha \to 0]{}\; \frac{\sigma^2}{2\alpha}\,(1 - 1/N).
**Continuous-time limit (linear Vlasov).** Sending $\alpha = \theta\, \Delta t$,
$\xi^k_i = \sigma \sqrt{\Delta t}\, W^i_k$ and $\Delta t \to 0$ recovers the McKeanVlasov SDE
$dX^i_t = \theta(\bar X_t - X^i_t)\, dt + \sigma\, dW^i_t$ of :doc:`mckean_vlasov` — the
**Continuous-time limit (linear Vlasov).** Sending :math:`\alpha = \theta\, \Delta t`,
:math:`\xi^k_i = \sigma \sqrt{\Delta t}\, W^i_k` and :math:`\Delta t \to 0` recovers the McKeanVlasov SDE
:math:`dX^i_t = \theta(\bar X_t - X^i_t)\, dt + \sigma\, dW^i_t` of :doc:`mckean_vlasov` — the
discrete consensus update is the prototype of mean-field interaction.
**Spectral interpretation.** On a general weighted graph the update reads
$s^{k+1} = (I - \alpha L)\, s^k + \xi^k$, where $L$ is the normalised Laplacian. The
complete-graph case shipped here has $L = I - \tfrac1N \mathbf{1}\mathbf{1}^\top$ with
eigenvalue $1$ on the orthogonal complement of $\mathbf{1}$, hence the contraction rate
$1 - \alpha$ above. Replacing $\mathbf{1}\mathbf{1}^\top / N$ by an arbitrary stochastic
:math:`s^{k+1} = (I - \alpha L)\, s^k + \xi^k`, where :math:`L` is the normalised Laplacian. The
complete-graph case shipped here has :math:`L = I - \tfrac1N \mathbf{1}\mathbf{1}^\top` with
eigenvalue :math:`1` on the orthogonal complement of :math:`\mathbf{1}`, hence the contraction rate
:math:`1 - \alpha` above. Replacing :math:`\mathbf{1}\mathbf{1}^\top / N` by an arbitrary stochastic
matrix produces the full DeGroot model and is a one-liner extension on the Rust side.
Why it matters
@@ -66,7 +66,7 @@ Why it matters
(Bayesian persuasion, social media echo chambers, voting-system stability).
* **Distributed estimation & federated learning.** Average-consensus protocols for sensor
networks, gossip algorithms, federated averaging — all reduce to the same contraction
argument with explicit convergence rate $1 - \alpha$.
argument with explicit convergence rate :math:`1 - \alpha`.
* **Coupled-oscillator physics.** Linear approximation of the Kuramoto / Vicsek models near
the synchronised regime; direct comparison with the McKeanVlasov continuous limit.