Xinwei (David) Yao

Mathematics  •  Computer Science  •  Film

Yale  →  Google  →  Stanford

About Me

Hi! My name is Xinwei (David) Yao. I am a first-year Computer Science PhD student at Stanford University interested in research on Computer Graphics, Machine Learning and their application to visual media and specifically to video and film.

I am an experienced Software Engineer on large-scale distributed infrastructure systems. Before coming to Stanford, I spent two years working at Google in New York City on a planet-scale Search Engine platform powering hundreds of Google products including WebSearch and Youtube, the two largest search engines on the Internet, serving tens of millions of search queries every second. During my undergraduate years at Yale, I was a developer at Yale STC in New Haven, CT. I also interned at PraxisEMR in Buenos Aires, Argentina and at Google in Mountain View, CA. I have done various other projects in web development, system programming, and functional programming and am familiar with C/C++, Python as well as Haskell, Ruby and JavaScript. Here is my resume.

I enjoy teaching and giving technical talks. At Google, I taught engineering courses on Machine Learning with Tensorflow, and the anatomy of the Web Search Engine to other engineers with great success. As a math major in undergrad, I have written expositions and given seminar lectures on quite a few mathematical topics including Network Algorithms, Graph Theory and Galois Theory. The lecture notes and essays can be found here.

Born and raised in Nanjing, China, I can speak Mandarin, English and Spanish and I love travelling to different places. In my free time, I am a cinephile and I watch movies from all over the world including US, Europe and East Asia. I especially enjoy thriller, horror and science-fiction films. I write about them too, usually short comments but sometimes longer essays.



A Qt program to view shadows of rotated 3D models


Envy My Simplex

A WebGL First-person shooter game


MIDI Visualizer

A Haskell program for visualizing midi files



A Ruby on Rails application that allows easy tracking of employees who work scheduled and even unscheduled hours in various locations and times.



A Rails back-end and a Python front-end that implements an empirical Bayesian approach for prioritizing SNPs in GWAS.



A chrome extension that saves webpages, quotes, images and videos.

Math Notes and Essays

Casus irreducibilis, Latin for "irreducible case", states that an irreducible cubic polynomial with three real roots cannot have any of its roots expressible by only taking real radicals. Although all roots are real, one must introduce complex valued expressions to write them down using rational numbers and radicals.

I first came across this theorem when I was doing homework for Galois Theory. I was curious to see the proof but I could find no complete and correct proof of this result online. Luckily I found the proof explained in the Abstract Algebra textbook by Dummit and Foote.

Here is a complete proof.

In February 2016, I gave a series of 3 lectures for the class MATH480 (Senior Seminar: Mathematical Topics) on the topic of p-adic numbers, their construction by completing the field of rational numbers, and the Bruhat-Tits tree associated with the 2-dimensional p-adic integer lattices.

Here are the lecture notes.

In the fall of 2015, I did a senior thesis research project with advisor Daniel A. Spielman on the hardness of the l0-regularization problem of finding smooth extensions of functions on graphs, where one is given the function value at some initial vertices and an integer k and needs to compute the function that minimizes the Laplacian quadratic form while coinciding with all but k of the initial values. Kyng et al. (2015) proved that the problem is NP-hard by reducing from the problem of finding the minimum bisection of a graph. The thesis gives a new reduction from min-bisection that yields further result on the relation between hardness of approximating the regularization problem and hardness of solving or approximating min-bisection for special graphs.

Here is my thesis.

In May 2015, I gave a talk for the class ENAS963 (Network Algorithms and Stochastic Optimization) on the topic of traffic signal control methods based on the Back-Pressure algorithm proposed by Tassiulas et al. in 1992.

Here are the notes for the talk.