Chapter 1: What is deep learning?
The chapter introduction frames deep learning against intense AI media hype and explains why practitioners need to distinguish significant developments from exaggerated claims.
After this chapter you will be able to
- AI Hype and Discernment. Explain why a machine-learning practitioner should look past AI media hype when judging developments, without claiming that this introduction provides a method for doing so.
- Scope of artificial intelligence. Explain that AI aims to automate intellectual tasks normally performed by humans and includes machine learning, deep learning, and approaches that do not learn.
- Symbolic AI and its limits. Explain how symbolic AI used programmer-written rules and why that approach worked better for well-defined logical problems than for fuzzy tasks such as image classification or speech recognition.
- Rules learned from examples. Explain how machine learning reverses conventional programming: instead of a person writing rules to turn inputs into answers, a system uses inputs and corresponding answers to infer rules. Describe how examples let it find statistical structure, such as associations between vacation photos and their tags.
- Inputs outputs and feedback. Describe the three things needed for machine learning: input data points, examples of expected outputs, and a way to measure how well current outputs match them. Explain that this measurement supplies feedback for adjustment, which the section calls learning.
- Task useful data representations. Explain what a representation is and why changing representations can make a particular task easier. Use the RGB and HSV example to show that the useful encoding depends on what one wants to do with the data.
- Automatic search versus handcrafting. Distinguish hand-designed representations and rules from machine learning’s automatic search for useful ones. Explain that feedback guides this search within a predefined hypothesis space, and why handcrafting becomes difficult for varied handwriting.
- Depth as layered representations. Explain that deep learning automatically learns successive layers of increasingly meaningful representations from training data, and that a model’s depth is the number of layers contributing to its representation of the data.
- Task useful digit representations. Trace the section’s digit-classification example: a deep network transforms an image through successive representations that become less like the original image and more informative about the digit being recognized.
- Weights as learned parameters. Explain that a layer’s weights are numbers that determine its transformation, and that learning finds weight values across the network that map example inputs to their targets.
- Loss as prediction feedback. Describe how a loss function compares a network prediction with the true target and produces a score indicating how well it did on that example.
- Loss-guided weight adjustment. Explain that the loss score supplies feedback for an optimizer to make small weight adjustments intended to lower the loss for the current example, without needing to explain backpropagation’s internal steps.
- Repeated training loop. Trace how training starts with random weights and high loss, then processes examples and repeatedly adjusts weights until the outputs become close to their targets.
- Automated feature engineering. Explain how deep learning simplifies machine-learning workflows by learning features instead of requiring people to engineer representations by hand.
- Hardware and data scalability. Explain the two reasons the section gives for deep learning's scalability: parallel computation and training on small batches.
- Model versatility and reuse. Describe how an existing deep learning model can be trained further or repurposed, including the section's idea of foundation models.
- Self-supervised foundation model training. Explain how foundation models derive training targets from their inputs, such as predicting the next word or reconstructing an image, and why this lets them train on vast amounts of unlabeled data.
- Prompting across many applications. Describe why a trained foundation model can handle a wide range of requests through prompts without special-purpose programming or retraining.
- Breadth of demonstrated applications. Explain how the section uses examples to show that deep learning has succeeded on many formerly difficult tasks and is being applied to problems across different fields.
- AI impact versus hype. Distinguish generative AI’s substantial, fast-growing impact from predictions of immediate mass unemployment or enormous productivity gains.
- Automation versus adaptable intelligence. Distinguish today’s cognitive automation from cognitive autonomy, including why a human-sounding answer does not by itself demonstrate intelligence in the sense used here.
- AI winter hype cycle. Explain how inflated expectations can lead to an AI winter when promised advances fail to arrive.
- Prospects for another winter. Explain why the author expects some deflation of current AI hype but considers a severe retreat from AI research unlikely.
- Short-term hype and long-term promise. Distinguish unrealistic short-term expectations from the section’s long-term claim that AI will become widely useful, while acknowledging that setbacks may occur along the way.
Section by section
Introduction
The chapter introduction frames deep learning against intense AI media hype and explains why practitioners need to distinguish significant developments from exaggerated claims.
- AI Hype and Discernment: Explain why a machine-learning practitioner should look past AI media hype when judging developments, without claiming that this introduction provides a method for doing so.
Why it matters: This perspective helps you approach claims about AI’s future without treating every announcement as a breakthrough.
Key terms: media hype, signal amid the noise, overhyped press releases
1.1 Artificial intelligence, machine learning, and deep learning
This section introduces the questions of what artificial intelligence, machine learning, and deep learning mean and how they relate, without yet answering them.
1.2 Artificial intelligence
Defines artificial intelligence as a broad field, traces its founding question, and contrasts rule-based symbolic AI with problems that motivated machine learning.
- Scope of artificial intelligence: Explain that AI aims to automate intellectual tasks normally performed by humans and includes machine learning, deep learning, and approaches that do not learn.
Why it matters: This distinction keeps AI from being confused with any one way of building it. - Founding question of AI: Describe the question that launched AI research and the conjecture behind the 1956 Dartmouth workshop.
Why it matters: The founding question explains why AI encompasses many kinds of intellectual abilities, not just learning. - Symbolic AI and its limits: Explain how symbolic AI used programmer-written rules and why that approach worked better for well-defined logical problems than for fuzzy tasks such as image classification or speech recognition.
Why it matters: Its limits explain why an approach beyond handcrafted rules became important.
Key terms: artificial intelligence, machine learning, deep learning, Dartmouth College, symbolic AI, hardcoded rules
1.3 Machine learning
This section introduces machine learning as a way to derive task rules from examples rather than write them explicitly, and describes its empirical, engineering-oriented character.
- Rules learned from examples: Explain how machine learning reverses conventional programming: instead of a person writing rules to turn inputs into answers, a system uses inputs and corresponding answers to infer rules. Describe how examples let it find statistical structure, such as associations between vacation photos and their tags.
Why it matters: This distinction explains what it means for a system to learn a task rather than follow hand-written instructions. - Machine learning as engineering: Distinguish machine learning from classical statistical analysis as the section does: it often handles large, complex datasets that make such analysis impractical, and it is driven by empirical findings and advances in software and hardware.
Why it matters: It helps explain why practical experiments and computing resources play such a prominent role in the field.
Key terms: machine learning, trained, input data, corresponding answers, statistical structure, mathematical statistics, large, complex datasets, empirical findings, engineering discipline
1.4 Learning rules and representations from data
This section explains machine learning as a feedback-guided search for data representations and rules that make a task easier to solve.
- Inputs outputs and feedback: Describe the three things needed for machine learning: input data points, examples of expected outputs, and a way to measure how well current outputs match them. Explain that this measurement supplies feedback for adjustment, which the section calls learning.
Why it matters: These three ingredients explain what guides a model toward useful outputs. - Task useful data representations: Explain what a representation is and why changing representations can make a particular task easier. Use the RGB and HSV example to show that the useful encoding depends on what one wants to do with the data.
Why it matters: The choice of representation can turn a difficult task into a simpler one. - Coordinate change classification example: Trace how a coordinate change gives the black and white points a new representation in which a simple rule based on the sign of x separates them.
Why it matters: The points make the benefit of a task-appropriate representation concrete. - Automatic search versus handcrafting: Distinguish hand-designed representations and rules from machine learning’s automatic search for useful ones. Explain that feedback guides this search within a predefined hypothesis space, and why handcrafting becomes difficult for varied handwriting.
Why it matters: This distinction explains both the appeal of learning from data and the limits on what an algorithm searches.
Key terms: input data points, expected output, feedback signal, learning, representation, RGB format, HSV format, data transformations, coordinate change, new representation
1.5 The “deep” in “deep learning”
This section defines deep learning by its successive learned representations, explains what “deep” means, and illustrates how those representations become useful for a task.
- Depth as layered representations: Explain that deep learning automatically learns successive layers of increasingly meaningful representations from training data, and that a model’s depth is the number of layers contributing to its representation of the data.
Why it matters: It gives “deep” a precise meaning rather than treating it as a claim about understanding. - Neural networks and biology: Describe neural networks as models with stacked layers that learn representations, while distinguishing their name and historical inspiration from a claim that they model the brain.
Why it matters: It prevents the name “neural network” from creating a misleading biological analogy. - Task useful digit representations: Trace the section’s digit-classification example: a deep network transforms an image through successive representations that become less like the original image and more informative about the digit being recognized.
Why it matters: The digit example makes the purpose of successive representations concrete.
Key terms: deep learning, representations, depth, shallow learning, neural networks, layers, digit classification, multistage information-distillation process
1.6 Understanding how deep learning works, in three figures
The section explains how a neural network learns by measuring its prediction error and repeatedly adjusting the weights that determine its transformations.
- Weights as learned parameters: Explain that a layer’s weights are numbers that determine its transformation, and that learning finds weight values across the network that map example inputs to their targets.
Why it matters: Weights are what training changes to improve the network’s predictions. - Loss as prediction feedback: Describe how a loss function compares a network prediction with the true target and produces a score indicating how well it did on that example.
Why it matters: The network needs a measurable error before its weights can be improved. - Loss-guided weight adjustment: Explain that the loss score supplies feedback for an optimizer to make small weight adjustments intended to lower the loss for the current example, without needing to explain backpropagation’s internal steps.
Why it matters: Feedback from loss connects measuring an error to changing the network. - Repeated training loop: Trace how training starts with random weights and high loss, then processes examples and repeatedly adjusts weights until the outputs become close to their targets.
Why it matters: Repeating small corrections explains how initially poor predictions can become useful ones.
Key terms: weights, parameters, layers, loss function, objective function, cost function, predictions, true target, distance score, feedback signal
1.7 What makes deep learning different
The section explains why deep learning stands out from earlier machine-learning approaches through simpler workflows, scalability, and reusable models.
- Automated feature engineering: Explain how deep learning simplifies machine-learning workflows by learning features instead of requiring people to engineer representations by hand.
Why it matters: This is why deep learning can make a machine-learning workflow simpler, not just produce a different model. - Hardware and data scalability: Explain the two reasons the section gives for deep learning's scalability: parallel computation and training on small batches.
Why it matters: Scalability helps explain why deep learning can benefit from more computing power and larger datasets. - Model versatility and reuse: Describe how an existing deep learning model can be trained further or repurposed, including the section's idea of foundation models.
Why it matters: Reusing a trained model makes its earlier training valuable beyond one fixed dataset or task.
Key terms: feature engineering, shallow learning, end-to-end deep learning model, Scalability, parallelization, GPUs, small batches of data, Versatility and reusability, continuous online learning, foundation models
1.8 The age of generative AI
This section explains how self-supervised learning enabled generative AI to scale and how foundation models can respond to many tasks through prompting.
- Self-supervised foundation model training: Explain how foundation models derive training targets from their inputs, such as predicting the next word or reconstructing an image, and why this lets them train on vast amounts of unlabeled data.
Why it matters: It explains how generative models can learn from far more data than methods that require people to label each example. - Prompting across many applications: Describe why a trained foundation model can handle a wide range of requests through prompts without special-purpose programming or retraining.
Why it matters: It connects a foundation model’s broad training to its ability to respond to new requests through prompts.
Key terms: foundation models, self-supervised learning, targets, unlabeled data, prompting, knowledge representations, fuzzy database
1.9 What deep learning has achieved so far
The section surveys deep learning’s rapid progress and the variety of tasks and real-world problems it now addresses.
- Progress across three waves: Describe the section’s progression from perceptual-task results to natural language processing and then generative AI applications.
Why it matters: This sequence puts the section’s examples in the context of how deep learning’s applications have expanded. - Breadth of demonstrated applications: Explain how the section uses examples to show that deep learning has succeeded on many formerly difficult tasks and is being applied to problems across different fields.
Why it matters: Concrete examples show why the section calls deep learning’s progress a technological revolution without treating its possibilities as exhausted.
Key terms: perceptual tasks, natural language processing tasks, generative AI applications, major breakthroughs, challenging problems, generative AI
1.10 Beware of the short-term hype
The section cautions against short-term AI hype by contrasting dramatic predictions with observed impact and distinguishing useful cognitive automation from adaptable intelligence.
- AI impact versus hype: Distinguish generative AI’s substantial, fast-growing impact from predictions of immediate mass unemployment or enormous productivity gains.
Why it matters: This distinction lets you recognize real progress without accepting every short-term prediction about it. - Near-term AGI belief chronology: Explain why the section says belief in near-term AGI preceded and helped fuel the rise of generative AI, rather than simply resulting from its successes.
Why it matters: The chronology helps you avoid treating AGI predictions as conclusions established by recent generative AI products. - Automation versus adaptable intelligence: Distinguish today’s cognitive automation from cognitive autonomy, including why a human-sounding answer does not by itself demonstrate intelligence in the sense used here.
Why it matters: This distinction is the section’s basis for skepticism about claims that impressive AI output means human-like autonomy is imminent.
Key terms: generative AI, hype, productivity, AGI, OpenAI, DeepMind, cognitive automation, cognitive autonomy, adaptability, intelligence
1.11 Summer can turn to winter
The section uses two past AI winters to explain the risk of inflated expectations and to assess whether today’s AI boom could end similarly.
- AI winter hype cycle: Explain how inflated expectations can lead to an AI winter when promised advances fail to arrive.
Why it matters: This pattern explains why short-term hype can harm long-term AI progress. - Two historical AI winters: Describe the two earlier AI winters and what disappointed expectations in each case.
Why it matters: The earlier winters show that the risks of overpromising are not merely hypothetical. - Prospects for another winter: Explain why the author expects some deflation of current AI hype but considers a severe retreat from AI research unlikely.
Why it matters: It separates a plausible correction in expectations from a prediction that AI research will collapse.
Key terms: AI winter, inflated short-term expectations, symbolic AI, expert systems, first AI winter, second AI winter, AI bubble, AI investment, full-scale retreat
1.12 The promise of AI
The section argues that AI’s growing real-world use supports a transformative long-term outlook, even if short-term hype and setbacks remain possible.
- Short-term hype and long-term promise: Distinguish unrealistic short-term expectations from the section’s long-term claim that AI will become widely useful, while acknowledging that setbacks may occur along the way.
Why it matters: It helps separate the author’s long-term argument from a claim that progress will be immediate or uninterrupted. - Present-day signs of progress: Describe how the section uses current AI applications to support its claim that a once-distant vision is beginning to materialize.
Why it matters: Concrete examples show why the author sees the long-term promise as more than a distant prediction.
Key terms: short-term hype, long-term vision, setbacks, AI chatbots, fully autonomous driving, accelerate science
Where this is used later
- From layers to models (chapter 3) · The account of learning representations within a predefined space of possibilities.
- A brief history of natural language processing (chapter 14) · The distinction between hand-specified rules and representations learned from data.
- A first look at a neural network (chapter 2) · The idea of deep learning as a sequence of representations.
- Various approaches to artificial intelligence (chapter 20) · layers and depth in deep learning
- Picking a loss function (chapter 3) · Choosing a loss function depends on its role in measuring prediction error.
- Chaining derivatives: The Backpropagation algorithm (chapter 2) · The later backpropagation section explains the algorithm named here for making learning possible.
- The full training loop (chapter 2) · The full training loop implements the repeated adjustments outlined here.
- Feature engineering (chapter 5) · Provides context for the role of feature engineering in machine learning.
Concepts explained in this chapter
- language modelA language model trained on large text corpora that can generate human-sounding responses, mentioned here as an example of a system that may be modular but still lacks recombination ability.
- trainingThe phase during which a model’s parameters are optimized from data before deployment for prediction.
- machine learningA class of methods that learn to map inputs to outputs by searching for useful representations and rules from example data and feedback.
- expressive powerThe capacity of a model architecture to represent more complex functions or patterns.
- generative modelingAI systems that generate new text, images, or other content in response to prompts by modeling the distribution of data.
- artificial intelligenceComputer systems that perform tasks associated with human intelligence, used here in a broad modern sense that the text argues is often closer to automation.
- neural network layerA neural-network building block that transforms one or more input tensors into one or more output tensors and may carry learned state.
- symbolic AIAn AI approach that represents knowledge and reasoning using explicit symbols and rules rather than learned representations.
- cognitive automationThe use of AI to automate tasks by encoding and operationalizing human skills and knowledge rather than achieving full human-like intelligence.
- foundational modelA model trained beforehand on large-scale data and then reused for downstream tasks or analysis without starting from scratch.
- backpropagationA PyTorch tensor method that triggers backpropagation from a loss tensor and fills gradients on participating tensors.
- embeddingAn ordered numeric representation used here to encode source tokens and target tokens for attention computations.
- objective functionA function that compares predictions with targets and returns a scalar indicating how wrong the model is for a given task.
- optimizationThe procedure that updates model parameters based on the loss, typically by a variant of stochastic gradient descent.
- feature engineeringThe manual design or transformation of input variables into representations better suited for a learning algorithm.
- prompt engineeringThe practice of crafting prompts to elicit better performance from a large language model on a task.
- RGBA color representation that encodes images using red, green, and blue channels.
- coordinate changeA transformation that converts data points into a different coordinate system to obtain a more useful representation.
- digital imageData in which each example is a 2D image with one or more color channels, typically stored as a rank-3 tensor per sample.
- labelThe desired output values that a model is trained to match for each input example.
- parameterA model parameter that is updated by backpropagation during training.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
