Maximilian Du

maxjdu at stanford dot edu

Google Scholar  /  GitHub  /  CV

Maximilian Du

Hey there! I am an undergraduate researcher at Stanford University. I study computer science, psychology (minor) and creative writing (minor). I work in Chelsea Finn's IRIS lab on robot learning.

Previously, I've worked on robots that learn from diverse data, reason across sensory inputs, and find best strategies through trial and error. During my Ph.D., I am interested in creating methods that allow robots to learn skills autonomously and adapt quickly to unexpected real-world situations. As part of this process, I hope to take inspiration from behavioral and cognitive sciences.

In my free time, I love to write short fiction and creative non-fiction. I'm working on a book that looks at the untold stories of marine mammal trainers.

Scroll down to see my research, teaching, writing, other projects, and course work. Feeling adventurous? Check these out as well:

Whale Book  /  Other Writing /  Course Notes


Robot Reading a Book

To Err is Robotic: Rapid Value-Based Trial-and-Error during Deployment

Maximilian Du, Sasha Khazatsky, Tobias Gerstenberg, Chelsea Finn
Submitted to Robotics: Science and Systems 2024

Most novel situations can be solved with a large enough skill repertoire, but it takes interactions to find the right skill for the task. A key component of this approach is knowing when to try something new. In this project, I develop a measurement of task progress that compares the robot's current strategy with a hypothetical expert. If the robot is progressing too slowly, the strategy is likely suboptimal and we should try a new strategy.

Robot Reading a Book

Behavior Retrieval: Few-Shot Imitation Learning by Querying Unlabeled Datasets

Maximilian Du, Suraj Nair, Dorsa Sadigh, Chelsea Finn
Robotics: Science and Systems 2023

In other fields of machine learning, large datasets are commonly used to help train new models. Analogously, we want to use pre-collected robotics datasets to learn a target task. However, diverse robot datasets may contain irrelevant or even counterproductive demonstrations, which may hinder the learning process. In this project, we proposed a data filtering method that intelligently extracts data from a diverse robot dataset based on its relevance to the target task.

Website  /  Paper  /  Code

Robot Reading a Book

Play it by Ear: Learning Skills amidst Occlusion through Audio-Visual Imitation Learning

Maximilian Du*, Olivia Lee*, Suraj Nair, Chelsea Finn
Robotics: Science and Systems 2022

In many situations, vision alone may not be sufficient to solve a task. For example, consider the task of grabbing car keys from a dark bag. We would reach into the bag by looking for the opening. Then, we might localize the keys by listening to the jangling noises. Ideally, a robot should be able to accomplish the same feat. We tackled this key extraction task on a real robot by using a third-person camera and a microphone attached to the robot's gripper.

Website  /  Paper  /  Code

Robot Reading a Book

Improving LSTM Neural Networks for Better Short-Term Wind Power Predictions

Maximilian Du
IEEE Renewable Energy and Power Engineering (REPE) 2019

Wind power is a crucial renewable energy source, but it is less stable than conventional energy sources. In this project, I created an autoregressive wind power predictor that can help power grids proactively balance grid loads. I gave the model context from weather stations, which doubled the accuracy of the wind power predictions.

Paper  /  Code

Teaching and Outreach

Robot Reading a Book

Can I Train my Robot like my Dog?

Reinforcement learning (RL) had origins in animal behavior theory, and in the past few decades, RL has been used anywhere from robotics to video recommender systems. But as RL became more advanced, it strayed somewhat from animal behavior and training. In this 105-minute talk, I try to hold both disciplines up to the light. There are definitely differences, but we discover that some of their challenges can be traced back to shared difficulties of perceiving and learning from an uncertain world.

I give this talk twice a year at Stanford Splash, an educational outreach program that serves students in the Bay area, especially students from underrepresented and disadvantaged backgrounds.

Slide Deck Sample  /  Stanford Splash Program

Robot Reading a Book

Section Leading for CS 106A/B

I was a section leader for Stanford's introductory CS106A and intermediate CS106B computer science courses. As a section leader, I hosted weekly sessions to review lecture content in a small group setting. I also hosted office hours, graded homeworks, provided interactive feedback, and helped graded exams.

Section Leading Program

Robot Reading a Book

Mentor for Deep Learning Portal

I will be a mentor for the Deep Learning Portal outreach program starting Fall 2023. The Portal is a program created from the IRIS lab and the Stanford CS department, designed to help disadvantaged students learn AI by providing access to existing online courses and hosting live office hours. I will be helping with office hours, where I will be debugging code and answering conceptual questions.

Deep Learning Portal Program


For research to make a positive impact, we need effective storytelling to give it a voice that speaks with clarity, truthfulness, and nuance. Outside of research papers, I work on short fiction and creative non-fiction. Currently, I'm mostly interested in the human-animal relationship, the immigrant identity, and trauma in places of paradise. We are distinct among all other animals, not because we have memory, but because we can process these lived experiences to an uncanny depth. An animal might run away from a terrible past experience, but we might run towards the fire. I'm interested in how we face this terrible, this untouchable. I'm interested in how we seize our pasts and make it our own. Find my writing here. One of my works has been the recipient of a Stanford Creative Writing Prize. I've advised numerous op-eds and long-form narratives, including one op-ed that started a national animal welfare movement.

I'm currently working on a non-fiction book that explores the human-animal relationship through people who work with animals. This work looks at ways we think of animals, ways we think of ourselves. It celebrates the uniqueness of humanity and the simultaneous lure of lives very different than our own. It also includes a new look on the commonly-misrepresented world of whale trainers: people who once rode killer whales in acrobatic shows, demonstrating powerful training techniques, uncanny athleticism, and ultimately, trust.

Selected Projects

Robot Reading a Book

Looking Under the Hood of DetectGPT

CS224N Final Project 2023

As Large Language Models (LLMs) become more advanced, there's a strong push to create effective detection algorithms. In this work, we look at a new detection algorithm originally proposed by Mitchell et al: DetectGPT. We proposed and tested ways of improving DetectGPT by focusing on parts of speech. We also demonstrated that DetectGPT can be partially fooled by an adversarial prompt. Finally, we tested DetectGPT on ChatGPT.


Robot Reading a Book

Sixteen Pixels is (Almost) All You Need: Crafting Parameterized Image Uncrumpling Models

Winning CS231N Final Project 2022

Phone document scans can suffer from distortions from a crinkled document. We created a decrumpling model that will take in an image of a crumpled document and smooth it out. We find that an adversarial paradigm with a small PatchGAN yields the most realistic results with the best quantitative scores as well.

Paper  /  Code

Robot Reading a Book

Thompson Sampling Simulator

CS 109 Winning Final Project 2021

Thompson sampling is one approach to exploration, where you sample from belief distributions and test the samples in the real world. It is one way of balancing exploration and exploitation. In this simulation of Thompson sampling, we visualize ants finding a good location for a nest. We also implement Tandem Running, which allows ants to "persuade" other ants, resulting in faster convergence.


Robot Reading a Book

Media Annotator

This simple Python-based program allows you to use keyboard shortcuts to annotate audio, video, and live events with timestamped comments. The program will export your annotations to copy-and-paste text that you can add to any literature review notes. I rely heavily on this tool to review hours of videos for my book.

Recently, I've also made a book annotator that allows you to make page-specific notes. This allows you digitize your annotations for physical books.


Robot Reading a Book

Coding Basics

As a researcher, I often find that I use the same code many times in different applications. To help, I've been working on a large repository of code basics. It's a collection of code snippets that help with model debugging, plot making, basic PyTorch models, and more.


Robot Reading a Book

Course Notes

I learn the best when I take notes on things. Through my four years at Stanford, I've taken hundreds of pages of notes on topics that range from probability to psychology. They cover all levels of knowledge, from undergraduate introduction to cutting-edge AI algorithms. I'm working on making all of these notes public, and i hope that they can be helpful to some people.

Notes (actively updating)

Selected Coursework

Computer Science

CS 223A Robotics

CS 236 Deep Generative Models

CS 224R Deep Reinforcement Learning

CS 234 Reinforcement Learning

CS 224N Natural Language Processing with Deep Learning

CS 330 Deep Multi-task and Meta Learning

CS 231N Deep Learning for Computer Vision

CS 229 Machine Learning

CS 285 Deep Reinforcement Learning (self-study)

CS 161 Design and Analysis of Algorithms

CS 110 Principles of Computer Systems

CS 107E Systems from the Ground Up

CS 106B Programming Abstractions in C++


EE 364A Convex Optimization

CS 229M Machine Learning Theory

EE 276 Information Theory

CS 228 Probabilistic Graphical Models

MATH 115 Real Analysis

MATH 113 Linear Algebra and Matrix Theory

MATH 51 Linear Algebra and Multivariable Calculus

CS 109 Probability for Computer Science

CS 103 Mathematical Foundations of Computing


PSYCH 226 Models and Mechanisms of Memory

PSYCH 169 Advanced Seminar in Memory

PSYCH 60 Introduction to Developmental Psychology

PSYCH 45 Introduction to Learning and Memory

PSYCH 30 Introduction to Perception

PSYCH 50 Cognitive Neuroscience

PSYCH 1 Intro to Psychology

Writing, Literature, & Philosophy

ENGLISH 290 Advanced Fiction

ENGLISH 191 Intermediate Creative Non-Fiction

ENGLISH 190 Intermediate Fiction

ENGLISH 92 Introduction Poetry

ENGLISH 91 Introduction Creative Non-Fiction

PSYCH 118F Literature and the Brain

PHIL 2 Moral Philosophy