Lipizzaner: Creating a coevolutionary GAN framework at the ALFA group
At the beginning of 2018, I did a semester abroad as a visiting student at the ALFA group. This blog post will cover the project we were working on, some background information about what it means to be a visiting student at CSAIL, and my findings during these great months, which will be published in the Systems for ML workshop at NIPS 2018. As expected from an engineer, I’ll start with the technical part. ;-)
Although machine learning has received much attention in recent years, the concepts used are usually anything but new and date back to the 1950s. While this has led to discriminatory methods (i.e. methods to classify data) being generally well researched, generative approaches are still a relatively new chapter. Generative machine learning models may, among other applications, be used to create dynamic content in video games, images from a textual description, or even expensive art.
Generative adversarial networks (or GANs) are one of the most promising approaches in this field and use two neural networks that are trained in an adversarial way — one with the objective of creating content similar to an input dataset, and the other one to distinguish this newly created data from the original dataset. However, GANs have some disadvantages regarding their stability, primarily due to their complex adversarial nature.
During my stay at the ALFA group, we aimed to develop a training framework that resolves these issues by combining GANs with coevolutionary algorithms. This optimization technique loosely relies on the concepts of biological evolution and iteratively optimizes multiple adversarial solution populations.
Lipizzaner is a distributed, coevolutionary framework to train GANs with gradient-based optimizers.
The combination of these two approaches allows to utilize the advantages of both. On one hand, fast convergence is reached due to the good performance of stochastic gradient-decent algorithms; on the other hand, using populations of generators and discriminators drastically increases the system’s stability, as “broken” models can be disregarded.
We used a combination of several open-source technologies to develop Lipizzaner:
- The training application is based on Python and the PyTorch machine learning framework. Lipizzaner trainings are usually distributed over many machines in a network (i.e. virtual machines in the cloud), so the communication between the processes relies on RESTful HTTP interfaces (implemented with the library Flask)
- Monitoring the results of a distributed system can be hard. We therefore implemented the Lipizzaner Dashboard, a monitoring and analysis tool. It is an ASP.NET Core web application that uses Angular to generate its front-end.
- Both applications are connected to a MongoDB database that acts as a central storage system for all training results, which are furthermore loaded by the dashboard.
Organizing your studies abroad presents some administrative challenges. Luckily, it was possible to get help.
Most people probably know (or at least assume) that studying and working at the MIT is challenging — a fact that I can now confirm. However, unlike for regular students, this isn’t really caused by any objective “pressure” visiting students experience, but by the strong motivation to deliver the very best results one can achieve. For me, this motivation was further increased by the inclusive and kind working atmosphere at ALFA — while everybody is working hard because of the people’s personal enthusiasm, teamwork was definitely the driving factor of all group activities. Asking questions and resolving issues as a group was not only tolerated, but highly encouraged. This climate was further intensified by the weekly group lunches that helped to stay in touch with other students and team members, and the regular internal presentations of one’s work in front of the group that usually served as a discussion starting point.
Aside from this, the regular project meetings helped clarifying all regularly occurring questions and issues and led to an agile development process where new features were constantly included into the backlog (i.e. the team constantly came up with more work to do for me :-)).
The findings of my stay can be divided into two categories: personal and technical lessons learned. Again, I’ll start with the technical aspects:
- Competitive coevolution and GANs work quite well together. This isn’t really surprising, as the concepts are similar in multiple respects, but definitely still worth mentioning.
- Combining (co)evolutionary algorithms and neural networks requires a distributed system. As utilizing GPUs to increase the training speed, and since the amount of available GPU memory is limited on a single machine, the populations of neural networks need to be distributed onto multiple computers or VM instances in the cloud.
- Overall, we achieved promising results, especially in terms of preventing instabilities like mode- or discriminator collapse. The system did also scale very well due to its special distribution approach (which means that communication is limited to local neighborhoods).
And finally, I’ll end this post with a few sentences about my personal findings during my stay. I can only repeat what probably most people who do a semester abroad will tell you: living in another country for several months opens completely different perspectives. I greatly enjoyed my stay at the ALFA group, and it’s hard to express what it means to me to have gotten the opportunity to work with such brilliant people. While hard working may be a prerequisite, it takes a good portion of luck to get this chance, for which I’m very thankful.