How I Taught North Korean Students to Develop Open Source Software

In 2016, I went to North Korea to teach graduate students how to participate in the development Open source software… Here is a photo from one of my lectures:

As part of the course, students were required to publish patches for their chosen project. In this article, I will talk about how two patches were made to popular machine learning libraries. mlpack and vowpal wabbit… I believe these examples highlight that scientific cooperation between North Koreans and Americans can benefit ordinary citizens of both countries and improve diplomatic relations.

Mlpack patch

One student was working on a “vision-based vehicle recognition system” for his master’s thesis. In this task, we have a broadcast from a video camera installed near the road. The goal is to count the number of passing cars and trucks. This is a fairly standard machine vision problem that students around the world regularly do, and its output looks something like this:

(Unfortunately, this image is not from a student project, but from https://github.com/ahmetozlu/vehicle_counting_tensorflow.)

Apparently, the student was advised to take up this task by the North Korean Ministry of Transport, because traffic in Pyongyang is growing rapidly. People who visited Pyongyang in the 1990s often talked about the low number of cars on the roads, but today the city teeming with traffic… I think famous pyongyang traffic control girls automated help would be useful.

Graduate students in North Korea have access to the internet without filtering, and my student took this access to download the mlpack machine learning library to implement their vehicle recognition system. He decided to use mlpack because it is written in C ++, which is the main language that students studied in their senior years. But they faced a very serious problem: their computer turned out to be very old and did not have enough memory to compile the library!

After spending about an hour on debugging, my student and I identified the source of the problem, they turned out to be C ++ templates used in mlpack. All parts of the mlpack code make extensive use of templates to provide generic programming without wasting resources at runtime. Thanks to templates, mlpack has gained a reputation as a library for executing models very fast and almost no memory usagehowever, the downside is slow and memory-intensive compilation. At the time, compilation required up to 2 GB of RAM, and only 1 GB was installed on the laptop of a North Korean student.

Ultimately the student was able to get mlpack to compile, greatly optimizing the compilation procedure. The original code contained hundreds of optional constructs #include, and to solve the problem, it was enough just to delete this dead code. The commit itself can be look at github… This fix improved compilation speed by 25% and more than halved memory consumption. Tens of thousands of people and companies who have used mlpack since this patch have benefited immensely from a North Korean student doing such an amazing job.

Vowpal wabbit patch

Many of the students in my course have not yet decided on the topic of their thesis, so I recommended one student to work on analyzing the mood of Twitter posts. Let’s say we have a tweet like this:

and we need to classify the tweet as having a positive or negative relationship to its topic. For example, the tweet shown above has a negative attitude towards 2018 Singapore Summit between Donald Trump and Kim Jong-un. By analyzing thousands (or millions / billions) of tweets in this way, we can determine how different societies relate to a particular topic. This is also a completely everyday task carried out by students from all over the world. But for North Korean students, this task has become unusual.

All students have heard of Twitter but never used it. Despite the fact that their computers had direct, unfiltered access to the Internet, they were prohibited from creating accounts on social media services. As explained to me, the reason is that the US controls most of the Internet infrastructure (including websites such as Twitter), and through programs such as PRISM NSA and Cyber ​​Command The US military spies on users and manipulates social media.

The US and North Korea never signed a peace agreement after the Korean War, so the North Koreans remain deeply concerned about the possibility of a US attack. Banning social media accounts is one of the “safeguards” that North Korean students must adhere to to reduce the impact of potential “American cyberattacks.” Fortunately, studying Twitter is one of my areas of research, and I brought along quite a lot of data with me for students to analyze.

As one of my North Korean colleagues liked to remind me, this project was notable for the fact that it was the first time a North Korean student analyzed Twitter data. And the analysis of Twitter data will soon take on geopolitical importance: less than a year after the project began, Donald Trump was elected president of the United States, and Twitter became one of the main tools through which his administration began to communicate its foreign policy to the world. Fortunately, by the time Trump gave Twitter this pseudo-official status, at least a small fraction of North Koreans already had experience analyzing his data. They could use this experience to better understand both Trump’s tweets and the responses sent by millions of Americans. The North Korean government today recognizes the importance of using social media to understand American politics, and has recently created new Department of Foreign Affairs to analyze US intentions through social networks and other sources of public information. And this is great news for both countries! The United States is founded on a transparency system because the state wants everyone (including the North Koreans) to understand how democracy works and how we can best negotiate to achieve common goals.

This interaction between scientific knowledge exchange and diplomacy is called diplomacy of science, it turned out extremely important to successfully discuss US and USSR restrictions on nuclear weapons systems during the Cold War. I believe that my work on teaching open source software in North Korea will help show that this model of science diplomacy can also be successfully applied in negotiations between the US and North Korea.

But back to my student’s contributions to open source. I have recommended that the student use to perform the analysis vowpal wabbit, since this is an excellent tool for analyzing large text arrays of data. The student downloaded the code, compiled it, and analyzed the mood of several thousand tweets. In this case, the code worked well on the student’s computer without any changes. However, to take the open source software course, he still needed to publish a patch.

He found on Github open issue with a request to add the ability to change the way the intercept interacts with the L2 regularization when training linear models, and published patchadding this behavior. (Pool requests for both projects were sent from my Github account, because Github is considered a social network, and North Korean students are not allowed to create accounts on social networks.) Later I found myself in this patch. bug, and was added next patchfixing this problem. This is how the open source software development process should work, and I find it amazing that open source allows ordinary people around the world to find common goals, creating great software, even despite seemingly intractable political divisions.

The future of open source in North Korea

If I’m not mistaken, the patches submitted for this course were the first open source contributions made from North Korea; unfortunately, they were also the last.

The next year (2017) I organized another trip to North Korea and had to bring some more open source teachers with me, but President Trump banned Americans from visiting North Korea… Therefore, the other teachers and I could no longer meet with North Korean students, and no one else could teach them to contribute to open source or motivate them to do so.

President Biden recently announced his policy “Practical diplomacy” with North Korea. However, the details of this policy are still unknown, and the ban on visits remains. Therefore, the Americans will not be able to take advantage of the fact that the North Koreans are fixing bugs in their code, and the diplomacy of science, which, in fact, reduced friction between the United States and the USSR, cannot be used as a tool to reduce friction between the United States and North Korea.


Advertising

VDSina offers servers for rent for any task, a huge selection of operating systems for automatic installation, it is possible to install any OS from your own ISO, convenient proprietary control panel and daily payment.

Subscribe to our chat in Telegram

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *