haotianblog
Blog

Blog

Categorized blog

Read by project

Posts are grouped into AI, algorithm implementation, and site-building projects, with level, reading time, and stack metadata.

Series

Deep Learning Math Visualized

Five posts move from matrix calculus, backpropagation, optimizers, convolution, and attention, each with hand calculation, code, figures, and animation.

5 posts

Matrix Calculus for Neural Networks

Derive dL/dW for y = Wx + b and verify it with finite differences.

Level: Intermediate Reading time: 13 min
  • Matrix Calculus
  • NumPy
  • Gradient Check

Backpropagation as a Computation Graph

Trace local gradients through ReLU and softmax cross-entropy in a two-layer MLP.

Level: Intermediate Reading time: 14 min
  • Backpropagation
  • Computation Graph
  • Softmax

Gradient Descent and Optimizer Geometry

Compare gradient descent, momentum, and Adam on a visible quadratic loss surface.

Level: Intermediate Reading time: 13 min
  • Gradient Descent
  • Momentum
  • Adam
  • Loss Surface

Convolution and Receptive Field Math

Compute convolution output size, receptive fields, channel mixing, and im2col layout.

Level: Intermediate Reading time: 13 min
  • Convolution
  • Receptive Field
  • im2col

Transformer Attention Math

Hand-calculate Q/K/V scores, softmax weights, masks, multi-head structure, and KV cache.

Level: Intermediate Reading time: 14 min
  • Transformer
  • Attention
  • QKV
  • KV Cache

Project category

AI Learning Project

A practical route from AI concepts to machine learning workflow, evaluation, neural networks, Python practice, handwritten digits, a CIFAR-10 CNN, adversarial traffic-defense notes, and AI security.

24 posts

AI Basics Learning Roadmap

Separate AI, machine learning, and deep learning before going into implementation details.

Level: Beginner Reading time: 8 min
  • AI
  • Machine Learning
  • Deep Learning

Machine Learning Workflow

Follow the practical path from data and features to training, prediction, and evaluation.

Level: Beginner Reading time: 9 min
  • Machine Learning
  • Features
  • scikit-learn

Model Training and Evaluation

Understand loss, overfitting, train/test splits, accuracy, recall, and F1.

Level: Beginner Reading time: 9 min
  • Model Training
  • Metrics
  • Evaluation

Neural Network Basics

Move from perceptrons to activation, forward propagation, backpropagation, and training loops.

Level: Intermediate Reading time: 8 min
  • Neural Networks
  • Backpropagation
  • Python

Matrix Calculus for Neural Networks

Derive dL/dW for y = Wx + b and verify it with finite differences.

Level: Intermediate Reading time: 13 min
  • Matrix Calculus
  • NumPy
  • Gradient Check

Backpropagation as a Computation Graph

Trace local gradients through ReLU and softmax cross-entropy in a two-layer MLP.

Level: Intermediate Reading time: 14 min
  • Backpropagation
  • Computation Graph
  • Softmax

Gradient Descent and Optimizer Geometry

Compare gradient descent, momentum, and Adam on a visible quadratic loss surface.

Level: Intermediate Reading time: 13 min
  • Gradient Descent
  • Momentum
  • Adam
  • Loss Surface

Convolution and Receptive Field Math

Compute convolution output size, receptive fields, channel mixing, and im2col layout.

Level: Intermediate Reading time: 13 min
  • Convolution
  • Receptive Field
  • im2col

Transformer Attention Math

Hand-calculate Q/K/V scores, softmax weights, masks, multi-head structure, and KV cache.

Level: Intermediate Reading time: 14 min
  • Transformer
  • Attention
  • QKV
  • KV Cache

RNN Basics: Handling Sequential Data with Memory

Understand the core concepts of Recurrent Neural Networks (RNN), the role of hidden states, and their application in NLP.

Level: Intermediate Reading time: 9 min
  • RNN
  • Sequence Models
  • Neural Networks

Transformer Self-Attention

Read Q/K/V, scaled dot-product attention, multi-head attention, and positional encoding before exploring LLM internals.

Level: Intermediate Reading time: 10 min
  • Transformer
  • Self-Attention
  • QKV
  • NLP

Python AI Mini Practice

Run a small scikit-learn classification task and read the experiment output.

Level: Practice Reading time: 10 min
  • Python
  • scikit-learn
  • Classification

Handwritten Digit Dataset Basics

Read train.csv, test.csv, labels, and the flattened 28 by 28 pixel layout before training the classifier.

Level: Beginner Reading time: 8 min
  • Dataset
  • CSV
  • Image Classification

Handwritten Digit Softmax in C

Follow the C implementation from logits and softmax probabilities to confusion matrices and submission export.

Level: Practice Reading time: 11 min
  • C
  • Softmax
  • Classification

Handwritten Digit Playground Notes

See how the offline classifier was adapted into a browser demo with drawing input and probability output.

Level: Practice Reading time: 8 min
  • Browser Demo
  • Softmax
  • Visualization

CIFAR-10 Tiny CNN Tutorial in C

Build and train a small convolutional neural network for CIFAR-10 image classification, then read its loss and accuracy output.

Level: Intermediate Reading time: 13 min
  • C
  • CNN
  • CIFAR-10
  • Backpropagation

High-Entropy Traffic Defense Notes

Study encrypted metadata leaks, entropy, traffic classifiers, and a defensive Python chaffing prototype.

Level: Intermediate Reading time: 16 min
  • Python
  • Traffic Analysis
  • Adversarial ML
  • Networking

AI Security Threat Modeling

Build a defense map with NIST adversarial ML, MITRE ATLAS, and OWASP LLM risks.

Level: Professional Reading time: 12 min
  • AI Security
  • Threat Modeling
  • NIST
  • MITRE ATLAS
  • OWASP

Adversarial Examples and Robust Evaluation

Evaluate clean and perturbed accuracy with an FGSM-style digits experiment.

Level: Professional Reading time: 11 min
  • Adversarial Examples
  • FGSM
  • Robust Evaluation
  • scikit-learn

Data Poisoning and Backdoor Defense

Study poison rate, trigger behavior, attack success rate, and training pipeline controls.

Level: Professional Reading time: 11 min
  • Data Poisoning
  • Backdoor Defense
  • Training Pipeline
  • scikit-learn

Model Privacy and Extraction Defense

Measure membership inference signal and surrogate fidelity against a local toy model.

Level: Professional Reading time: 12 min
  • Model Privacy
  • Membership Inference
  • Model Extraction
  • Prediction API

LLM, RAG, and Agent Security

Separate instructions from data and enforce tool permissions against indirect prompt injection.

Level: Professional Reading time: 12 min
  • LLM Security
  • RAG
  • Agent Tools
  • Prompt Injection

Project category

Algorithm Implementation Project

Implementation-focused notes around backtracking, bit operations, clustering, code, diagrams, and downloads.

3 posts

Eight queens with classic backtracking

Start with state representation, conflict checks, recursive search, and the full C/Python solving flow.

Level: Beginner Reading time: 10 min
  • C
  • Python
  • Backtracking
  • K-means

K-means clustering on the Iris dataset in C

Study standardization, K-means++ initialization, restart selection, SSE, and the final clustering result.

Level: Beginner Reading time: 10 min
  • C
  • Python
  • Backtracking
  • K-means

Project category

Site Building Project

Notes on the bilingual site structure, content sync, categories, comments, and deployment workflow.

1 posts
Scroll down