ScratchMind is a collection of open-source deep learning projects focused on rebuilding modern AI from scratch using PyTorch, following the historical evolution of ideas across vision, generative modeling, optimization, reinforcement learning, and more.
Every component is implemented manually — no shortcuts, no hidden abstractions — making ScratchMind a complete ecosystem for mastering deep learning through first-principles engineering.
Documentation live here
To make artificial intelligence transparent, intuitive, and deeply learnable — by rebuilding every foundational idea from the ground up.
ScratchMind is built on the belief that true mastery comes from implementation, not from using pre-built libraries. All models, optimizers, and training techniques are implemented from the mathematical foundations upward.
Everything is implemented from scratch. No “import model,” no shortcuts.
NOTE: Even though right now there will be external dependencies to PyTorch and Scikit-Learn, Eventual GOAL is to be self-sustaining ecosystem.
Each repo follows the chronological development of its domain.
Readable > clever. Minimal > magical. Educational > compressed.
Each Scratch project stands alone, but all follow the same structure, format, and documentation style.
Below are the currently active repositories in the ecosystem.
Each repository includes its own TIMELINE.md describing the learning path and implementation order.
| Project | Description |
|---|---|
| ScratchML | Foundations of machine learning: linear models, classical algorithms, core theory. |
| ScratchGrad | Autograd from scratch: Tensors, Layers, Non-Linearities |
| ScratchVision | Deep learning for images: convolutional networks, visual representation learning. |
| ScratchGen | Generative modeling from scratch: probabilistic models, GANs, flows, diffusion. |
| ScratchOptim | Optimizers from first principles: GD, SGD, Momentum, Adam, and modern variants. |
These repositories will be added as the ecosystem expands:
| Project | Description |
|---|---|
| ScratchSeq | Sequence modeling & language: RNNs, attention, transformers, GPT-style models. |
| ScratchData | Data pipelines, augmentations, loaders, synthetic data. |
| ScratchTrain | Training stability, LR schedules, warmup, mixed-precision, distributed training. |
| ScratchNorm | Normalization layers: BatchNorm, LayerNorm, GroupNorm, RMSNorm. |
| ScratchReg | Regularization methods to improve generalization and robustness. |
| ScratchRL | Reinforcement learning: value-based, policy-based, and actor-critic methods. |
- Build intuition through raw implementation
- Make modern ML concepts transparent and reproducible
- Translate research papers directly into code
- Provide clean, educational references for every major subfield
- Create a long-term ecosystem for “learning by re-building”
Every repository maintains a detailed TIMELINE.md file.
You can explore them:
- ScratchML →
ScratchML/documentation/TIMELINE.md - ScratchVision →
ScratchVision/documentation/TIMELINE.md - ScratchGen →
ScratchGen/documentation/TIMELINE.md - ScratchGrad →
ScratchGrad/documentation/TIMELINE.md - ScratchOptim →
ScratchOptim/documentation/TIMELINE.md
As new repositories are added, their TIMELINE.md will appear here as well.
ScratchMind is open to improvements, ideas, and discussions. Feel free to open issues or propose enhancements in any repository.
ScratchMind is inspired by open-source ML communities and the philosophy of learning through construction, shared by researchers, educators, and engineers across the world.