---
categories: [literature note, Bayesian inference, Approximate Bayesian Computation, abc, tutorial]
title: Note de lecture de *A tutorial on approximate Bayesian computation* de
Brandon M. Turner, Trisha Van Zandt.
bibliography: ../these_ref.bib
---
::: {.callout-note title="Synthèse"}
**Contribution**:: Un tutoriel clair se voulant simple et basique sur différents algorithmes pour l'ABC. Point de vue de la psycho et quelques exemples jouets simples mais intéressants.
**Related**::
:::
::: {.callout-note title="Markdown"}
**FirstAuthor**:: Turner, Brandon M.
**Author**:: Van Zandt, Trisha
**Title**:: A tutorial on approximate Bayesian computation
**Year**:: 2012
**Citekey**:: turnerTutorialApproximateBayesian2012
**itemType**:: journalArticle
**Journal**:: *Journal of Mathematical Psychology*
**Volume**:: 56
**Issue**:: 2
**Pages**:: 69-85
**DOI**:: 10.1016/j.jmp.2012.02.005
:::
::: {.callout-note title="Pièces-jointes"}
- [PDF](file:///home/louis/snap/zotero-snap/common/Zotero/storage/N4E59NBM/Turner%20et%20Van%20Zandt%20-%202012%20-%20A%20tutorial%20on%20approximate%20Bayesian%20computation.pdf).
:::
::: {.callout-note title="Abstract"}
This tutorial explains the foundation of approximate Bayesian computation (ABC), an approach to Bayesian inference that does not require the specification of a likelihood function, and hence that can be used to estimate posterior distributions of parameters for simulation-based models. We discuss briefly the philosophy of Bayesian inference and then present several algorithms for ABC. We then apply these algorithms in a number of examples. For most of these examples, the posterior distributions are known, and so we can compare the estimated posteriors derived from ABC to the true posteriors and verify that the algorithms recover the true posteriors accurately. We also consider a popular simulation-based model of recognition memory (REM) for which the true posteriors are unknown. We conclude with a number of recommendations for applying ABC methods to solve real-world problems.
::::
# Prise de notes
{{< include local_macros.tex.md >}}
![[local_macros.tex]]
%% begin user_notes %%
## Introduction
La première partie est une explication du point de vue bayésien avec un regard sur les modèles en psychologie cognitive
Les auteurs différencie les modèles "mathématiques" : ont une vraisemblance explicite, des modèles de "simulation" : pas de vraisemblance explicite et génèrent des prédictions en répliquant/modélisant le mécanisme de génération de données
## Approximate Bayesian computation
**Idée principale**: Remplacer un calcul de vraisemblance coûteux (ou impossible?) par des simulations qui produisent un jeu de données artificiel $X$.
Donc on cherche à simuler des jeux de données $X$ qui approchent bien $Y$ notre vrai jeu de données en utilisant diverses valeurs de $\theta^{\star}$ puis en retenant celle qui donnent $\rho(X,Y) \leq \epsilon_{0}$ avec l'idée d'approcher la posterior $\pi(\theta\mid Y)$ par $\pi(\theta\mid \rho(X,Y) \leq \epsilon_{0})$
**Procédure**:
1. Échantillonner $\theta^{\star}$ de la prior $\pi(\theta)$
2. Générer $X$ en utilisant $\theta^{\star}$
3. Comparer $\rho(X,Y)$ à $\epsilon_{0}$
a. Si $\rho(X,Y) \leq \epsilon_{0}$ alors $\theta^{\star}$ est conservé comme valeur probable de la posterior
b. Sinon on fait quelque chose avec $\theta^{\star}$, dans l'acceptation-rejet : on rejette $\theta^{\star}$
Pour faciliter les calculs on remplace $X, Y$ par des statistiques. Si elles sont suffisantes (limitation à la famille exponentielle) très bon remplacement sans perte d'informations.
*Remarque sur Acceptation-Rejet (AR-ABC) :* pour $\epsilon_{0}$ très petit le taux de rejet peut être trop élevé et l'algo très inefficace.
### ABC MCMC
Au lieu de calculer la proba d'acceptation par la vraisemblance, on utilise $\theta^{\star}$ pour générer $X$ et alors la proba d'acceptation est :
$$
\alpha = \begin{cases} \min(1,\frac{\pi(\theta^{\star})q(\theta_{i}\mid \theta^{\star})}{\pi(\theta_{i})q(\theta^{\star}\mid \theta_{i})}) & \text{si } \rho(X,Y)\leq \epsilon_{0} \\
0 & \text{sinon}
\end{cases}
$$
où $q$ est la loi de proposition.
*Remarque* : Si elle est symétrique, les deux termes se compensent et $\alpha$ ne dépend que du prior, de la distance aux données réelles et de $\epsilon_{0}$.
**Limites importantes**:
- Très probable de se retrouver bloquée dans les zones de faibles probas où les $\theta^{\star}$ génèreront des $X$ improbable et donc d'y rester bloqué. Et ainsi *fort taux de rejet*.
- Pas possible de paralléliser une chaîne car dépendance.
### *Particle filtering*, Monte-Carlo séquentiel
**Principe de l'algorithme**:
1. Générer une *pool* de valeurs $\{\theta_{1}, \dots, \theta_{i}, \dots, \theta_{N}\}$ selon $\pi(\theta)$
2. Initialiser les poids de sélection $w_{i} = \frac{1}{N}$
3. Itérer pour $T$ étapes :
a. Tirer $\theta^{*}$ de la *pool* avec les poids $\pmb{w}$
b. Utiliser le noyau de transition *forward*[^1] $q(\theta^{\star\star}|\theta^{\star})$ pour proposer la nouvelle particule $\tss$ dans la génération $t+1$.
c. Mettre à jour $\pmb{w}$
À la fin la *pool* est (on espère) distribuée selon $\pi(\theta\mid Y)$.
#### *Partial Rejection control* : ABC PRC
Il y a besoin de deux noyaux de transition $\qf{.},\qb{.}$ *forward* et *backward*.
On spécifie ici l'étape :
b. $\tss \sim \qf{\theta_{i}}$. Si le $X$ réalisé par $\tss$ est tel que $\rho(X,Y) \leq \epsilon_{0}$ alors $\theta_{i}^{t+1} = \tss$. Sinon on rejette $\tss$ et on itère jusqu'à passer le critère.
Alors le poids de la particule est mis à jour :
$$
w = \frac{\pi(\tss)\qb{\ts}}{\pi(\ts)\qf{\tss}}
$$
Et on répète jusqu'à avoir remplacé nos $N$ particules afin qu'elles satisfassent toutes $\thresh$.
Puis on ré-itère $T$ fois l'opération.
**Avantages**:
- Permet de sortir des régions de faibles probabilités en enlevant les particules.
**Limites**:
- Estimation biaisée de la posterior
Turner. 4/2012. A tutorial on approximate Bayesian computation
%% end user_notes %%
# Notes importées
># Annotations
(15/05/2026 15:20:57)
[Go to annotation](zotero://open-pdf/library/items/N4E59NBM?page=71&annotation=S94A5U7A) « The simplest of these is the ABC rejection sampling algorithm (see Algorithm 1; Beaumont, Zhang, & Balding, 2002; Pritchard et al., 1999). The ABC rejection sampler simply discards the candidate value θ ∗ if it does not meet the criterion ρ(X , Y ) ≤ ε0, as we described above. » ([Turner et Van Zandt, 2012, p. 71](zotero://select/library/items/TR63KKUN))
([Turner et Van Zandt, 2012, p. 73](zotero://select/library/items/TR63KKUN)) Après discussion avec Pierre, il l'interprète comme : la particule ne sera pas rechoisie pour la génération t+1
L'algo ici sélectionne avec les poids des parents et essaie de leur faire produire N descendants. Et on tire avec remise.
[Go to annotation](zotero://open-pdf/library/items/N4E59NBM?page=73&annotation=W6WHYMV6) « If the particle does not pass inspection (if ρ(X , Y ) > ε0), it is discarded » ([Turner et Van Zandt, 2012, p. 73](zotero://select/library/items/TR63KKUN)).
# Annotations importées
%% begin annotations %%
### Imported: 2026-05-13 2:05 pm
Quote
> The simplest of these is the ABC rejection sampling algorithm (see Algorithm 1; Beaumont, Zhang, & Balding, 2002; Pritchard et al., 1999). The ABC rejection sampler simply discards the candidate value θ ∗ if it does not meet the criterion ρ(X , Y ) ≤ ε0, as we described above.
### Imported: 2026-05-13 5:32 pm
Quote
> The simplest of these is the ABC rejection sampling algorithm (see Algorithm 1; Beaumont, Zhang, & Balding, 2002; Pritchard et al., 1999). The ABC rejection sampler simply discards the candidate value θ ∗ if it does not meet the criterion ρ(X , Y ) ≤ ε0, as we described above.
### Imported: 2026-05-13 5:35 pm
Quote
> If the particle does not pass inspection (if ρ(X , Y ) > ε0), it is discarded
### Imported: 2026-05-13 5:42 pm
Quote
> If the particle does not pass inspection (if ρ(X , Y ) > ε0), it is discarded
%% end annotations %%
%% Import Date: 2026-05-19T16:17:33.172+02:00 %%