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
- Machine Learning From Scratch: workflow, model evaluation, K-means, and Python/C practice.
- Deep Learning Tutorials: neural networks, matrix calculus, backpropagation, optimizers, convolution, attention, and CIFAR-10 Tiny CNN.
- Network Fundamentals Visualized: DNS, CIDR, TCP, TLS, HTTP caching, proxy tunnels, and reverse-proxy health checks.
- AI Security Engineering: threat modeling, adversarial examples, poisoning, model privacy, RAG, and agent safety.
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 postsMatrix Calculus for Neural Networks
Derive dL/dW for y = Wx + b and verify it with finite differences.
Backpropagation as a Computation Graph
Trace local gradients through ReLU and softmax cross-entropy in a two-layer MLP.
Gradient Descent and Optimizer Geometry
Compare gradient descent, momentum, and Adam on a visible quadratic loss surface.
Convolution and Receptive Field Math
Compute convolution output size, receptive fields, channel mixing, and im2col layout.
Transformer Attention Math
Hand-calculate Q/K/V scores, softmax weights, masks, multi-head structure, and 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 postsDNS Resolution Explained: Build a TTL Cache and Packet Parser in Python
A runnable DNS guide covering resolution paths, response headers, TTL cache latency, and deterministic Python/C experiments.
CIDR, Longest Prefix Match, and MTU: Calculate IP Routing Step by Step
Calculate CIDR ranges, longest-prefix route choice, and MTU/MSS payload segmentation with runnable Python and C examples.
TCP Reliability and Congestion Window: A Runnable Sequence Number Experiment
Track TCP sequence numbers, cumulative ACKs, loss, retransmission, and congestion-window changes with safe local experiments.
HTTPS and TLS 1.3 Handshake: Keys, Certificates, and RTT in Practice
Understand TLS 1.3 message flights, certificate authentication, ephemeral key agreement, and handshake latency with a safe teaching model.
HTTP/2, HTTP/3, and CDN Caching: Read Page Speed from a Waterfall
A deterministic browser-waterfall model for HTTP/2, HTTP/3, QUIC streams, and CDN cache hits or misses.
Forward Proxy vs Reverse Proxy: Connection Paths, Trust Boundaries, and Latency
A reproducible guide to forward proxies, reverse proxies, tunnels, TLS boundaries, and latency segments.
HTTP CONNECT and HTTPS Proxy Tunnels: TLS Boundaries and Handshake Latency
An RFC-based explanation of CONNECT tunnels, encrypted HTTPS payloads, and modeled first-request latency.
SOCKS5 Proxy Explained: Protocol Bytes, DNS Resolution Boundaries, and Leakage Risk
Decode safe SOCKS5 CONNECT bytes and compare local-DNS and proxy-side hostname resolution boundaries.
Reverse Proxy Load Balancing: Queues, Health Checks, and a Reproducible Scheduler
Compare round robin and load-aware queue selection while reasoning about health checks and retry boundaries.
Proxy Cache Revalidation: Cache-Control, ETag, and Observable Correctness
Use an RFC 9111 shared-cache model to calculate MISS, HIT, and 304 revalidation latency and correctness boundaries.
Project category
Battery Modeling for AI
A reproducible path from PyBaMM, EIS, and aging simulation to labeled battery datasets for AI training.
4 postsReading PyBaMM Fast: Architecture for Battery Modeling and AI Data
A PhD-level guide to PyBaMM expression trees, Simulation, model options, metadata, and AI dataset design.
PyBaMM EIS Data Generation: Impedance Features and AI Labels
Use PyBaMM core EISSimulation to generate impedance spectra, extract features, and align them with aging labels.
Generate Battery Aging and EIS AI Datasets with PyBaMM
Build a reproducible PyBaMM data factory for SOH, RUL, LLI, LAM, plating, and impedance-feature labels.
Training a Battery AI Model with PyBaMM: Predicting SOH and RUL
Train scikit-learn regressors on PyBaMM-style EIS features and operating metadata to predict battery SOH and RUL.
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 postsAI Basics Learning Roadmap
Separate AI, machine learning, and deep learning before going into implementation details.
Machine Learning Workflow
Follow the practical path from data and features to training, prediction, and evaluation.
Model Training and Evaluation
Understand loss, overfitting, train/test splits, accuracy, recall, and F1.
Neural Network Basics
Move from perceptrons to activation, forward propagation, backpropagation, and training loops.
Matrix Calculus for Neural Networks
Derive dL/dW for y = Wx + b and verify it with finite differences.
Backpropagation as a Computation Graph
Trace local gradients through ReLU and softmax cross-entropy in a two-layer MLP.
Gradient Descent and Optimizer Geometry
Compare gradient descent, momentum, and Adam on a visible quadratic loss surface.
Convolution and Receptive Field Math
Compute convolution output size, receptive fields, channel mixing, and im2col layout.
Transformer Attention Math
Hand-calculate Q/K/V scores, softmax weights, masks, multi-head structure, and KV cache.
Python AI Mini Practice
Run a small scikit-learn classification task and read the experiment output.
Handwritten Digit Dataset Basics
Read train.csv, test.csv, labels, and the flattened 28 by 28 pixel layout before training the classifier.
Handwritten Digit Softmax in C
Follow the C implementation from logits and softmax probabilities to confusion matrices and submission export.
Handwritten Digit Playground Notes
See how the offline classifier was adapted into a browser demo with drawing input and probability output.
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.
High-Entropy Traffic Defense Notes
Study encrypted metadata leaks, entropy, traffic classifiers, and a defensive Python chaffing prototype.
AI Security Threat Modeling
Build a defense map with NIST adversarial ML, MITRE ATLAS, and OWASP LLM risks.
Adversarial Examples and Robust Evaluation
Evaluate clean and perturbed accuracy with an FGSM-style digits experiment.
Data Poisoning and Backdoor Defense
Study poison rate, trigger behavior, attack success rate, and training pipeline controls.
Model Privacy and Extraction Defense
Measure membership inference signal and surrogate fidelity against a local toy model.
LLM, RAG, and Agent Security
Separate instructions from data and enforce tool permissions against indirect prompt injection.
Project category
Algorithm Implementation Project
Implementation-focused notes around backtracking, bit operations, clustering, code, diagrams, and downloads.
1 postsCharacter Image to SVG Animation Asset Pipeline: ComfyUI, Grounded-SAM, OpenPose, and vtracer
The first article in the 2D animation principles column: use ComfyUI IP-Adapter, OpenPose exploded layout, Grounded-SAM matting, and vtracer to build rig assets.
Project category
Site Building Project
Notes on the bilingual site structure, content sync, categories, comments, and deployment workflow.
1 postsWelcome to haotianblog: what this bilingual technical site covers
An introduction to the bilingual site, its technical focus, and the kinds of articles and resources it will publish.
