CS 329D: Machine Learning Under Distributional Shifts
The progress of machine learning systems has seemed remarkable and inexorable a wide array of benchmark tasks including image classification, speech recognition, and question answering have seen consistent and substantial accuracy gains year on year. However, these same models are known to fail consistently on atypical examples and domains not contained within the training data. The goal of the course is to introduce the variety of areas in which distributional shifts appear, as well as provide theoretical characterization and learning bounds for distribution shifts. Prerequisites: CS229 or equivalent. Recommended:
CS229T (or basic knowledge of learning theory).
Last offered: Spring 2023
| Units: 3
CS 329E: Machine Learning on Embedded Systems (EE 292D)
This is a project-based class where students will learn how to develop machine learning models for execution in resource constrained environments such as embedded systems. In this class students will learn about techniques to optimize machine learning models and deploy them on a device such as a Arduino, Raspberry PI, Jetson, or Edge TPUs. The class has a significant project component. Prerequisites:
CS 107(required),
CS 229 (recommended),
CS 230 (recommended).
Last offered: Spring 2025
| Units: 3
CS 329H: Machine Learning from Human Preferences
Human preference data has become crucial to the success of Machine Learning (ML) systems in many application domains, from personalization to post-training of language models. As ML systems are more and more widely deployed, understanding models, methods, and algorithms for learning from preference data becomes important for both scientists and practitioners. This course covers learning from preferences in supervised, active, and reinforcement/assistance settings, and covers aspects specific to preference data, such as preference heterogeneity and aggregation, interpretation of human feedback, and privacy. In coding tasks, students implement supervised reward modeling and assistance games.
Terms: Aut
| Units: 3
Instructors:
Haupt, A. (PI)
;
Koyejo, S. (PI)
;
Chen, E. (TA)
;
Doumbouya, M. (TA)
;
Mandyam, A. (TA)
CS 329M: Machine Programming
The field of machine programming (MP) is concerned with the automation of software development. Given the recent advances in software algorithms, hardware efficiency and capacity, and an ever increasing availability of code data, it is now possible to train machines to help develop software. In this course, we teach students how to build real-world MP systems. We begin with a high-level overview of the field, including an abbreviated analysis of state-of-the-art (e.g., Merly Mentor). Next, we discuss the foundations of MP and the key areas for innovation, some of which are unique to MP. We close with a discussion of current limitations and future directions of MP. This course includes a nine-week hands-on project, where students (as individuals or in a small group) will create their own MP system and demonstrate it to the class. This course is primary intended for graduate students (it is not recommended for undergraduate students without first reviewing that the course prerequisites are met).
Last offered: Autumn 2024
| Units: 3-4
CS 329P: Practical Machine Learning
Applying Machine Learning (ML) to solve real problems accurately and robustly requires more than just training the latest ML model. First, you will learn practical techniques to deal with data. This matters since real data is often not independently and identically distributed. It includes detecting covariate, concept, and label shifts, and modeling dependent random variables such as the ones in time series and graphs. Next, you will learn how to efficiently train ML models, such as tuning hyper-parameters, model combination, and transfer learning. Last, you will learn about fairness and model explainability, and how to efficiently deploy models. This class will teach both statistics, algorithms and code implementations. Homeworks and the final project emphasize solving real problems. Prerequisites: Python programing and machine learning (
CS 229), basic statistics. Please view course website here: https://c.d2l.ai/stanford-
cs329p/
Last offered: Autumn 2021
| Units: 3-4
CS 329R: Race and Natural Language Processing (CSRE 329R, LINGUIST 281A, PSYCH 257A)
The goal of this practicum is to integrate methods from natural language processing with social scientific perspectives on race to build and/or analyze practical systems that address significant societal issues. Readings will be drawn broadly from across the social sciences and computer science. Projects may include large, complex datasets and involve community partnerships relevant to race and natural language processing. Graduate standing and instructor permission required. Students interested in participating should complete the online application for permission. Limited enrollment.
Terms: Aut
| Units: 3
CS 329S: Machine Learning Systems Design
This project-based course covers the iterative process for designing, developing, and deploying machine learning systems. It focuses on systems that require massive datasets and compute resources, such as large neural networks. Students will learn about data management, data engineering, approaches to model selection, training, scaling, how to continually monitor and deploy changes to ML systems, as well as the human side of ML projects. In the process, students will learn about important issues including privacy, fairness, and security. Pre-requisites: At least one of the following;
CS229,
CS230,
CS231N, CS224N or equivalent. Students should have a good understanding of machine learning algorithms and should be familiar with at least one framework such as TensorFlow, PyTorch, JAX.
Last offered: Winter 2022
| Units: 3-4
CS 329T: Trustworthy Machine Learning: Building and evaluating agentic systems
This project-based course will introduce students to building and evaluating agentic AI applications powered by foundation models. The overriding theme of the course is that building an initial prototype AI system can often be completed easily but refining a prototype into something that is useful and reliable requires iterative improvement based on clear evaluation metrics. We will cover background in foundation models, prompting, and retrieval-augmented generation (RAG) before introducing full agentic AI architectures. For each architecture, the course will study methods for evaluation. Students will complete introductory homework assignments to become familiar with retrieval-augmented generation (RAG) and agentic AI. Students will then work in pairs or small teams to develop applications using agentic or other approaches and evaluate them by adapting evaluation methods presented in the class.Prerequisites: CS229 or similar introductory Python-based ML class; knowledge of deep learning such as
CS230,
CS231N; familiarity with ML frameworks in Python (scikit-learn, Keras) assumed.
Terms: Aut
| Units: 3
CS 329X: Human Centered NLP (CS 129X)
Recent advances in natural language processing (NLP), especially around large pretrained models, have enabled extensive successful applications. However, there are growing concerns about the negative aspects of NLP systems, such as biases and a lack of input from users. This course gives an overview of human-centered techniques and applications for NLP, ranging from human-centered design thinking to human-in-the-loop algorithms, fairness, and accessibility. Along the way, we will cover machine-learning techniques which are especially relevant to NLP and to human experiences. Prerequisite: CS224N or
CS224U, or equivalent background in natural language processing. Prerequisite: CS224N or
CS224U, or equivalent background in natural language processing.
Terms: Aut
| Units: 3-4
CS 330: Deep Multi-task and Meta Learning
While deep learning has achieved remarkable success in supervised and reinforcement learning problems, such as image classification, speech recognition, and game playing, these models are, to a large degree, specialized for the single task they are trained for. This course will cover the setting where there are multiple tasks to be solved, and study how the structure arising from multiple tasks can be leveraged to learn more efficiently or effectively. This includes: goal-conditioned reinforcement learning techniques that leverage the structure of the provided goal space to learn many tasks significantly faster; meta-learning methods that aim to learn efficient learning algorithms that can learn new tasks quickly; curriculum and lifelong learning, where the problem requires learning a sequence of tasks, leveraging their shared structure to enable knowledge transfer. This is a graduate-level course. By the end of the course, students should be able to understand and implement the state-of-the-art multi-task learning algorithms and be ready to conduct research on these topics. Prerequisites:
CS 229 or equivalent. Familiarity with deep learning, reinforcement learning, and machine learning is assumed.
Last offered: Autumn 2023
| Units: 3
