haotianblog
Blog

Blog

Blog Articles

This page collects the main technical articles on haotianblog, with emphasis on machine learning, algorithm implementation, deep learning math, network protocols, and AI security. The goal is to publish explanations with context, implementation details, code, or experiment output rather than short summaries.

If this is your first visit, start by topic. The machine learning route begins with data and evaluation. The algorithm route begins with eight queens and K-means. The networking route moves from DNS, TCP, and TLS into proxies and caching. The AI security route starts from threat modeling and safe toy labs.

Current reading routes

How to evaluate an article here

The site is trying to avoid pages that are only concept summaries or link lists. A useful technical article should state the question, show the input, explain the implementation, preserve evidence, and describe the boundary of the result. For algorithms and machine learning, that evidence may be intermediate state, metrics, error cases, source code, or downloadable files. For network protocols, it may be headers, status codes, cache state, timing phases, and reproduction commands.

If a page is only a route, index, or tool surface, it should point clearly to the stronger article that carries the explanation. That keeps the site easier to evaluate: a reader can tell whether a page is a learning route, an experiment entry, a resource page, or a complete tutorial.

Content Type and Evidence Standard

Content type Question it should answer Evidence the page should keep visible
Machine learning implementation How does data enter the model, and why should the metric be trusted? Split strategy, baseline, run command, error cases, and metric definition.
Algorithm and C/Python code Which state changes, and where are the boundary cases? Input format, loop invariant, complexity, output example, and failing input.
Network protocol debugging Is the issue in DNS, TLS, proxying, caching, or the application layer? Headers, status codes, timing sequence, cache state, and reproduction commands.
AI security experiment What does the demo prove, and what does it not prove? Authorization boundary, toy-lab setup, metric, mitigation, and misuse limits.

Current maintenance focus

New and revised articles will continue to emphasize reproducibility and explanation. Machine learning pages should include split strategy, baselines, error analysis, and experiment notes. Network pages should show layered evidence from browser, CDN, Nginx, and application behavior. AI security pages should keep authorization boundaries, toy-lab limits, and defensive review methods visible.

Older pages that only contain short summaries or single links are candidates for expansion, merging, redirection, or noindex treatment. The goal is not to create more URLs. The goal is to make the public indexable pages answer real reader questions and show original technical value.

Article index

The index below is generated from the current site categories. Tool, survey, and share pages are not treated as core articles; readers should prioritize posts with complete body text, code, and experiment notes.

Categorized blog

Read by project

Posts are grouped into networking, battery modeling, 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

Network Fundamentals

A reproducible route through DNS, TCP, TLS, HTTP/3, proxy tunnels, load balancing, and shared caches with code and figures.

10 posts

Project category

Battery Modeling for AI

A reproducible path from PyBaMM, EIS, and aging simulation to labeled battery datasets for AI training.

4 posts

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.

20 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

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.

1 posts

Project category

Site Building Project

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

1 posts
Scroll down