Inside AI Models
Articles
Tutorials, experiment logs, and deep-dives on how AI models work.
About This Blog
A short introduction to why I started this journal, the kinds of posts you'll find here, and why writing is an inseparable part of learning.
What Is a Tensor? Linear Algebra for Deep Learning
We build the ladder from scalars to tensors, make the case that shape is the concept to track, and show why a neural network layer is really just linear algebra in disguise.
Attention, Explained from Scratch
We build the mechanism at the heart of modern language models around a single intuitive question, working from query, key, and value vectors through softmax to why attention changed everything.
How Gradient Descent Actually Works
The optimization loop behind every trained model, built from a hill-and-fog analogy through derivatives, learning rate, and backpropagation — no calculus prerequisite required.
Why Identity-Aware Negative Sampling Matters
In multimodal deepfake detection, a contrastive loss is only as good as its negatives. We examine why random batching misses the critical negatives and how identity-grouped sampling repairs it.