flowchart LR
I["Entree
(784 dim)"]
subgraph Encoder ["Encodeur"]
E1["Dense 256"]
E2["Dense 64"]
end
L["Latent Space
(16 dim)"]
subgraph Decoder ["Decodeur"]
D1["Dense 64"]
D2["Dense 256"]
end
O["Sortie
(784 dim)"]
I --> E1 --> E2 --> L --> D1 --> D2 --> O
style L fill:#F7E64D,color:#1A1A1A
flowchart TD
X["x (entree)"]
Z["z = encode(x)
(comprime)"]
X_hat["x^ = decode(z)
(reconstruit)"]
L["Loss = ||x - x^||"]
X --> Z --> X_hat --> L
style Z fill:#9B7AC4,color:#FFFFFF
style L fill:#F7E64D,color:#1A1A1A
- Donnees normales: Bien reconstruites (faible erreur)
- Anomalies: Mal reconstruites (forte erreur)
$x = [\textcolor{#3498db}{100}, \textcolor{#e67e22}{45}, \textcolor{#27ae60}{12}, \textcolor{#9B7AC4}{3.5}]$
(montant, heure, age compte, nb transactions)
$z = \text{encode}(x) = [\textcolor{#F7E64D}{2.3}, \textcolor{#F7E64D}{-0.8}]$ (2 dimensions)
$\hat{x} = \text{decode}(z) = [\textcolor{#3498db}{98}, \textcolor{#e67e22}{44}, \textcolor{#27ae60}{13}, \textcolor{#9B7AC4}{3.6}]$
$\text{Erreur} = ||x - \hat{x}||^2 = (\textcolor{#3498db}{100-98})^2 + (\textcolor{#e67e22}{45-44})^2 + (\textcolor{#27ae60}{12-13})^2 + (\textcolor{#9B7AC4}{3.5-3.6})^2$
$\text{Erreur} = \textcolor{#3498db}{4} + \textcolor{#e67e22}{1} + \textcolor{#27ae60}{1} + \textcolor{#9B7AC4}{0.01} = \textcolor{#27ae60}{\mathbf{6.01}}$ (faible β normal)
$x_{fraude} = [5000, 3, 1, 0.1]$ β Erreur = $\textcolor{#e74c3c}{\mathbf{2500}}$ (elevee β anomalie!)
- $\textcolor{#3498db}{Bleu}$: Montant de transaction
- $\textcolor{#e67e22}{Orange}$: Heure de transaction
- $\textcolor{#27ae60}{Vert}$: Age du compte / faible erreur (normal)
- $\textcolor{#9B7AC4}{Violet}$: Nombre de transactions
- $\textcolor{#F7E64D}{Jaune}$: Espace latent (z)
- $\textcolor{#e74c3c}{Rouge}$: Erreur elevee (anomalie)