1. Home
  2. Explore
  3. Computer Science
  4. Introduction to Deep Learning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to Deep Learning

Speaker 1Speaker 2

Introduction to Deep Learning

19:36
0:00-19:36
  1. Anna

    Why is deep learning worth studying now? Machine learning has gone from often not working to influencing almost every part of society. In just the last week, many people have probably encountered AI-assisted writing, text generation, image generation, code tools, games, 3D reconstruction methods such as NeRF, or systems such as AlphaGo.

  2. Michael

    So what exactly do we mean by deep learning? Two ideas are central. The first is neural networks: machine-learning architectures built from stacks of linear transformations with pointwise nonlinearities between them. The second is differential programming, where parts of a program are parameterized and gradient-based optimization tunes those parameters, usually toward at least a local optimum.

  3. Anna

    And the course treats both theory and practice as essential. Students will get a theoretical grounding in important deep-learning building blocks, while also implementing, understanding, and using those blocks. The philosophy is that progress in the field has come from combining mathematical ideas with practical advances in programming, hardware, data, and experimentation.

  4. Michael

    The grading reflects that practical and theoretical balance. Problem sets make up 65 percent of the grade, divided into five assignments lasting roughly one to two weeks each. They may include written work, perhaps using Overleaf, as well as code. The remaining 35 percent is a final research project.

  5. Anna

    That final project is meant to deepen understanding of course topics through innovative research. Students first submit a project proposal, and the final deliverable is a blog post demonstrating novel experimentation and visualization. The blog format reflects current machine-learning research, where explaining technical work in a catchy, visual, and possibly interactive way is increasingly valuable without removing the technical content.

  6. Michael

    Projects can be done individually or in groups of no more than two people. There is also an important resource limitation: the course cannot promise substantial computing power. A project should not depend on training a huge architecture on enormous datasets to reach state-of-the-art results, because students will not be able to compete with organizations spending millions of dollars on large-scale training.

  7. Anna

    That limitation is actually part of the research lesson. Good research does not have to mean bigger models and larger datasets. Students are encouraged to be creative and explore impactful questions that do not depend on the idea that bigger is always better. The project can be applied or theoretical, as long as the proposed work is innovative.

  8. Michael

    The course is advanced graduate-level deep learning, not an introductory class. Its schedule begins with neural-network building blocks and course signposting, then moves through training neural networks, approximation theory, architectures involving grids and graphs, optimization scaling rules, generalization theory, transformers, memory, representation learning, generative models, out-of-distribution generalization, transfer learning, large language models, scaling laws, and automatic gradient descent.

  9. Anna

    There may also be guest lectures later in the semester, and near the end there will be class-wide project office hours with instructors and teaching assistants. Those office hours are designed for open discussion and project help before the final projects are due. Students who need a PyTorch refresher are strongly encouraged to attend one of two PyTorch tutorials offered the following week.

  10. Michael

    PyTorch is especially relevant because some problem sets provide code written in PyTorch for students to complete. Other frameworks may be acceptable for the final project, but rewriting all the provided assignment code in another framework would be unnecessary work. So familiarity with PyTorch is strongly recommended.

  11. Anna

    The collaboration policy is equally important. Every problem set must be an individual's own work, including the code. Students may discuss the material with peers, teaching assistants, and instructors, but they may not copy or share complete solutions, submit someone else's code, or have another person verify whether a proposed solution is correct.

  12. Michael

    If students collaborate with people other than teaching staff, they should list those collaborators' names at the top of the assignment. The point is not to forbid discussion; it is to preserve independent thought. Working through a problem independently, even if the result is imperfect, produces more useful learning and feedback than submitting copied work.

  13. Anna

    The same principle applies to AI assistants. Students are encouraged to experiment with current AI technology, but they should treat an AI assistant like a human classmate. Asking contextual questions, discussing ideas, clarifying lecture material, or getting tips for starting is acceptable. Asking the assistant to provide the solution or write the code is not.

  14. Michael

    And if an AI assistant is used on a problem set, students should record which AI they used and how they used it. A useful ethical test is: would you ask a classmate to do this? You can show your work to teaching assistants, too, but they will guide you toward figuring it out yourself rather than simply telling you the answer.

  15. Anna

    At a high level, deep learning is useful because we want to model complex phenomena in the real world. Examples include natural language, images, videos, DNA, ecosystems, and climate change. These are difficult precisely because they contain many interacting patterns. The human brain offers one existence proof that a system can model highly complex phenomena, even though artificial systems achieve that in a very different way.

  16. Michael

    The history of neural networks helps explain the current moment. In 1958, Frank Rosenblatt introduced the perceptron, arguably the first neural network. It combined inputs such as pixels, summed them, applied a nonlinearity, and produced a category. That basic pattern still appears throughout modern deep-learning systems.

  17. Anna

    The enthusiasm did not last continuously. In 1972, Minsky and Papert's expanded book on perceptrons gave a careful mathematical account of their limitations and criticized the idea that a perceptron could be treated as a serious model of the brain. Enthusiasm for neural networks declined sharply during the 1970s.

  18. Michael

    Then, in 1986, Parallel Distributed Processing helped revive the field by introducing backpropagation as a way to train multilayer perceptrons. Instead of using only one perceptron, researchers could stack multiple layers and propagate gradients backward through them. This made it possible to solve problems such as XOR, which cannot be handled by a single linear classifier.

  19. Anna

    In 1998, Yann LeCun's work on convolutional neural networks provided another important architecture. Yet by the 2000 NeurIPS conference, terms such as neural and network were associated with paper rejection, while belief propagation and Gaussian were more predictive of acceptance. This period is often called an AI winter: the field had theoretical building blocks, but lacked efficient training methods, suitable programming perspectives, and adequate hardware.

  20. Michael

    A major turning point came in 2012 with AlexNet, another convolutional neural network. Alex Krizhevsky figured out how to use graphics processing units, or GPUs, for neural-network training. GPUs had been designed for massively parallel multiplication in graphics and video games, but they were well suited to the repeated matrix operations in neural networks.

  21. Anna

    AlexNet dramatically outperformed competing methods on ImageNet, one of the first very large-scale curated datasets of its kind. The lesson is that theory alone was not enough. Progress also required efficient programming, specialized hardware, and large-scale labeled data. Machine learning still depends heavily on large, curated datasets, although self-supervised learning is making it possible to rely less exclusively on labels.

  22. Michael

    Deep learning today combines several ingredients. Autograd systems in tools such as PyTorch and TensorFlow implement ideas like the chain rule in software and make use of available hardware. Modern systems also use datasets with more than a billion data points, parallel training across thousands of GPUs, architectures with more than a billion parameters, and training costs that can reach millions of dollars.

  23. Anna

    Those resources have produced results that were once unexpected, from generating text and images to solving difficult visual and language tasks. But large scale is not automatically necessary. Stable Diffusion is an example of a comparatively lightweight system that was still highly impactful. The field also benefits from open-source modular reuse, in which trained weights or model components are reused inside larger systems.

  24. Michael

    That openness is changing, though. Some systems provide an application programming interface without releasing their weights or architecture. So while open-source reuse has driven major progress, access to the complete model is becoming less common for some of the largest systems.

  25. Anna

    The course assumes students have already encountered gradient descent. In gradient descent, we seek parameters that minimize a cost function over the training data. Starting from some parameter setting, we calculate the gradient, update the model parameters in the direction that reduces the loss, and repeat the process, with a learning rate controlling the step size.

  26. Michael

    The course will go deeper into backpropagation and differential programming: how software can be structured so that gradients flow through parameterized components of a program. Students are also expected to know multilayer perceptrons and common nonlinearities such as ReLUs. A neural network often maps a vector input to a vector output through repeated computational building blocks.

  27. Anna

    A single linear layer can be written component by component. For output component z sub j, we sum each input component multiplied by its corresponding weight and then add a bias. In vector notation, that is a weighted combination such as x transposed times the weight vector plus a bias. The model parameters, usually called theta, include all weights and all biases across the network.

  28. Michael

    What makes the network more than one large linear transformation is the pointwise nonlinearity. A simple threshold function that outputs one when z is positive and zero otherwise can produce a perceptron, but it is a poor choice for gradient-based learning. Its gradient is zero almost everywhere, so backpropagation provides no useful direction for updating the parameters.

  29. Anna

    A single perceptron can perform linear classification. With two input dimensions, the weighted sum creates a plane, and thresholding that plane creates a linear decision boundary. If the data is linearly separable, changing the weights and bias can move that boundary from a poor fit with many misclassifications to a fit that classifies every training example correctly.

  30. Michael

    Other nonlinearities address the training problem more smoothly. Tanh is bounded between minus one and one, has outputs centered around zero, and avoids arbitrarily large activations. However, its gradient saturates toward zero for very large positive or negative inputs, which weakens the training signal in those regions.

  31. Anna

    The sigmoid function is bounded between zero and one and was initially interpretable as a neuron's firing rate. But it also has saturated gradients, and its outputs are centered around 0.5 rather than zero, creating less favorable conditioning. In modern practice, ReLU, the maximum of zero and z, is often the default.

  32. Michael

    ReLU is efficient to implement and often speeds convergence; one result discussed in the lecture found roughly a sixfold speed-up over tanh in a particular Krizhevsky model. Its derivative is essentially a step function. The tradeoffs are that positive activations are unbounded, which can contribute to exploding gradients, and units that remain strongly negative can become dead because their gradient is zero.

  33. Anna

    There is no universal rule saying which activation function is best for every dataset. ReLU is widely used because of experimental success, but specialized cases can motivate other choices. For example, if the relevant features are naturally sinusoidal, a sinusoidal activation or Fourier representation might make sense. Choosing activations remains partly an empirical and theoretical research question.

  34. Michael

    Stacking layers creates the key expressive power of deep networks. One layer computes a nonlinear transformation of the input, and a second layer applies another weighted combination and nonlinearity to the first layer's output. In matrix form, the hidden representation can be written as a nonlinearity applied to a weight matrix times the input plus a bias vector, and the next layer repeats that operation on the hidden representation.

  35. Anna

    The reason stacking helps is that nonlinear combinations of simple linear pieces can create nonlinear decision boundaries. A two-layer network can combine ramp-like responses from different first-layer units into a peaked or triangular shape, then threshold that shape to classify a nonlinearly separable pattern. A single-layer network cannot solve XOR, but a multilayer network can.

  36. Michael

    This leads to approximation theory. A single layer can represent linear decision surfaces, while a network with at least two layers and a nontrivial nonlinearity can, in theory, approximate any function, given enough capacity. Without the nonlinearity, stacking linear layers still produces only a linear transformation.

  37. Anna

    The catch is efficiency. A sufficiently wide two-layer network may approximate a highly complicated function, but it might require thousands or millions of dimensions and therefore many parameters. A narrower, deeper model can often approximate a similar function more efficiently by composing many layers. The course will study what can be approximated and how depth and width affect that efficiency.

  38. Michael

    Different architectures exploit different structures in data. The course will discuss convolutional neural networks, graph neural networks, transformers, and recurrent neural networks. In a deep cascade, earlier layers can form lower-level representations, while later layers combine them into more abstract computations, such as recognizing an object or translating between languages.

  39. Anna

    The course also examines generalization: why a model performs well on new data rather than merely memorizing its training examples. Deep networks contain so many parameters that, in principle, they could behave like lookup tables. Classical theory suggests that excessive capacity should cause overfitting, but modern experiments show a phenomenon called double descent, where performance can improve again after the model becomes sufficiently overparameterized to interpolate the training data.

  40. Michael

    Capacity refers here to the number of model parameters, influenced by both width and depth. Overfitting means fitting the training examples in a way that generalizes poorly, while overparameterization describes having more parameters than might traditionally have been considered appropriate. The modern picture does not mean resources are irrelevant: compute, memory, and available data still impose practical limits.

  41. Anna

    Data size matters too. With too few training examples, a model may memorize those examples, and it will not have enough coverage of the underlying distribution to learn how to interpolate or generalize between them. This is especially important in fields where data is scarce, so researchers use techniques intended to discourage overfitting and encourage useful representations.

  42. Michael

    There is also no perfect recipe for choosing width versus depth or guaranteeing interpretability. Very wide models can be difficult to interpret, and very deep models can be difficult to interpret as well. In some applications, researchers still prefer simpler models such as generalized additive models because interpretability is especially important.

  43. Anna

    For classification, students are expected to know softmax and cross-entropy loss. A network's final output can be normalized into scores that are treated as a distribution over classes. The predicted class is often the class with the largest score, while cross-entropy compares the predicted distribution with the one-hot ground-truth vector, which is zero everywhere except at the correct class.

  44. Michael

    If the model assigns high score to the correct class, the loss is small; if it assigns high score to an incorrect class, the loss is large. The training process repeatedly predicts on examples, calculates the loss, and adjusts the model's many weights and biases so that the desired outputs become more likely. Strictly speaking, the normalized outputs are model scores rather than guaranteed true probabilities.

  45. Anna

    Tensor computation makes this process efficient. A tensor is a multidimensional array, and neural-network data, parameters, and intermediate representations can all be represented as tensors. Instead of processing every example separately, a batch of examples can be stacked and passed through the same matrix multiplications in parallel.

  46. Michael

    That is why GPUs are so useful: neural networks can be rewritten largely as collections of parallel multiplications and pointwise operations. A batch of input vectors is multiplied by a weight matrix, passed through a nonlinearity, multiplied by another weight matrix, and so on. Automatic differentiation then supplies the gradients needed to update the parameters.

  47. Anna

    A major theme of the course is representation learning. Instead of learning a separate lookup table for every task, a network can discover lower-level building blocks that are reusable. To recognize the letter T, for instance, it may be more efficient to reuse representations of lines and learn how their orientations and connection point combine than to learn the entire T pattern from scratch.

  48. Michael

    Analyses of convolutional networks often show this progression. Early layers respond to simple properties such as directional light-and-dark gradients, so examples are not necessarily clustered by semantic category. Later layers combine those features into more complex concepts, and representations may then cluster images by categories such as different kinds of fish.

  49. Anna

    Representation learning connects directly to generative modeling, which the course will cover for both text and images. The topics include basic generative models, how learned representations interact with generation, and conditional models that generate outputs based on specified information.

  50. Michael

    Another connection is transfer learning and weight reuse. A model trained to recognize animals may learn early features such as lines, orientations, and structures that are also useful for satellite imagery. Reusing those components can reduce the data and compute needed for a new task, especially when it is impractical to train every representation from scratch.

  51. Anna

    The course will ask when those representations actually transfer and generalize, including from the perspective of both models and data. It will also examine out-of-distribution generalization: whether a model can remain useful when new inputs differ from the examples it saw during training.

  52. Michael

    Finally, scale is a central modern question. The lecture compared biological neural systems ranging from a worm with about 302 neurons, to a fruit fly with around 15,000, to humans with roughly 100 billion and elephants with about 250 billion. In artificial systems, the course will study how scaling affects optimization, what scaling laws describe, and how automatic methods might learn to optimize models more effectively.

  53. Anna

    So the overall story is not simply that bigger networks won. Deep learning emerged from the interaction of neural-network theory, backpropagation, automatic differentiation, efficient hardware, large datasets, and reusable representations. The course will use that foundation to study training, approximation, architectures, generalization, generation, transfer, and scaling in greater depth.

  54. Michael

    And the practical goal is to understand both how these systems work and how to investigate them responsibly. That means building models, reasoning about their mathematical structure, examining what they learn, designing projects that fit available resources, and communicating results clearly. Deep learning is powerful, but understanding its assumptions, limitations, costs, and generalization behavior is just as important as achieving impressive outputs.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent