# Artificial Neural Networks β€” Methods, Equations and Graphical Representations **A complete, self-contained book on neural networks β€” every method presented with rigorous equations, an estimation algorithm in pseudocode, and a native TikZ figure.** *Simon-Pierre Boucher* Β· [contact@spboucher.ai](mailto:contact@spboucher.ai) --- ## πŸ“– About This repository contains the full LaTeX source and compiled PDF of a 119-page book covering **all major families of artificial neural networks**, from Rosenblatt's perceptron (1958) to Kolmogorov–Arnold networks (2024). The book is built on one strict organizing principle: > **Every architecture = rigorous equations + estimation/training algorithm + faithful graphical representation.** Every single figure is drawn natively in **TikZ/pgfplots** β€” no imported images β€” so each diagram is exactly as precise as the equations it illustrates. Notation is unified across all chapters (bold lowercase vectors, bold uppercase matrices, Hadamard product `βŠ™`, shared color palette for inputs/hidden/output/gates/memory). ## πŸ“Š At a glance | Metric | Count | |---|---:| | Pages | 119 | | Chapters | 13 (in 5 parts) | | Numbered equations | 256 | | Native TikZ/pgfplots figures | 42 | | Estimation algorithms (pseudocode) | 26 | | Comparison tables | 7 | | Bibliography entries (all cited) | 36 | ## πŸ—‚ Contents ### Part I β€” Foundations and Learning 1. **Foundations of Neural Networks** β€” artificial neuron, perceptron (Novikoff convergence theorem + learning algorithm), activation functions with derivatives, softmax, MLP, universal approximation theorem, XOR geometry, RBF contrast. 2. **Training Neural Networks** β€” empirical risk, MSE/cross-entropy, the softmax+CE gradient, the three backpropagation equations (with computational-graph figure and full pseudocode), SGD/Momentum/Nesterov/AdaGrad/RMSProp/**Adam** with bias correction, learning-rate schedules, Xavier/He initialization. 3. **Regularization** β€” bias–variance decomposition, L2/L1, inverted dropout, Batch & Layer Normalization, early stopping, label smoothing, gradient clipping. ### Part II β€” Core Architectures 4. **Convolutional Neural Networks** β€” convolution with stride/padding (worked 5Γ—5 βŠ› 3Γ—3 grid figure), pooling, canonical architecture, **ResNet** residual block and its gradient, receptive fields, conv forward-pass algorithm. 5. **Recurrent Networks: RNN, LSTM and GRU** β€” folded/unfolded views, BPTT (Jacobian products, vanishing/exploding gradients, algorithm), the six **LSTM** equations with a detailed cell diagram, GRU, bidirectional RNNs, seq2seq. 6. **Attention and Transformers** β€” scaled dot-product attention with the 1/√d_k variance argument, multi-head attention, sinusoidal positional encoding, Add&Norm/FFN/causal masking, full **encoder–decoder architecture figure**, greedy decoding algorithm, BERT/GPT/T5. 7. **Modern Transformer Variants** β€” **Vision Transformer** (patches, [CLS], training algorithm), **Mixture of Experts** (noisy top-k routing, load balancing), efficient/linear attention, **state-space models and Mamba** (ZOH discretization, selective scan), scaling laws. ### Part III β€” Graphs, Energy and Memory 8. **Graph Neural Networks** β€” message-passing framework, **GCN** (spectral derivation), **GraphSAGE** (minibatch estimation algorithm), **GAT**, **GIN** with the 1-WL expressiveness theorem, task heads. 9. **Energy-Based and Associative-Memory Networks** β€” **Hopfield** networks (energy descent theorem, capacity, recall algorithm), modern Hopfield β‰ˆ attention, **Boltzmann machines**, **RBM** with **contrastive divergence (CD-k)**, deep belief networks with greedy layer-wise pretraining. ### Part IV β€” Generative Models 10. **Autoencoders, VAEs and GANs** β€” hourglass autoencoder, **VAE** (ELBO with reconstruction/regularization decomposition, closed-form Gaussian KL, reparameterization trick, training algorithm), **GAN** (minimax game, optimal discriminator, Jensen–Shannon link, non-saturating loss, WGAN, alternating training algorithm), VAE/GAN/autoregressive comparison table. 11. **Normalizing Flows, Diffusion and Autoregressive Models** β€” change of variables, RealNVP coupling layers, **DDPM** (forward/reverse processes, variational bound, Ξ΅-parameterization, training *and* sampling algorithms), DDIM, classifier-free guidance, **WaveNet** dilated causal convolutions, energy-based models. ### Part V β€” Specialized and Emerging Architectures 12. **Biologically Inspired Networks** β€” **spiking neurons** (LIF dynamics, f–I curve, STDP window, surrogate gradients), **self-organizing maps** (BMU, neighborhood kernel, training loop), **reservoir computing / echo state networks** (echo-state property, ridge readout). 13. **Emerging Architectures** β€” **capsule networks** (dynamic routing-by-agreement), **Neural ODEs** (adjoint method), **Neural Turing Machines** (full addressing pipeline), **Kolmogorov–Arnold networks** (superposition theorem, learnable edge functions). ## πŸ”§ Building from source Requires a full TeX Live installation (pgf/pgfplots, `babel-english`, `algorithm`/`algpseudocode`, `booktabs`, `microtype`, `hyperref`). ```bash cd these # repository root pdflatex -interaction=nonstopmode main.tex pdflatex -interaction=nonstopmode main.tex # resolve TOC + cross-references pdflatex -interaction=nonstopmode main.tex # settle part/page numbers ``` The build is clean by construction: **zero errors, zero undefined references, zero unresolved citations**. ## πŸ“ Repository layout ``` . β”œβ”€β”€ README.md β”œβ”€β”€ CLAUDE.md # executable build specification of the book β”œβ”€β”€ main.pdf # compiled book (119 pages) β”œβ”€β”€ main.tex # preamble, cover, preface, abstract, TOC, bibliography └── chapters/ β”œβ”€β”€ 01-foundations.tex β”œβ”€β”€ 02-training.tex β”œβ”€β”€ 03-regularization.tex β”œβ”€β”€ 04-cnn.tex β”œβ”€β”€ 05-rnn.tex β”œβ”€β”€ 06-attention.tex β”œβ”€β”€ 07-modern-transformers.tex β”œβ”€β”€ 08-gnn.tex β”œβ”€β”€ 09-energy.tex β”œβ”€β”€ 10-generative.tex β”œβ”€β”€ 11-advanced-generative.tex β”œβ”€β”€ 12-bio-inspired.tex └── 13-emerging.tex ``` All global TikZ styles, the named color palette, notation macros and theorem environments are defined once in `main.tex` and reused by every chapter β€” guaranteeing visual and mathematical consistency across the whole book. ## ✍️ Author **Simon-Pierre Boucher** πŸ“§ [contact@spboucher.ai](mailto:contact@spboucher.ai) ## πŸ“œ License Β© 2026 Simon-Pierre Boucher. All rights reserved. The source is published for reading and personal study; please contact the author for any other use.