Maximilian Du

maxjdu at stanford dot edu

Google Scholar  /  GitHub  /  Resume  /  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.

My research and project experiences include reinforcement learning, behavior cloning, meta-learning, and robotics. I am also excited at the interdisciplinary connections between psychology and computer science, especially when it comes to the mechanisms of learning, teaching, and training.

In my free time, I love to write short fiction and creative non-fiction. I'm a senior producer at the Stanford Storytelling Project, and I'm working on a book that looks at the human-animal connection through the stories of animal trainers.

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

Whale Book  /  Other Writing


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 submission 2023

Humans and animals can leverage past experiences to learn a new task faster. In our project, we try accomplish a similar performance boost in robot task learning by leveraging a large offline dataset of robot interactions. We pretrain a state-action embedding model and use the model on the offline dataset to select data that is most relevant to a small set of target task demonstrations. Then, we run behavior cloning on the selected data and the target task demos. We show, in simulation and on real robots, a meaningful improvement of our Behavior Retrieval method over baselines.

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

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

I created modified LSTM (Long Short Term Memory) Neural Networks and used auxiliary weather forecast data to improve ultra-short wind farm output predictions, for use in a smart grid.

Paper  /  Code

Robot Extracting Keys

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

We show that robots can benefit from audio data while accomplishing visually-occluded tasks. We learn policies end-to-end from vision and audio (from a gripper-mounted microphone) to complete difficult tasks, like extracting keys from a bag when the keys are not initially visible.

Website  /  Paper  /  Code


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

Maximilian Du*, Niveditha Iyer*, Tejas Narayanan*
Winning CS231N Final Project 2022

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


Media Marker Screencap

Media Annotator

This simple Python-based program allows you to use fast keyboard shortcuts to annotate audio, video, and live events with timestamped comments. There exist fancy tools that do this, but my version is very bare-bones and fully customizable. 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 for my own literature review.

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.


MidiStyle: Audio Style Transfer

CS 229 Final Project

Style transfer is pretty pervasive in visual tasks, using anything from Gram Matrix methods to CycleGAN. Can we try using established vision style transfer algorithms on audio? In this project, we show that this is indeed possible. Using a spectrogram representation, we change a piano into harp, harpsichord, electric guitar, and even timpanis. We generate our own data using MIDI, and we test on a real-world piano.

Website   /   Code

Coding Basics

As a researcher, I often find that I use the same code many times in different applications. I need to iterate quickly on certain codebases, so I've been working on a large repository of code basics. Think about this as a bunch of partially constructed code snippets that range from live PyTorch debugging to making a graphical Tkinter app. I'm also including easily runnable PyTorch implementations of common ML models.


Thompson Sampling

Thompson Sampling Simulator

CS 109 Winning Final Project

The Multi-Armed Bandit is a fascinating theoretical question, but it is also a heavy philosophical question: how do we balance exploration vs exploitation? We look at one algorithm, known as Thompson sampling. Here, we simulate ants finding a good location for a nest. We also implement Tandem Running, which allows ants to "persuade" other ants, resulting in faster convergence.

Simulation   /   Code

Training Artwork

The Tricks, Goofs, and Whales of Machine Learning

Machine learning is the abstraction of real learning processes into computational ones. Therefore, we find that it often imitates nature. In this 90-minute talk, I explore this parallelism by looking at connections between robot-learning and animal training. How does classical conditioning map to the mathematical Bellman Backup? How do animal trainers help their animals achieve good exploration policies? What do animal superstitions tell us about domain adaptation?

This talk was originally made for Stanford Splash, but it works for any audience of high school or undergraduate college students. If you want the slide deck or a presentation, please email me.

Whale in Library

Automatic Source Vetter

This webscraping software will search RSS, YouTube, and Twitter accounts of your choice for new content with relevant keywords. It saves these to a SQL database for later perusal. I've also included a slurry of specialty website parsers for my whale book research. While you probably won't need these, the specialty parsers demonstrate the modularity of this software.

Code (still actively updating)


From paper to presentation, I tell stories of my research. But I also engage with writing as an artform. I work on fiction, creative non-fiction, and some poetry. Currently, I'm obsessed about the human-animal relationship. There are so many ways of understanding it, through marine parks, indigenous traditions, literature, and more. Find my writing here.

I'm currently working on a non-fiction book that dives deeper into this human-animal connection through the stories of whale trainers. I'm honored to be mentored by a large group of people, including Professor Jonah Willihnganz and Pulitzer Prize-winning Professor Adam Johnson.

Selected Coursework

Computer Science

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 228 Probabilistic Graphical Models

CS 229 Machine Learning

CS 285 Deep Reinforcement Learning (Berkeley, 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 276 Information Theory

MATH 115 Real Analysis

MATH 113 Linear Algebra and Matrix Theory

MATH 51 Linear Algebra and Multivariable Calculus

EE 263 Introduction to Linear Dynamics Systems (self-study)

CS 109 Probability for Computer Science

CS 103 Mathematical Foundations of Computing


PSYCH 45 Introduction to Learning and Memory

PSYCH 30 Introduction to Perception

PSYCH 50 Cognitive Neuroscience

PSYCH 1 Intro to Psychology

Writing, Literature, & Philosophy

PSYCH 118F Literature and the Brain

ENGLISH 127A Moby Dick & The Role of Animals in Fiction

PHIL 2 Ethical 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