Working AI: In the Classroom with Younes Mourri
Title: Masters student and Lecturer at Stanford University
Location: Stanford, CA
Education: Stanford University, B.S. Mathematical and Computational Sciences, M.S. Statistics
Favorite AI researcher: Dan Jurafsky, Stanford
It’s 2:20pm, and another lecture is wrapping up on Stanford campus. Sitting in the last row of a statistics class, Younes Mourri shuts his laptop and bikes across campus. At 2:30, he enters another classroom much like the previous one. But this time, he walks to the front of the class and dives into an explanation of support vector machines.
Younes is both Masters student and Lecturer at Stanford University. Rather than cutting-edge research, Younes focuses on AI education. He developed content for the most popular Machine Learning and Deep Learning courses in the world with global AI leader Andrew Ng. He also co-teaches Stanford’s courses on applied machine learning and teaching AI. More than 1,000 Stanford students and millions of online learners have taken courses he helped to create.
Read on to learn how Younes got here and his advice for students keen on entering the world of AI.
When did you realize you wanted to get involved in AI?
I started working in AI during my sophomore year. I was hired by the Artificial Intelligence lab to fix a few bugs in Andrew’s Machine Learning course on Coursera. After debugging the entire course, I started writing detailed lecture notes, and that was when it all started. After writing the first set of notes, I published them online, turned off my computer and went to sleep. The next day I woke up and checked the notes to see if there was any feedback. I saw that they got hundreds of likes overnight. I realized that so many people were looking for educational resources to learn AI, so I started writing and publishing my lecture notes every day. As I gained more experience, I fixed the programming assignments and improved them, and then I tackled the auto-graders. I worked on the course for two years.
Teaching AI requires a good amount of AI knowledge, software engineering skills, and a passion for education. It hit all the points for me.
What are you currently working on?
I am learning how to teach onscreen in MOOCs (Massive Open Online Courses). For the past four years, I’ve been working behind the scenes on building assignments, auto-graders, notes, quizzes and exams. I’ve also learned to give lectures on campus and am not afraid to talk and explain concepts like backpropagation in a huge lecture hall. But teaching ML concepts in a series of videos requires a different set of skills. I try to practice at least once a week by recording myself and asking my friends for feedback.
What’s most challenging about teaching AI?
Grading final projects. Because each project has a completely different application, it’s hard to create a standardized rubric. Furthermore, students often use different models and datasets for different applications.
I created the class CS93: Teaching AI at Stanford to address this specific problem. Most of the students in the class are TAs who are already teaching CS classes across campus and want to improve their AI grading skills. Student work in AI is very difficult to evaluate because the field is so complex. As an exercise, I asked the TAs to grade a paper that was awarded best paper in CS230: Deep Learning the previous quarter and told them that the class average was a 90. Obviously, I did not tell them that it was an award-winning paper, but when I averaged all their grades, the paper got a 92, which was much lower than the real score. By the end of the quarter, the TAs will be more consistent in grading.
The problem of how to evaluate ML work is not only an issue in the classroom. Even in major conference venues, whether a paper gets published depends on who is reviewing it.
What’s the most important thing for students to keep in mind?
Students should understand the concept behind the algorithms. They should not memorize equations and code them up. For example, if you can derive the logistic regression cost function, you’ll never have to memorize it. In doing so, you’ll really understand what is going on behind the scenes. Though you’ll probably always end up importing a third-party library like scikit learn, building that intuition will help you know when to use what.
What’s the biggest pitfall for students, and how can they avoid it?
Many students jump into AI without having a solid software engineering background. I think that is a wrong move. When you work in AI, you need to process data sets, scrape the internet, use amazon web servers, set up docker containers, and build entire software systems along the way. Though processing data sets isn’t the sexiest part about AI, it’s an incredibly important part of the pipeline, and having a good software engineering background is important.
When working on an AI project, I feel like I am a software engineer 80% of the time and an AI engineer 20% of the time. I would highly recommend taking computer science courses like databases, programming methodologies, and programming abstractions to build a foundation before jumping into AI.
How do you keep learning?
Grading final projects is a very good way to stay updated on the latest AI trends. So many references to papers, related works, and new applications show up in these projects. I also get excellent questions from my students all the time. Some questions are specific to a certain task and force me to learn about an entirely new domain. Recently I learned all about earthquakes so I could grade a project trying to predict them. I also have friends in the Stanford AI lab who do research and tell me about their latest updates.
What is your favorite machine learning model?
I am a simple guy: I like linear regression best. I actually took an entire graduate PhD Stats course on linear regression, and for 10 weeks all I did was linear regression. We covered univariate regression, multiple regression, constructing features from predictors, geometry and algebra of least squares: subspaces, projections, normal equations, orthogonality, rank deficiency, Gauss-Markov. Gram-Schmidt, the QR decomposition and the SVD. But even 10 weeks didn’t do the topic justice. With linear regression, you can interpret coefficients, collinearity, dependence and heteroscedasticity, fits and the hats matrix, and so much more. Many people underestimate the power of linear regression. It is so powerful!
What tech stack do you use to do your ML work?
- iterm2: This has many additional new features like mouse support. It’s also very customizable.
- Sublime: I like their colors and auto-complete. It saves me time. It also allows you to use a mouse unlike some other editors.
- Python: This is my default language. I find it intuitive and really like scikit learn and pytorch. I used to work with TensorFlow but converted to PyTorch. Most of my friends use PyTorch, especially in the AI lab, so at one point I just felt left out!
- Multiple coding languages: Students use all kinds of software for their final projects and sometimes I have to delve into the details when debugging their code. I often have to change from Tensorflow to Pytorch to Matlab to R. Students come from all kinds of backgrounds and I want them to use whatever they are comfortable with.
What AI application are you most excited about?
I’m excited about Natural Language Processing applied to education. I am pretty sure by the time the next generation shows up, we will have robust systems that can grade short answer questions accurately, and that would save teachers millions of hours. These NLP systems will not only be able to grade answers, but they will also be able to ask questions.
What’s the best thing deep learning can do for society?
Deep learning will help the healthcare sector a lot. Diagnosing medical images is an example of this application. Once we beat human-level performance, which we have already done in certain applications, doctors won’t need to diagnose the images, because the AI can be embedded in the medical machines. This will free up a lot of valuable time for doctors to work on other things like deciding what to do with the diagnosis.
What advice do you have for people trying to break into AI?
If you want to build scalable and efficient AI systems, take a few computer science courses before doing AI. I also recommend taking the Machine Learning and the Deep Learning Specialization on Coursera. After completing them, you can volunteer and become a mentor on the forums. By teaching other people, you automatically become an expert on the content.