March 22nd, 2021

Predicting International Olympiad in Informatics (IOI) results from contestant photos

Originally published at 狗和留美者不得入内. You can comment here or there.

The 0.3-0.4 correlation between brain size and IQ is well known among the neuroscience community. I had also long realized that brain size could be very crudely approximated from photos. It had occurred to me that given photo data labeled with IQ or some proxy for it, one would likely find a statistically significant correlation. After looking at International Olympiad in Informatics (which selects 4 high schoolers each year from each country) results on the official site, which includes photos of the contestants, it occurred to me that I could do a data science project based on this.

I initially hesitated due to the controversy that such a project might generate, but after seeing that the face recognition service of this Chinese company even estimates “attractiveness”, which like it or not, does objectively exist in a statistical sense, I decided it would be okay. Besides that, two non-Chinese friends of mine had both showed me similar services of non Chinese origin: both based on photo and face recognition, one was an ethnicity estimator and the other estimated attractiveness, IQ, etc.

I wrote code to scrape the data, along with code using perhaps the most popular open source face recognition library in Python and OpenCV to pick out locations of top of head, eyebrows, and chin and then vertically align the image per a calibrated standard. Face recognition and especially top of head recognition by a relative computer vision noob like myself was imperfect, so I also made some manual adjustments. The bad photos were excluded, and those with an excess of hair were also manually tuned in their feature parameters, or excluded in some cases. And it turned out that


a very crude estimate for brain size correlated [公式] with percentile represented via Z score on IOI at sample size almost [公式] . The p-value of this was less than [公式] , which is pretty statistically significant. Though a small correlation, it is much higher than the IQ correlation between unrelated children reared together, which is only [公式] at adulthood. And midway though the project, I realized that eyes would very likely make a better predictor than eyebrows, given that there is actually quite some variation in eyebrow to eye distance among the entire human population. I would not be surprised the use of eyes in place of eyebrows yielded a correlation higher than [公式] .

I won’t release the code and data publicly at this point (and might never will) though it can be requested via email to gmachine1729 at I know/knew personally some IOI contestants myself and would also be interested in feedback from them on this. I will release publicly here a few graphs.

I told a biologist about this project too, and he was somewhat to my relief not surprised at all, regarding the genes, shared-environment, non-shared environment stuff to be pretty basic knowledge for genetics research, and also the correlation between brain size and intelligence to be well known. To be fair, “big brains” as a metaphor for smarts I have heard used multiple times in America too. This is not observed only across people but also in each individual person, like there is a reason why many things I found difficult at age 20 I now find pretty routine. And I also am like Professor Robert Plomin in accordance with the idea that most parents overestimate the effect of what they did for the education of their children.

Memories of racist white American exceptionalist teachers I had in primary and secondary school

Originally published at 狗和留美者不得入内. You can comment here or there.

In response to the following comments at

A map documenting Austronesian historical migration.

Looks like they very likely reached Chile from Easter Islands, given the distance they traveled to Hawaii from the nearest island is around the distance from Easter Islands to Chile. I vaguely remember reading some DNA evidence for that too. As for Columbus, one can say that Vikings/Erik the Red/Leif Erikson predated him by several centuries. Columbus mattered way more of course the Vikings didn’t really do anything in the Americas and the overall impact of their explorations, as with Zheng He’s, marginal in comparison.

Having re-read about Columbus, Vasco de Gama, and other explorers of that age, I realize there was some luck aspect to it as well. The route to India across the tip of Africa by Vasco de Gama was much catalyzed by the severing of trade route by Ottomans from 1450s on. Columbus in some sense was close to not receiving funding for his expedition, as it was done after the Africa route had already been discovered; I believe he was funded mostly out of fear that he would employ his talents and skills for a competitor nation instead. The discovery of Americas by Columbus was an accident, and I remember reading that he misestimated the distance to Asia along that other direction.

One year in grade school, each student in the class had to do an “explorer project”, where one would write about an explorer. I remember the teacher was a female white American exceptionalist, who would evoke the negative “German/Nazi” stereotype and also go,

The Japanese also wanted to take over other countries. It’s called “imperialism”.

That year, we learned a fair bit about Native Americans too. I remember this (white) girl in the class basically cried after learning about their dispossession by those “evil powerful white men”. That teacher was literally so American exceptionalist that had anyone picked Yuri Gagarin for his explorer project (and some kid did pick Neil Armstrong), she may well have even objected. Nobody picked Genghis Khan or Zheng He either; that might also have been somewhat inappropriate. xD

Someone else is that last year, I read a bit about the Russian explorers who conquered Siberia between 1500-1750. Nobody in America knows about them either. Speaking of which, I’m sure the Russians regret selling Alaska a lot, especially since it would have been an ideal Cold War base.

White European supremacy and American exceptionalism coupled with a worship of blacks in some sense was already being drilled down our throats in grade school. That teacher spoke of how though blacks used to be discriminated against in sports, the best home run hitters in baseball are pretty much all black, and how they were simply too good. On the other hand, some white American teachers visibly treated me, a PRC immigrant kid, with a prejudiced attitude. They didn’t say it very openly of course but it was more or less obvious how they felt inside based on their decisions and tone of voice. I could tell they especially disliked East Asian scientists or intellectuals. When I once mentioned Qian Xuesen to a history teacher in high school, he/she basically expressed outrage that Qian was allowed to play such a major role in American rocket development. Of course, the truth is that the cognitive elite from China, Japan, and Korea that came to America between 1945-1980 made enormous contribution to science and technology for America, and post-1980 you had another wave much from PRC. They were overall under-recognized, especially by the media, for their contributions. America would be less competitive economically and technologically if not for such far tail brain drain. Theoretical physics post-war in America was very much a Jewish and East Asian affair. Yet, I remember Stephen Hawking in A Brief History of Time explicitly regarded Chen-Ning Yang and Tsung-Dao Lee as American physicists even though they held Chinese citizenship up through at least 1960, when they did their most groundbreaking work. About half the top scientists in America are foreign born, and while it’s okay to label a white European immigrant as American, I don’t think it’s okay to do so for an East Asian. Something else is that the international math, physics, and computing olympiad teams now in America are mostly Asian, but let’s just say the general attitude towards that is very different from the general attitude towards the NFL/NBA/MLB composition. We can call it an Asian PR failure in America.