Neural Networks 1002
← Back to Academy homepage

Free course · 16 hands-on notebooks · no GPU needed

Neural Networks 1002

The advanced sequel to Neural Networks 1001: how language models are aligned and fine-tuned, how images, sound and speech are generated, how graphs, physics and uncertainty are handled, how to explain and audit a model, and how agents and generalist models fit together. Every idea is measured on a laptop CPU, with honest baselines and honest negative results.

  • 16modules
  • ~32 hof study
  • 0GPUs or API keys
  • 100%runnable code

Current topics, toy-sized

Alignment, diffusion, state space models, speech and agents are built at a scale a CPU can train, so every mechanism is visible, then compared with a real pre-trained model where one is small enough to run.

Measured, not asserted

Each claim is backed by a number computed in the notebook, with fixed seeds and a baseline. Where the fashionable method does not win, the notebook says so.

Responsible by design

Interpretability, uncertainty, fairness, privacy and safety are modules of their own, with measurements, not a closing paragraph.

Syllabus

Six parts, 16 modules: adapting and aligning models, representations and generation, other architectures and science, reliable and responsible AI, systems and the horizon, and a closing case study in wind energy. Each module is one notebook: read the explanations, run the cells, then try the exercises at the end. Your progress is remembered in this browser.

Part 1

Adapting and aligning models

Post-training with preferences, open checkpoints and fine-tuning, and the cost of architectures and training at scale.

Part 2

Representations and generation

Learning without labels, and generating images, audio, video and speech.

Part 3

Other architectures and science

Networks for graphs, and networks that respect physics.

Part 4

Reliable and responsible AI

Explaining a model, knowing how sure it is, keeping it fair, private and safe, and fixing the data.

10New

Interpretability and Explainability: What Is the Model Doing?

Every explanation method is measured: SHAP, LIME, integrated gradients and Grad-CAM with sanity checks, planted shortcuts, probes, induction heads and sparse autoencoders.

  • feature attribution
  • Shapley values
  • Grad-CAM
  • sanity checks
  • probes
  • activation patching
  • sparse autoencoders
⏱ ~120 min💻 runs in 10 min on a CPU
11New

Uncertainty, Calibration and Robustness

How sure is the model? Calibration and temperature scaling, ensembles, MC dropout, conformal prediction, distribution shift and adversarial examples with their cost.

  • calibration (ECE)
  • deep ensembles
  • conformal prediction
  • OOD detection
  • FGSM & PGD
  • adversarial training
⏱ ~120 min💻 runs in 10 min on a CPU
12New

Responsible AI: Fairness, Privacy and Safety

Measure what can go wrong: group fairness metrics and mitigation on census data, membership inference and DP-SGD, red teaming, text watermarking, model cards and energy.

  • fairness metrics
  • membership inference
  • differential privacy
  • red teaming
  • model cards
  • EU AI Act
⏱ ~120 min💻 runs in 20 min on a CPU
13New

Data-Centric AI: Better Data, Better Models

Hold the model fixed and fix the data: label noise, confident learning, leakage and duplicates, learning curves, data valuation, active learning and weak supervision.

  • label noise
  • confident learning
  • leakage
  • active learning
  • weak supervision
  • data monitoring
⏱ ~120 min💻 runs in 8 min on a CPU
Part 5

Systems and the horizon

Agents that use tools, and generalist models on the road to AGI.

Part 6

Capstone

What actually worked on real wind-energy problems, and what did not.

Run it yourself

Each lesson page shows the notebook with its saved outputs, so you can read the whole course in the browser. To experiment, download a notebook or open it in Google Colab from the lesson page, or clone the repository and run everything locally:

git clone https://github.com/fborbon/academy.git
cd academy/neural-networks-1002
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
jupyter lab

The requirements file marks the heavier optional libraries. Several modules download small pre-trained models once (from a few megabytes to a few gigabytes) and cache them; each notebook says what it will download before it does.

What you need

  • Neural Networks 1001 or equivalent: neurons, backpropagation, training well, convolutions, the transformer and a GPT. Each notebook lists the 1001 modules it builds on, with links.
  • Python: comfortable with PyTorch tensors and a training loop (the AI frameworks module of our free Python course covers them).
  • Hardware: any laptop from the last decade; everything runs on a CPU. The heaviest notebooks take 15 to 30 minutes, and a few downloads need free disk space and a connection.

Data and credits

  • Most notebooks use data generated in the notebook or bundled with scikit-learn (the UCI handwritten digits, Alpaydin and Kaynak, CC BY 4.0). Others use small open datasets, each credited and licensed where it is used: MUTAG molecules, UCI Adult, Banking77, the Free Spoken Digit Dataset, LibriSpeech samples and open wind-farm data.
  • Some pre-trained models carry non-commercial or gated licences (for example MusicGen weights, CC BY-NC 4.0). The notebooks say so next to each model, and the open-models module teaches how to read a licence before building on a checkpoint.
  • Module 16 bundles five Spanish notebooks on real wind-energy data; some of that data is licensed for non-commercial use only, as the module explains.

Further reading

  • Ouyang et al., Training language models to follow instructions with human feedback (2022) · Rafailov et al., Direct Preference Optimization (2023)
  • Hu et al., LoRA (2021) · Dao et al., FlashAttention (2022) · Gu and Dao, Mamba (2023)
  • Kingma and Welling, Auto-Encoding Variational Bayes (2013) · Ho et al., Denoising Diffusion Probabilistic Models (2020) · Radford et al., CLIP (2021)
  • Raissi et al., Physics-informed neural networks (2019) · Kipf and Welling, Graph Convolutional Networks (2017)
  • Guo et al., On Calibration of Modern Neural Networks (2017) · Lundberg and Lee, SHAP (2017)
  • Yao et al., ReAct (2022)