English
AI Basics Learning Roadmap: AI, Machine Learning, and Deep Learning
Artificial intelligence is often introduced as if it were a single mysterious subject. If you already know how to program, a better starting point is to build a clear map: which ideas belong together, which tools are just implementation details, and which fundamentals you should practice repeatedly.
This article separates artificial intelligence, machine learning, and deep learning, then gives a practical learning path for programmers. The next posts in this series cover the machine learning workflow, model training and evaluation, neural networks, and a small Python classification project.
After reading it, you should be able to answer three questions: whether AI and machine learning are the same thing, why machine learning needs data and labels, and which foundations to learn next.
1. Start With Three Terms
The first source of confusion is usually this group of terms:
- Artificial intelligence: the broad goal of making software behave intelligently
- Machine learning: systems that learn patterns from data instead of relying only on hand-written rules
- Deep learning: a subset of machine learning that uses multi-layer neural networks
They are not separate boxes. The relationship is nested:
Artificial intelligence
└── Machine learning
└── Deep learning
That means learning AI does not have to begin with training large models. A more stable path is to understand how data becomes a model, then move into neural networks and large-model applications.
2. Traditional Programming vs. Machine Learning
Traditional programming usually looks like this:
Rules + input data -> output
For example, if you write a leap-year function, the rule is explicitly written by the programmer. The input is a year, and the output is true or false.
Machine learning often looks more like this:
Input data + known answers -> learned rule
New input data + learned rule -> prediction
For spam classification, you probably cannot hand-write every useful rule. A common approach is to collect many emails with labels, then let a model learn which patterns are associated with spam.
This is the most important mindset shift for programmers: your code no longer describes every rule directly. It describes how the program should learn rules from data.
3. The Parts of a Basic AI Project
From an engineering perspective, a small machine learning project usually contains these steps:
- Define the problem: classification, regression, clustering, ranking, or something else
- Prepare the data: where it comes from, whether labels are reliable, and what each field means
- Build features: convert raw records into numbers the model can use
- Train the model: let the algorithm adjust parameters from training data
- Evaluate results: test the model on data it has not seen during training
- Use the model: place predictions inside a script, service, or product workflow
Beginners often focus too much on switching to a stronger model. In real projects, data quality, feature handling, and evaluation design are often more important.
4. What to Learn First
If you already know basic programming, start with these areas:
- Python basics: functions, lists, dictionaries, modules, virtual environments, and packages
- Data handling: CSV files, tabular data, missing values, and simple statistics
- Linear algebra intuition: vectors, matrices, and dot products without heavy proof work at the beginning
- Probability and statistics intuition: mean, variance, distributions, sampling, and correlation
- Model evaluation: train/test splits, accuracy, validation, and overfitting
You do not need to finish all of this before practicing. The better approach is to run small examples and fill the gaps as each concept appears.
5. A Practical Learning Order
A useful order for programmers is:
- Understand the relationship between AI, machine learning, and deep learning
- Learn supervised classification and regression
- Understand training, validation, and test data
- Learn loss functions, parameters, training epochs, and overfitting
- Run a complete classification task with scikit-learn
- Then move into neural networks, deep learning frameworks, and large-model applications
This order helps you understand why a model can learn from data before you deal with larger frameworks and more complex model architectures.
6. What Not to Rush
These can wait until the foundations are clearer:
- Training a large deep learning model as the first project
- Comparing models before understanding evaluation metrics
- Copying notebooks without explaining each input and output
- Confusing API usage with understanding AI fundamentals
Using existing models is valuable, but during foundation learning, the main goal is to understand how data enters a model, how predictions are produced, and how predictions are evaluated.
7. A Simple Self-Check
At this stage, you do not need to derive advanced formulas. You should, however, be able to explain these ideas in your own words:
- Why the same problem can sometimes be solved with hand-written rules or with machine learning
- What features and labels are, and what role they play during training
- Why training data and test data should not be mixed casually
- Why one run of one model is not enough to prove that a model is reliable
8. How to Read This Series
This first article gives the map. The next articles expand the workflow in order:
- Machine Learning Workflow: from data and features to predictions
- Model Training and Evaluation: loss, overfitting, and metrics
- Neural Network Basics: from perceptrons to multi-layer networks
- Python AI Mini Practice: a classification task with scikit-learn
The goal is not to memorize as many AI terms as possible. The goal is to take a small problem and clearly explain what the data is, what the target is, what the model learns, and how to verify whether it learned something useful.
Chinese
人工智能基础学习路线:先理解什么是 AI、机器学习和深度学习
Open as a full page人工智能这个词很容易被讲得很玄,但如果你已经有一点编程基础,入门时最重要的不是先追最新模型,而是先建立一张清楚的地图:哪些概念属于同一层,哪些只是工具,哪些才是真正需要反复练习的基本功。
这篇文章先把人工智能、机器学习、深度学习之间的关系讲清楚,再给出一条适合程序员的学习路线。后面的文章会继续展开机器学习流程、模型训练、神经网络和一个 Python 小实战。
读完这一篇,你应该能回答三个问题:AI 和机器学习是不是一回事,为什么机器学习需要数据和标签,以及接下来应该按什么顺序补基础。
一、先区分三个常见词
初学人工智能时,最容易混在一起的三个词是:
- 人工智能:让程序表现出某种“智能行为”的大方向
- 机器学习:让程序从数据中学习规律,而不是只靠手写规则
- 深度学习:机器学习中的一类方法,主要使用多层神经网络
它们不是并列关系,而是包含关系:
人工智能
└── 机器学习
└── 深度学习
所以,学人工智能并不等于一开始就训练大模型。更稳妥的顺序是先理解“数据如何变成模型”,再去看神经网络和大模型。
二、传统编程和机器学习有什么不同
传统编程通常是这样:
规则 + 输入数据 -> 输出结果
比如你写一个判断闰年的函数,规则由程序员明确写出来,输入年份,输出 true 或 false。
机器学习更像这样:
输入数据 + 已知答案 -> 学出规则
新输入数据 + 学出的规则 -> 预测结果
例如垃圾邮件分类,你不太可能手写完所有规则。更常见的做法是准备很多邮件和对应标签,让模型从样本中学习哪些特征更像垃圾邮件。
这就是机器学习对程序员最重要的思维转换:你写的代码不再直接描述全部规则,而是描述“如何从数据中学习规则”。
三、一个 AI 项目通常由哪些部分组成
从工程角度看,一个最小的机器学习项目通常包含下面几个环节:
- 定义问题:到底要分类、预测数值,还是做聚类
- 准备数据:数据从哪里来,标签是否可靠,字段含义是什么
- 处理特征:把原始数据变成模型可以使用的数字
- 训练模型:让算法根据训练数据调整参数
- 评估效果:用没见过的数据检查模型是否真的有用
- 使用模型:把模型放到脚本、服务或产品流程里
很多初学者会把注意力全部放在“换一个更强的模型”上,但真实项目里,数据质量、特征处理和评估方式往往更重要。
四、应该先学哪些基础
如果你已经能写基本程序,人工智能入门建议先补下面几块:
- Python 基础:函数、列表、字典、模块、虚拟环境和包管理
- 数据处理:CSV、表格数据、缺失值、简单统计量
- 线性代数直觉:向量、矩阵、点积,不需要一开始追求严密证明
- 概率统计直觉:均值、方差、分布、采样、相关性
- 模型评估:训练集、测试集、准确率、过拟合
这些内容不是一次学完再开始实践,而是可以边写小程序边补。最有效的方式是每学一个概念,就找一个小数据集跑一遍。
五、推荐的学习顺序
比较适合有编程基础读者的路线是:
- 先理解 AI、机器学习、深度学习的关系
- 学习监督学习中的分类和回归问题
- 掌握训练集、验证集、测试集的区别
- 理解损失函数、参数、训练轮次和过拟合
- 用 scikit-learn 跑通一个完整分类任务
- 再进入神经网络、深度学习框架和大模型应用
这个顺序的好处是:先把“模型为什么能从数据里学东西”这件事想明白,再接触复杂框架时就不容易迷路。
六、入门时不要急着做什么
下面几件事可以稍微往后放:
- 一开始就训练大型深度学习模型
- 还没理解评估方式就比较模型好坏
- 只复制 Notebook,但不解释每一步输入输出
- 把“调用 API”误认为已经理解人工智能基础
调用现成模型当然有价值,但基础学习阶段更重要的是知道:数据怎么进入模型,模型怎么产生预测,预测结果怎么评估。
七、一个简单的自测标准
学完这一阶段,不需要马上能推导复杂公式,但至少应该能用自己的话解释下面几件事:
- 为什么同一个问题可以用规则编程解决,也可以用机器学习解决
- 特征和标签分别是什么,它们在训练中承担什么角色
- 训练集和测试集为什么不能随便混在一起
- 为什么模型效果不能只看一次运行结果
八、这个系列接下来怎么读
这一篇先建立地图。后面几篇会按下面顺序展开:
- 机器学习完整流程:从数据、特征到模型预测
- 模型训练与评估:损失函数、过拟合和指标
- 神经网络基础:从感知机到多层网络
- Python 小实战:用 scikit-learn 完成分类任务
学人工智能基础,最好的目标不是“记住很多名词”,而是能拿到一个小问题后,清楚地说出:数据是什么、目标是什么、模型学什么、怎么验证它有没有学对。
Artificial intelligence is often introduced as if it were a single mysterious subject. If you already know how to program, a better starting point is to build a clear map: which ideas belong together, which tools are just implementation details, and which fundamentals you should practice repeatedly.
This article separates artificial intelligence, machine learning, and deep learning, then gives a practical learning path for programmers. The next posts in this series cover the machine learning workflow, model training and evaluation, neural networks, and a small Python classification project.
After reading it, you should be able to answer three questions: whether AI and machine learning are the same thing, why machine learning needs data and labels, and which foundations to learn next.
1. Start With Three Terms
The first source of confusion is usually this group of terms:
- Artificial intelligence: the broad goal of making software behave intelligently
- Machine learning: systems that learn patterns from data instead of relying only on hand-written rules
- Deep learning: a subset of machine learning that uses multi-layer neural networks
They are not separate boxes. The relationship is nested:
Artificial intelligence
└── Machine learning
└── Deep learning
That means learning AI does not have to begin with training large models. A more stable path is to understand how data becomes a model, then move into neural networks and large-model applications.
2. Traditional Programming vs. Machine Learning
Traditional programming usually looks like this:
Rules + input data -> output
For example, if you write a leap-year function, the rule is explicitly written by the programmer. The input is a year, and the output is true or false.
Machine learning often looks more like this:
Input data + known answers -> learned rule
New input data + learned rule -> prediction
For spam classification, you probably cannot hand-write every useful rule. A common approach is to collect many emails with labels, then let a model learn which patterns are associated with spam.
This is the most important mindset shift for programmers: your code no longer describes every rule directly. It describes how the program should learn rules from data.
3. The Parts of a Basic AI Project
From an engineering perspective, a small machine learning project usually contains these steps:
- Define the problem: classification, regression, clustering, ranking, or something else
- Prepare the data: where it comes from, whether labels are reliable, and what each field means
- Build features: convert raw records into numbers the model can use
- Train the model: let the algorithm adjust parameters from training data
- Evaluate results: test the model on data it has not seen during training
- Use the model: place predictions inside a script, service, or product workflow
Beginners often focus too much on switching to a stronger model. In real projects, data quality, feature handling, and evaluation design are often more important.
4. What to Learn First
If you already know basic programming, start with these areas:
- Python basics: functions, lists, dictionaries, modules, virtual environments, and packages
- Data handling: CSV files, tabular data, missing values, and simple statistics
- Linear algebra intuition: vectors, matrices, and dot products without heavy proof work at the beginning
- Probability and statistics intuition: mean, variance, distributions, sampling, and correlation
- Model evaluation: train/test splits, accuracy, validation, and overfitting
You do not need to finish all of this before practicing. The better approach is to run small examples and fill the gaps as each concept appears.
5. A Practical Learning Order
A useful order for programmers is:
- Understand the relationship between AI, machine learning, and deep learning
- Learn supervised classification and regression
- Understand training, validation, and test data
- Learn loss functions, parameters, training epochs, and overfitting
- Run a complete classification task with scikit-learn
- Then move into neural networks, deep learning frameworks, and large-model applications
This order helps you understand why a model can learn from data before you deal with larger frameworks and more complex model architectures.
6. What Not to Rush
These can wait until the foundations are clearer:
- Training a large deep learning model as the first project
- Comparing models before understanding evaluation metrics
- Copying notebooks without explaining each input and output
- Confusing API usage with understanding AI fundamentals
Using existing models is valuable, but during foundation learning, the main goal is to understand how data enters a model, how predictions are produced, and how predictions are evaluated.
7. A Simple Self-Check
At this stage, you do not need to derive advanced formulas. You should, however, be able to explain these ideas in your own words:
- Why the same problem can sometimes be solved with hand-written rules or with machine learning
- What features and labels are, and what role they play during training
- Why training data and test data should not be mixed casually
- Why one run of one model is not enough to prove that a model is reliable
8. How to Read This Series
This first article gives the map. The next articles expand the workflow in order:
- Machine Learning Workflow: from data and features to predictions
- Model Training and Evaluation: loss, overfitting, and metrics
- Neural Network Basics: from perceptrons to multi-layer networks
- Python AI Mini Practice: a classification task with scikit-learn
The goal is not to memorize as many AI terms as possible. The goal is to take a small problem and clearly explain what the data is, what the target is, what the model learns, and how to verify whether it learned something useful.
Search questions
FAQ
Who is this article for?
This article is for readers who want a beginner-level guide to AI Basics Learning Roadmap. It takes about 8 min and focuses on AI, Machine Learning, Deep Learning.
What should I read next?
The recommended next step is Machine Learning Workflow, so the article connects into a longer learning route instead of ending as an isolated note.
Does this article include runnable code or companion resources?
This article is primarily explanatory, but the related tutorials point to runnable examples, resources, and project pages.
How does this article fit into the larger site?
It is connected to the article context block, learning routes, resources, and project timeline so readers can move from concept to implementation.
Article context
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.
Your next step
Continue: Machine Learning WorkflowSeparate AI, machine learning, and deep learning before going into implementation details.
Open share centerProject timeline
Published posts
- AI 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.
- NLP Basics: Understanding Bag of Words and TF-IDF An introduction to the most fundamental text representation methods in NLP: Bag of Words (BoW) and TF-IDF.
- 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.
- Transformer Self-Attention Read Q/K/V, scaled dot-product attention, multi-head attention, and positional encoding before exploring LLM internals.
- 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.
- Building a Tiny CIFAR-10 CNN in C: Convolution, Pooling, and Backpropagation A source-based walkthrough of cifar10_tiny_cnn.c, covering CIFAR-10 binary input, 3x3 convolution, ReLU, max pooling, fully connected logits, softmax, backpropagation, and local commands.
- 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.
Published resources
- Python AI practice code guide The article includes a runnable scikit-learn classification script.
- digit_softmax_classifier.c The C source for the handwritten digit softmax classifier.
- train.csv.zip Compressed handwritten digit training set with 42000 labeled samples.
- test.csv.zip Compressed handwritten digit test set with 28000 unlabeled samples.
- sample_submission.csv The official submission format example for checking the final output columns.
- submission.csv The prediction file generated by the current C project.
- digit-playground-model.json The compact softmax demo model and sample set used by the browser playground.
- digit-sample-grid.svg A small handwritten digit preview grid extracted from the training set.
- Handwritten digit project bundle Contains the source file, compressed datasets, submission files, browser model, and preview grid.
- cifar10_tiny_cnn.c source Single-file C tiny CNN with CIFAR-10 loading, convolution, pooling, softmax, and backpropagation.
- model_weights.bin sample weights Model weights generated by one local small-sample run.
- test_predictions.csv sample predictions Sample test prediction output from the CIFAR-10 tiny CNN.
- CNN project explanation PDF Companion explanation material for the CNN project.
- Virtual Mirror redacted code skeleton A redacted mld_chaffing_v2.py control-flow skeleton with secrets, node topology, and target lists removed.
- Virtual Mirror stress-test template A redacted CSV template for CPU, memory, peak threads, pulse rate, latency, and error measurements.
- Virtual Mirror classifier-evaluation template A CSV template for TP, FN, FP, TN, accuracy, precision, recall, F1, ROC-AUC, entropy, and JS divergence.
- Virtual Mirror resource notes Notes explaining why the public resources include only redacted code, test templates, and architecture context.
- AI Security Lab README Setup, safety boundaries, and quick-run commands for the AI Security series.
- AI Security Lab full bundle Includes safe toy scripts, result CSVs, risk register, attack-defense matrix, and architecture diagram.
- AI security risk register CSV risk register template for AI threat modeling and release review.
- AI attack-defense matrix Maps attack surface, toy demo, metric, and defensive control into one CSV table.
- AI Security Lab architecture diagram Shows threat modeling, robustness, data integrity, model privacy, and RAG guardrails.
- FGSM digits robustness script FGSM-style perturbation and accuracy-drop experiment for a local digits classifier.
- Data poisoning and backdoor toy script Demonstrates poison rate, trigger behavior, and attack success rate on digits.
- Model privacy and extraction toy script Outputs membership AUC, target accuracy, surrogate fidelity, and surrogate accuracy.
- RAG prompt injection guard toy script Uses a deterministic toy agent to demonstrate external-data demotion and tool-policy blocking.
- Deep Learning topic share card A 1200x630 SVG card for sharing the Deep Learning / CNN topic hub.
- Machine Learning From Scratch share card A 1200x630 SVG card for the K-means, Iris, and ML workflow topic hub.
- Student AI Projects share card A 1200x630 SVG card for handwritten digits, C classifiers, and browser demos.
- CNN convolution scan animation An 8-second Remotion animation showing how a 3x3 convolution kernel scans an input and builds a feature map.
Current route
- AI Basics Learning Roadmap Learning path step
- Machine Learning Workflow Learning path step
- Model Training and Evaluation Learning path step
- Neural Network Basics Learning path step
- Transformer Self-Attention Learning path step
- LLM Visualizer Learning path step
- Python AI Mini Practice Learning path step
- Handwritten Digit Dataset Basics Learning path step
- Handwritten Digit Softmax in C Learning path step
- Handwritten Digit Playground Notes Learning path step
- CIFAR-10 Tiny CNN Tutorial in C Learning path step
- High-Entropy Traffic Defense Notes Learning path step
- AI Security Threat Modeling Learning path step
- Adversarial Examples and Robust Evaluation Learning path step
- Data Poisoning and Backdoor Defense Learning path step
- Model Privacy and Extraction Defense Learning path step
- LLM, RAG, and Agent Security Learning path step
Next notes
- Add more image-classification and error-analysis cases
- Turn common metrics into a quick reference
- Add more AI security defense experiment notes
