1. Why Distinguish AI, Machine Learning, and Deep Learning?
Artificial intelligence (AI), machine learning (ML), and deep learning (DL) are three of the most common concepts in today's technology field.
These terms are often seen in technical articles, product introductions, and development documentation:
- Artificial intelligence systems.
- Machine learning algorithms.
- Deep learning models.
- Large AI models.
- Intelligent applications based on deep learning.
They are closely related, but they are not the same concept.
For example:
- An expert system based on a rule engine can belong to artificial intelligence, but it does not necessarily use machine learning.
- A system that uses a decision tree for classification belongs to machine learning, but not to deep learning.
- A large language model trained using the Transformer architecture belongs to deep learning and is also an important application of machine learning and artificial intelligence.
The core difference among the three is:
AI is the overall field of studying and realizing intelligent behavior; machine learning is an important method for realizing artificial intelligence; and deep learning is a class of techniques in machine learning based on deep neural networks.
Understanding this relationship is the foundation for building an understanding of artificial intelligence technology.
2. Definitions of AI, Machine Learning, and Deep Learning
1. AI: Artificial Intelligence
AI (Artificial Intelligence) is called 人工智能 in Chinese.
Artificial intelligence is an important research field in computer science, mainly studying how to enable computer systems to exhibit capabilities that usually require human intelligence to complete.
These capabilities include:
- Perception: recognizing images, sounds, and environmental information.
- Comprehension: understanding language, semantics, and context.
- Learning: acquiring patterns from data and experience.
- Reasoning: deriving conclusions from known information.
- Planning: formulating action steps based on goals.
- Decision-making: determining appropriate actions among different choices.
- Generation: generating text, images, audio, video, and other content.
Artificial intelligence does not require the use of any particular algorithm or model.
As long as a system achieves some kind of intelligent behavior through computational methods, it may fall within the scope of AI research or applications.
For example:
Rule-based expert system
Rule 1: If the user's age is less than 18, determine that the user is a minor.
Rule 2: If the user's age is greater than or equal to 18, determine that the user is an adult.
Input: User age 20
Output: Adult
This system makes judgments through predefined rules.
It does not train a model from data and does not use neural networks, but it can still be classified as symbolic AI in the early AI technology system.
Main technical directions of AI:
| Technical direction | Main function |
|---|---|
| Symbolic AI | Reasoning based on symbols, rules, and logic |
| Machine learning (ML) | Learning patterns from data |
| Deep learning (DL) | Using deep neural networks to learn complex features |
| Natural language processing (NLP) | Understanding and processing natural language |
| Computer vision (CV) | Understanding images and video |
| Speech AI | Recognizing and generating speech |
| Knowledge representation and reasoning | Representing knowledge and deriving conclusions |
| Planning and decision-making | Selecting actions based on goals |
| Generative AI | Generating text, images, audio, and video |
| AI Agent | Orchestrating models, tools, and execution workflows to complete tasks |
Note that these directions are not on the same classification dimension: some are technical methods, some are application areas, and some are system architectures.
2. ML: Machine Learning
ML (Machine Learning) is called 机器学习 in Chinese.
Machine learning is an important branch of artificial intelligence that studies how computers can automatically learn patterns from data and experience, rather than relying entirely on manually written rules.
How traditional programs work:
flowchart LR
A["Input data"] --> B["Manually written rules"]
B --> C["Program execution"]
C --> D["Output result"]
classDef base fill:#DCEFE5,stroke:#4F8B70,color:#24563F
classDef process fill:#EAF3EC,stroke:#83A995,color:#315D49
class A,D base
class B,C process
How machine learning works:
flowchart LR
A["Training data"] --> B["Learning algorithm"]
B --> C["Train model"]
D["New input data"] --> E["Trained model"]
C --> E
E --> F["Prediction result"]
classDef base fill:#DCEFE5,stroke:#4F8B70,color:#24563F
classDef process fill:#EAF3EC,stroke:#83A995,color:#315D49
class A,D,F base
class B,C,E process
The most important difference between the two approaches is:
Traditional programming has developers directly define the processing logic, whereas machine learning learns model parameters from training data, enabling the model to make predictions on new inputs.
For example, consider developing a spam email detection system.
A traditional rule-based approach might be:
If the email subject contains "you have won a prize"
mark it as spam
If the email body contains "claim for free"
mark it as spam
This approach relies on manually maintained rules.
A machine learning approach, by contrast, can:
- Collect a large number of historical emails.
- Label emails as spam or legitimate.
- Extract email content and other features.
- Use machine learning algorithms to train a model.
- Use the trained model to identify new emails.
The model can learn the relationships between keywords, text structure, other features, and spam from the data.
The core of machine learning is not having programs write code themselves, but enabling models to learn parameters and patterns from data.
Main Types of Machine Learning
| Type | Core Characteristics | Typical Tasks |
|---|---|---|
| Supervised learning | Trained on labeled data | Classification, regression |
| Unsupervised learning | Discovers structure in unlabeled data | Clustering, dimensionality reduction |
| Semi-supervised learning | Uses both a small amount of labeled data and a large amount of unlabeled data | Classification, recognition |
| Self-supervised learning | Constructs training objectives from the data itself | Representation learning, language modeling |
| Reinforcement learning | Learns policies through environment interaction and rewards | Decision-making, control |
Typical Machine Learning Algorithms
- Linear Regression
- Logistic Regression
- Decision Tree
- Random Forest
- Support Vector Machine (SVM)
- K-Means
- XGBoost
- Q-Learning
These algorithms do not necessarily require neural networks.
For example, a decision tree can complete classification tasks through features and splitting rules, and K-Means can complete clustering tasks through distance calculations.
They all belong to machine learning algorithms.
3. DL: Deep Learning
DL (Deep Learning) stands for deep learning.
Deep learning is a branch of machine learning that primarily uses multi-layer artificial neural networks to learn complex features and representations in data.
Its core technical foundation is the artificial neural network (ANN).
A simple neuron can be expressed as:
Where:
- x_i: input data.
- w_i: the weight corresponding to the input.
- b: bias.
- f: activation function.
- y: neuron output.
Multiple neurons form a network, and multiple network layers further form a deep neural network.
flowchart TB
A["Input Layer"] --> B["Hidden Layer 1"]
B --> C["Hidden Layer 2"]
C --> D["Hidden Layer 3"]
D --> E["Output Layer"]
style A fill:#DCEFE5,stroke:#4F8B70,color:#24563F
style B fill:#EAF3EC,stroke:#83A995,color:#315D49
style C fill:#EAF3EC,stroke:#83A995,color:#315D49
style D fill:#EAF3EC,stroke:#83A995,color:#315D49
style E fill:#F5F8F4,stroke:#B5CBBB,color:#40594A
The “deep” in deep learning mainly refers to the network having multiple computational layers.
These layers can progressively extract and combine data features.
For example, in image recognition tasks:
- Shallower layers may learn edges, colors, and textures.
- Middle layers may learn local shapes and structures.
- Deeper layers may learn object parts and more abstract semantic features.
This layer-by-layer representation learning capability is an important foundation for deep learning to handle complex data.
Main Network Architectures in Deep Learning
| Network architecture | English name | Main applications |
|---|---|---|
| CNN | Convolutional Neural Network | Image recognition, vision tasks |
| RNN | Recurrent Neural Network | Sequence modeling |
| LSTM | Long Short-Term Memory | Long-sequence modeling |
| GRU | Gated Recurrent Unit | Sequence modeling |
| Transformer | Transformer | Large language models, multimodal models |
| GNN | Graph Neural Network | Graph-structured data processing |
| GAN | Generative Adversarial Network | Data generation |
| VAE | Variational Autoencoder | Probabilistic generation, representation learning |
Note that GAN and VAE are usually classified as deep generative models; they are not network architecture categories on exactly the same dimension as CNN and RNN. Real architectures may also combine multiple techniques.
Core training process of deep learning
Deep learning models usually need to go through the following steps:
- Prepare training data.
- Feed the data into the neural network.
- Compute predictions through forward propagation.
- Calculate the loss based on the predictions.
- Compute parameter gradients through backpropagation.
- Use an optimizer to update model parameters.
- Iterate multiple times until the training condition is met.
flowchart TB
A["Prepare training data"] --> B["Forward propagation"]
B --> C["Compute loss function"]
C --> D["Backpropagation"]
D --> E["Compute parameter gradients"]
E --> F["Optimizer updates parameters"]
F --> G{"Continue training?"}
G -->|"Yes"| B
G -->|"No"| H["Obtain the trained model"]
style A fill:#DCEFE5,stroke:#4F8B70,color:#24563F
style B fill:#EAF3EC,stroke:#83A995,color:#315D49
style C fill:#EAF3EC,stroke:#83A995,color:#315D49
style D fill:#EAF3EC,stroke:#83A995,color:#315D49
style E fill:#EAF3EC,stroke:#83A995,color:#315D49
style F fill:#EAF3EC,stroke:#83A995,color:#315D49
style G fill:#F7F4E8,stroke:#C7B77A,color:#675A2D
style H fill:#E5F0E9,stroke:#83A995,color:#315D49
The following need to be distinguished in particular:
- Forward propagation: computes the model output.
- Loss function: measures the difference between predictions and target results.
- Backpropagation: computes the gradients of the loss with respect to model parameters.
- Optimizer: updates model parameters based on the gradients.
Backpropagation is responsible for gradient computation and is not directly equivalent to parameter updating.
III. The containment relationship among the three
This is the most important part for understanding AI, machine learning, and deep learning.
From the perspective of the technical system:
- Artificial intelligence is the broadest concept.
- Machine learning belongs to artificial intelligence.
- Deep learning belongs to machine learning.
This can be represented by the following relationships:
flowchart TB
A["Artificial Intelligence AI"]
A --> B["Machine Learning ML"]
B --> C["Deep Learning DL"]
A --> D["Symbolic AI"]
A --> E["Knowledge Representation and Reasoning"]
A --> F["Search and Planning"]
B --> G["Traditional Machine Learning Algorithms"]
B --> C
C --> H["Neural Networks"]
H --> I["CNN"]
H --> J["RNN"]
H --> K["Transformer"]
H --> L["GNN"]
classDef root fill:#DCEFE5,stroke:#4F8B70,color:#24563F,stroke-width:2px
classDef group fill:#EAF3EC,stroke:#83A995,color:#315D49
classDef item fill:#F5F8F4,stroke:#B5CBBB,color:#40594A
class A root
class B,C,H group
class D,E,F,G,I,J,K,L item
The diagram above shows the main conceptual containment relationships. Symbolic AI, knowledge representation and reasoning, search and planning, etc. may also be combined with machine learning; this does not mean these technologies are completely independent of one another.
1. Why is AI not equivalent to machine learning?
Because artificial intelligence can be implemented in ways other than machine learning.
For example:
- Rule-based expert systems.
- Logic-based automated theorem proving.
- Search-based path planning.
- Knowledge graph-based reasoning systems.
These technologies can achieve intelligent behavior, but not necessarily by learning models from training data.
Therefore:
Machine learning is one method for realizing artificial intelligence, not the whole of artificial intelligence.
2. Why is machine learning not equivalent to deep learning?
Because machine learning includes many algorithms that do not use deep neural networks.
For example:
- Decision trees.
- Random forests.
- Logistic regression.
- Support vector machines.
- K-Means.
- XGBoost.
These methods all belong to machine learning, but they do not belong to deep learning.
Deep learning is just one category of machine learning methods based on deep neural networks.
3. Why does deep learning belong to machine learning?
Deep learning likewise trains model parameters through data.
It also requires:
- Training data.
- Model architecture.
- Loss function.
- Learning algorithm.
- Parameter optimization.
- Model evaluation.
The important difference from traditional machine learning is that it mainly relies on multilayer neural networks to learn complex data representations, rather than relying on relatively simple model structures and manual feature engineering.
IV. Core differences among AI, machine learning, and deep learning
After understanding the containment relationship among the three, we can compare them across multiple dimensions.
1. Comparison of core differences
| Comparison dimension | AI | Machine learning ML | Deep learning DL |
|---|---|---|---|
| Chinese name | Artificial intelligence | Machine learning | Deep learning |
| Technical positioning | Comprehensive research field | Important branch of AI | Important branch of ML |
| Core objective | Achieve intelligent behavior | Learn patterns from data | Learn complex feature representations |
| Technical methods | Rules, logic, learning, search, etc. | Statistical learning, optimization algorithms, etc. | Multilayer neural networks |
| Whether model training is required | Not necessarily | Usually required | Usually required |
| Whether neural networks are required | No | No | Yes |
| Whether it depends on data | Depends on the specific method | Usually depends | Usually highly dependent |
| Computational resources | Depends on the specific implementation | Depends on the algorithm | Usually has high computational requirements |
| Interpretability | Depends on the technical approach | Some models are easier to explain | Usually harder to explain directly |
| Typical technologies | Expert systems, logical reasoning | Decision trees, SVM, XGBoost | CNN, RNN, Transformer |
2. Differences in feature engineering
Feature engineering is a very important task in traditional machine learning.
Features are data attributes that can help a model complete a prediction task.
For example, when developing a house price prediction model:
Raw data may include:
- House area.
- City.
- District.
- Floor.
- Year built.
- House type.
Developers need to design features suitable for the model based on business and data characteristics.
For example:
- House age.
- Distance to the subway.
- Price per unit area.
- Number of surrounding amenities.
These features may need to be manually calculated, encoded, and selected.
Traditional machine learning usually relies heavily on feature engineering.
Deep learning, however, can learn data representations layer by layer through neural networks, and in complex data domains such as images, text, and audio, it can significantly reduce reliance on manual feature design.
But this does not mean that deep learning does not need feature engineering at all.
Data cleaning, normalization, data augmentation, input encoding, feature selection, and other tasks remain very important in deep learning projects.
3. Differences in data volume and computational resources
Traditional machine learning and deep learning usually differ in data and computing power requirements.
| Comparison dimension | Traditional machine learning | Deep learning |
|---|---|---|
| Data scale | Small and medium-sized datasets may also perform well | Usually benefits from large-scale data |
| Computational resources | CPU can usually meet the needs of many tasks | Complex models usually require GPUs or other acceleration devices |
| Model parameters | Relatively few | May reach millions, billions, or even more |
| Feature processing | Usually requires more manual design | Can automatically learn complex representations |
| Training cost | Usually relatively low | Training large models can be very costly |
| Applicable data | Performs prominently on structured data | Performs prominently on complex data such as images, text, and audio |
It should be emphasized:
This is only a general trend, not an absolute rule.
For example, XGBoost remains very competitive in many structured data tasks, while small neural networks can also run with less data and lower computing power.
Model performance ultimately depends on data quality, task characteristics, model selection, training method, and evaluation criteria.