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

Study methods

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

Introduction to Machine Learning

Speaker 1Speaker 2

Introduction to Machine Learning

15:42
0:00-15:42
  1. Simon

    Welcome to the course. This first lecture is deliberately low-key: it’s an introduction to the teaching team, the background you’ll need, and the major ideas we’ll study. We’ll stay at a high level today rather than diving into technical details.

  2. Corey

    And the course has two instructors, you and Chris. Chris isn’t here for this lecture, but he’ll start teaching from the next one. His work ranges across AI, large language models, efficiency, and databases, while your background began with deep-learning theory and has expanded into empirical work, AI for science and mathematics, self-improving algorithms, and training large language models.

  3. Simon

    Right. Before we get to the course topics, let’s talk about preparation. Students should have some background in probability and linear algebra, along with the relevant computer science foundations. The listed course numbers on the syllabus may be a little out of date, so equivalent courses can also provide the right background.

  4. Corey

    And if someone is missing just a few pieces, there are ways to catch up. The Friday TA lectures and sections cover some of those foundations. But if the material is entirely unfamiliar, the recommendation is to take the preparation course first rather than trying to catch up on everything at once.

  5. Simon

    One thing I want to emphasize is that this is still a mathematically intensive course. We’re focused on fundamentals: mathematical modeling, formulations, derivations, and understanding the ideas behind algorithms. It isn’t primarily a programming course, although code and algorithms are part of the picture.

  6. Corey

    So probability and linear algebra aren’t just boxes to check. They help you understand how the models are described and trained. The course aims to explain the foundations, not necessarily to prove theorems or teach a collection of coding recipes.

  7. Simon

    We should also clarify the policy on AI tools, since that matters more and more. You’re allowed to use them, but you can’t copy their results directly into a submission or have them generate code that goes straight into your answers. The detailed rules are on the course website, and the teaching staff can clarify questions.

  8. Corey

    The idea is to treat an AI tool more like a collaborator than a machine that completes the assignment for you. The goal of the course is to train your own understanding—not to train an agent to understand the material on your behalf. Those rules are meant to support learning, even if they feel restrictive.

  9. Simon

    The course takes a fairly traditional view of machine learning, but that’s intentional. The way people use models has changed dramatically: instead of building complicated pipelines, people may prompt a model directly or create skills with tools. But the underlying methods for training models remain closely connected to earlier machine-learning ideas.

  10. Corey

    So we won’t spend much time teaching how to use a particular coding assistant. We’ll focus more on the fundamental technology for training and tuning models. The course has also removed some outdated material, but many basic definitions and methods remain useful.

  11. Simon

    A classic definition of machine learning, dating to 1959, describes it as giving computers the ability to learn without being explicitly programmed. In the chess example, explicit programming would mean writing out rules for how to play. Learning instead means using data to train a model that predicts or chooses moves.

  12. Corey

    A later definition, from Tom Mitchell in 1998, makes the pieces more precise. A program learns from experience, E, with respect to a task, T, and a performance measure, P, if its performance on T, measured by P, improves with experience E. In that framing, experience is often data, the task is what the model must do, and the performance measure tells us what counts as improvement.

  13. Simon

    Those terms have broadened over time. Experience can mean web data, real-world data, human-labeled examples, or even synthetic data and tokens generated by models. Tasks used to be very specific, such as classifying images or predicting prices; now a single model may be used across many tasks. And we still need a performance measure, such as accuracy or a game’s win rate, to give learning a goal.

  14. Corey

    The improvement part is important, too. If a model sees more experience but doesn’t get better at its task, then it hasn’t learned in the sense of that definition. For a game, the experience is the data, the task is playing the game, and the performance measure might be the probability of winning.

  15. Simon

    There isn’t one universally accepted taxonomy of machine learning, especially while the field is changing so quickly. A useful way to organize the course is supervised learning, unsupervised learning, and reinforcement learning. They overlap, and you can think of them as methods or learning paradigms rather than just as end goals.

  16. Corey

    For instance, supervised fine-tuning—often abbreviated SFT—is one form of supervised learning used in building more general-purpose agents. So these categories don’t necessarily describe the ultimate purpose of a model; they describe approaches used to train it.

  17. Simon

    Let’s start with supervised learning. Imagine a dataset of houses, where each example has an input, X, and an output, Y. If X is the square footage and Y is the price, the goal is to learn a relationship that lets us predict the price of a new house from its square footage.

  18. Corey

    A simple approach might fit a line through the data points. A quadratic curve might fit better in some cases and lead to different predictions. In the next few lectures, students will learn how to fit functions like these, along with the loss functions and optimizers used to train them.

  19. Simon

    Of course, square footage isn’t the only feature that matters for a house. You might also use lot size, number of floors, condition, or ZIP code. With more inputs, the problem becomes higher-dimensional, even if we can’t easily draw it as a simple two-axis plot.

  20. Corey

    The course will use input and output as common terms, but you’ll encounter other words. Inputs may be called features, and the known outputs in a dataset may be called labels. Providing an output for a particular input is called labeling, whether that label comes from a person or a machine.

  21. Simon

    The type of output gives us another important distinction: regression versus classification. If the output is continuous, like a house price, the problem is regression. If the output is a discrete choice, like house versus townhouse, it’s classification.

  22. Corey

    For classification, picture houses represented by points with two inputs, such as square footage and lot size. A classifier might divide that plane into regions, assigning one side to houses and the other to townhouses. That’s a simple illustration of how a model can make discrete predictions from its inputs.

  23. Simon

    Classification is still central in modern AI. When a language model predicts its next token, it chooses among many discrete possibilities. So next-token prediction can be viewed as classification over a large set of possible tokens.

  24. Corey

    Supervised learning covers more than price prediction and house labels. In image classification, the input is the image’s raw pixels and the output is a label for its main object. The lecture described ImageNet as a landmark dataset, with about a million image-and-label pairs at a time when the next-largest dataset was around fifty thousand.

  25. Simon

    That scale helped make image classification a major success story. The AlexNet paper, by Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton, trained on ImageNet and achieved striking results. The lecture described that moment as part of the beginning of the recent AI era, followed by waves of progress in vision, language, and then large language models.

  26. Corey

    The example also shows how a task can be limited. That image dataset supported assigning a label to an image; it didn’t let you ask every possible question about that image. The lecture contrasted early results of roughly 50 percent accuracy with much higher results—around 95 to 97 percent—reported today.

  27. Simon

    Other supervised tasks produce different outputs. Object localization predicts bounding boxes, described by four numbers for the corners of a rectangle around an object. Machine translation takes text in one language as input and produces text in another language. In this course, though, the emphasis is on the fundamental techniques behind applications, often demonstrated with simpler examples.

  28. Corey

    Deep learning is one of the techniques that made many of these applications possible. A deep network can have a very large number of parameters, and it maps inputs—like image pixels—to outputs such as labels. The course will introduce network basics, loss functions, and how training works.

  29. Simon

    A key training tool is backpropagation. Once we define a loss function, backpropagation lets us compute gradients through a complicated model, which helps us update its parameters. The course plans to cover these neural-network fundamentals and training methods in later lectures.

  30. Corey

    Now contrast supervised learning with unsupervised learning. In unsupervised learning, you’re given inputs but not the desired outputs. You may have a collection of houses, for instance, without labels telling you which are houses or townhouses, and you try to find patterns in the inputs themselves.

  31. Simon

    That goal is less sharply defined than supervised prediction. What counts as an interesting structure can depend on the method you choose; different methods may reveal different patterns. One example is clustering, which groups data points that are similar to one another.

  32. Corey

    With a two-dimensional plot, some clusters may be obvious to a person. But real examples can be much more complicated. In the course’s later lectures on unsupervised learning, students will look at clustering algorithms and the objectives or loss functions that guide them.

  33. Simon

    One application is gene-expression data. If you organize measurements across individuals, patterns may emerge: some individuals have similar gene-expression profiles, while others form a different group. Clustering can help identify groups and support investigation of relationships between genes, diseases, or symptoms.

  34. Corey

    Documents can also be grouped without labels. You can make a table that counts how often each word appears in each document. Once the documents and words are reordered to reveal the patterns, groups of related documents become visible—for example, documents with many mentions of shuttles, space launches, and boosters, or documents focused on air pollution and the environment.

  35. Simon

    That family of methods includes latent semantic analysis, or LSA. It can help uncover similarities among both words and documents by looking at patterns in word counts. The course will introduce this kind of method as part of its treatment of unsupervised learning.

  36. Corey

    Another way to represent language is with embeddings: numerical vectors for words. Similar words can have nearby vectors in a high-dimensional space. Some relationships can also appear as directions: the lecture’s example was a direction connecting a country to its capital, which can be used to illustrate relationships such as Italy and Rome or France and Paris.

  37. Simon

    Those representations were learned from large collections of unlabeled text, such as Wikipedia, in the period around 2014 and 2015. Wikipedia was an important corpus for those examples, though the lecture noted that it is a much smaller share of the text used in training models today. We’ll study how these kinds of language representations can be learned.

  38. Corey

    Large language models take the idea of learning from massive text collections toward general-purpose use. Instead of focusing only on one relationship among words or documents, a chat model can respond to many kinds of requests. The course will look at their architectures and the loss functions used to pretrain them.

  39. Simon

    It will also discuss prompting and how models are trained to follow instructions. A model’s response can depend on how a question is phrased, and models have become more responsive to instructions through additional training. The course will examine that training process, not just how to use a model.

  40. Corey

    Image generation is another topic. Diffusion models can generate realistic images from noise or from instructions. The lecture framed this as an unsupervised-learning example: rather than relying on labels for each image, the model learns from a collection of images and can generate new ones with similar characteristics.

  41. Simon

    That brings us to reinforcement learning. The traditional picture is a task involving sequential decisions, such as playing Go or controlling a robot. At each step, the system chooses an action; that action affects what happens next, so a bad choice may make it harder to recover later.

  42. Corey

    A robot learning to walk makes the sequence easy to see. It has to decide how to move its arms and legs, and its choices affect whether it stays upright or falls. The learning process can improve the robot’s behavior over repeated attempts.

  43. Simon

    Reinforcement learning is also used to train language models, though the setting is different. A model generates text one token at a time: it produces a distribution, samples a token, then uses that token as context for generating the next one. Because these sampling steps are stochastic, training through the whole process is not always straightforward with ordinary differentiation.

  44. Corey

    You can view each generated token as a decision in a sequence. What the model generates first affects what it can generate next. Reinforcement-learning techniques such as policy gradients provide a way to optimize behavior in settings involving stochastic sampling.

  45. Simon

    Another major distinction is that reinforcement learning can collect new data interactively. In supervised and unsupervised learning, the training dataset is generally given, and the model learns from that dataset. In reinforcement learning, a system tries a strategy, receives feedback, and uses the resulting experience to guide another round of training.

  46. Corey

    For a robot, even a failed attempt can provide a trajectory: a sequence of observations and actions that ends in a fall. For automated theorem proving, a model can generate candidate proofs, have them checked, and use correct proofs as new training examples. That can create a bootstrapping cycle: more good examples may help the model produce more correct proofs.

  47. Simon

    A similar feedback loop can be used for language models. Given a user prompt, a model generates text; another module—perhaps a human, a reward model, or another language model—assigns a reward indicating how good that response is. Training can then use that reward to encourage better responses in future rounds.

  48. Corey

    This is where ideas such as reinforcement learning from human feedback, or RLHF, and rewards based on verification come in. They’re ways to use feedback to improve a model’s outputs, including its reasoning or long-form generation. The course will introduce policy gradients and related approaches at a high level.

  49. Simon

    There are also course topics beyond those main learning paradigms. One planned area is machine-learning systems: how software and hardware can work together more efficiently. Faster algorithms can have a major practical impact when the cost of running large models is high.

  50. Corey

    The course is also looking for a guest lecturer to cover fairness and AI’s social impact. The lecture highlighted that AI may replace many jobs, which makes it important to consider those effects alongside the technical methods.

  51. Simon

    So the overall path moves from the mathematical foundations and supervised learning to classification, deep learning, unsupervised learning, language models, image generation, and reinforcement learning. Along the way, we’ll focus on how the methods work and why they matter, rather than trying to cover every application.

  52. Corey

    And the big takeaway from this introduction is that machine learning is about improving performance through experience, with different paradigms describing how that experience and feedback are obtained. The course will build the mathematical tools to understand those approaches—and, importantly, help you learn the material yourself.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent