techlist.io

OpenAI

274 posts

openai.com/news

Filter by tag

OpenAI2016-08-284 min readCurated summary

Infrastructure for deep learning

# Infrastructure for Deep Learning Research OpenAI's 2016 post argues that the quality of a research group's infrastructure multiplies its rate of progress in deep learning, which is an empirical science. The authors describe how deep learning work moves from rapid, ad-hoc experiments to long, carefully managed multi-GPU training runs, and explain the stack they built to support both phases. They also open-source kubernetes-ec2-autoscaler, a batch-optimized scaling manager for Kubernetes. ## The Research Workflow Deep learning research happens in two distinct phases, and the infrastructure has to serve both: - **Early exploration** is fast and unstructured. Researchers want to SSH into a machine, run a script in `screen`, and see a result within an hour. - **Scaling up** requires multi-day jobs on many GPUs, careful experiment tracking, and deliberate hyperparameter selection. - Making a model work often means watching it fail in many ways, so infrastructure must support flexible introspection of models rather than only summary statistics. ## A Worked Example: Improved GAN Training The post traces how one idea moved from concept to large-scale result. The idea was to give the GAN discriminator a whole minibatch of samples instead of one, so it can detect when the generator collapses to a single output. - The idea was prototyped on MNIST and CIFAR-10 with small models, producing some of the best CIFAR-10 samples the team had seen. - Scaling to ImageNet required parallelizing across multiple GPUs, with jobs driving machines to about 90% CPU and GPU utilization and training for many days. - The authors note that the final results were good but short of expectations, and they have not yet identified the reason. ## Software and Hardware Choices - **Software:** Mostly Python 2.7 with TensorFlow (occasionally Theano), with Keras used on top in some cases. Anaconda handles difficult packages such as OpenCV. - **GPUs:** Multi-GPU scaling is usually sublinear, so top-of-the-line GPUs matter. CPU-heavy workloads such as simulators and reinforcement learning environments run separately from GPU workloads. - **Hybrid cloud:** AWS donated compute for CPU instances and horizontally scaled GPU jobs, while the team also runs physical servers, mainly with Titan X GPUs, to experiment with different hardware. ## Provisioning and Orchestration - **Provisioning:** Terraform manages AWS resources, Chef configures Ubuntu nodes on both cloud and physical hardware, and Packer pre-bakes cluster AMIs for faster spin-up. Clusters use non-overlapping IP ranges and connect over OpenVPN and strongSwan. - **Storage:** Home directories, datasets, and results live on NFS for physical hardware and on EFS or S3 in AWS. - **Scheduling:** Kubernetes schedules jobs across three AWS regions, since bursty demand can exhaust capacity in a single region. Each job runs as a Docker container for dependency isolation and code snapshotting, and tooling ships laptop code into a standard image to avoid slow rebuilds. - **Networking:** Kubernetes' flannel network is exposed directly to researchers' laptops, so services like TensorBoard are reachable without creating a Kubernetes Service for each port. ## kubernetes-ec2-autoscaler Research workloads are bursty. One experiment grew from a single Titan X to 60 Titan Xs and then to nearly 1,600 AWS GPUs within weeks. Standard Auto Scaling policies add nodes piecemeal, and scale-in can kill in-flight jobs unless nodes are drained first. - The autoscaler runs as a normal Pod and requires only that worker nodes belong to Auto Scaling groups. - It polls the Kubernetes master to compute the cluster's resource demand and capacity, then sizes Auto Scaling groups to match in one step. - Excess nodes are drained and terminated. Drained nodes can be uncordoned to skip spin-up time when demand returns. - It handles multiple Auto Scaling groups, resources beyond CPU (memory and GPUs), and constraints such as region and instance size. - When AWS reports capacity errors, it fails over to a secondary region. The authors chose to build on Kubernetes rather than raw EC2 because the surrounding tooling for logging, monitoring, and managing physical nodes was worth keeping, and making Kubernetes autoscale was simpler than rebuilding that ecosystem.

OpenAI2016-06-154 min readCurated summary

Generative models

# Generative Models as a Path to Machine Understanding OpenAI's June 2016 post argues that generative models, which learn to produce data resembling a training set, are one of the most promising routes to computers that understand the world. The core idea is that a model forced to compress large datasets into far fewer parameters must discover the essential structure of that data in order to reproduce it. The post illustrates this with image generation, explains the main model families, and summarizes four recent OpenAI projects that improve GANs, VAEs, and reinforcement learning exploration and imitation. ## Why Generating Data Builds Understanding - Generative models are trained on a large collection of data, such as ImageNet's 1.2 million images resized to 256x256x3 (about 200GB of pixels). - The model's parameter count (roughly 100 million) is far smaller than the data, so it must learn salient regularities: nearby pixels share colors, edges are horizontal or vertical, and objects appear in typical arrangements. - The post frames this with Feynman's line, "What I cannot create, I do not understand." ## How a Generative Model Is Trained - A network such as DCGAN takes a random code of 100 numbers drawn from a uniform distribution and outputs an image. Changing the code smoothly changes the image, which suggests the model learned features rather than memorizing examples. - Training aims to make the model distribution p̂θ(x) match the true data distribution p(x), typically by reducing a KL-divergence-style loss. - Because there are no explicit target images, training relies on indirect signals. In the GAN approach, a discriminator learns to separate real from generated images, and the generator is updated to fool it. ## Three Families of Generative Models - **GANs** pose training as a game between a generator and a discriminator. They produce the sharpest images but are hard to optimize because training dynamics are unstable. - **VAEs** maximize a lower bound on the data log-likelihood within a probabilistic graphical model framework. They support efficient Bayesian inference over latent variables, but their samples tend to be blurry. - **Autoregressive models such as PixelRNN** model each pixel conditioned on previously generated pixels, using RNNs that run horizontally and vertically. They train stably with a softmax loss and achieve the best log-likelihoods, but sampling is slow and they offer no simple low-dimensional codes. ## Four Projects from OpenAI - **Improving GANs:** The authors introduce techniques that stabilize GAN training and scale it to 128x128 ImageNet samples. Their CIFAR-10 samples fooled Mechanical Turk workers at a 21.3% error rate, where 50% would be chance. A semi-supervised variant, where the discriminator also predicts labels, reached 99.14% accuracy on MNIST with only 10 labeled examples per class. - **Improving VAEs with Inverse Autoregressive Flow (IAF):** IAF lets approximate posteriors be rich and highly flexible while remaining parallelizable, unlike earlier chain-conditioned approaches. The resulting 32x32 samples are noticeably sharper than vanilla VAE output and earlier DRAW samples. - **InfoGAN:** This extension adds a mutual-information objective between subsets of the latent code and the observation. The result is disentangled, interpretable factors, such as azimuth, elevation, lighting, and face width in 3D face images, learned without any supervision. - **VIME (Curiosity-driven exploration):** Using uncertainty in Bayesian neural network dynamics models, the agent seeks surprising state-action pairs. This helps on sparse-reward tasks, such as learning locomotion primitives without guidance, where naive exploration fails. - **Generative Adversarial Imitation Learning (GAIL):** Rather than learning a reward function and then running RL, GAIL extracts policies directly from expert demonstrations through a GAN-like connection. It works on hard OpenAI Gym environments such as Ant and Humanoid. ## Outlook - Near-term applications include image denoising, inpainting, super-resolution, structured prediction, RL exploration, and neural network pretraining when labeled data is scarce. - The authors anticipate creative tools such as on-demand art and editing commands like "make my smile wider." - The deeper promise is that learning to generate the world may give computers an actual understanding of what it is made of.

OpenAI2016-04-263 min readCurated summary

OpenAI Gym Beta

# OpenAI Gym Beta: A Shared Toolkit for Reinforcement Learning Research OpenAI has released the public beta of OpenAI Gym, an open toolkit for developing and comparing reinforcement learning (RL) algorithms. It pairs a growing suite of environments, ranging from simple control tasks to Atari games and simulated robots, with a site for comparing and reproducing results. The authors built it to speed up their own research and hope it becomes equally useful to the wider community. ## Why RL Needs Better Infrastructure - RL covers any problem involving a sequence of decisions, such as robot locomotion, pricing and inventory management, video games, and board games. It has also been applied to supervised problems with sequential or structured outputs. - Recent deep RL systems, including DeepMind's Atari work, BRETT, and AlphaGo, make few assumptions about their environments, so they transfer across settings. Earlier RL methods required heavy problem-specific engineering. - Two obstacles slow progress: - **Weak benchmarks:** Supervised learning advanced through large labeled datasets like ImageNet. RL lacks an equivalent, and existing open-source environment collections are narrow and often hard to set up. - **Inconsistent environments:** Small differences in reward functions or action sets can change a task's difficulty dramatically, which makes published results hard to reproduce or compare. ## The Environment Suite - **Classic control and toy text:** Small-scale tasks from the RL literature, intended as a starting point. - **Algorithmic:** Tasks such as adding multi-digit numbers or reversing sequences, learned purely from examples. Difficulty scales with sequence length. - **Atari:** Classic games through an easy-to-install integration of the Arcade Learning Environment. - **Board games:** Go on 9x9 and 19x19 boards against a fixed Pachi opponent. Multi-player support is planned. - **2D and 3D robots:** Simulated control tasks built on the MuJoCo physics engine, including environments from a UC Berkeley benchmark. MuJoCo is proprietary but offers free trial licenses. Each environment carries a version number, such as Hopper-v0. Any change to an environment produces a new version, so results on a given version stay comparable over time. ## Evaluation Without Leaderboards - Users can upload results, but OpenAI chose not to build traditional leaderboards, since raw scores can be gamed through overfitting or hand-crafted solutions. - Instead, a curated list highlights contributions that show something interesting about algorithmic capability. The long-term goal is for this curation to be community-led. - Partners supporting the launch include NVIDIA (technical Q&A), Nervana (a DQN agent implementation), and AWS (US$250 credit vouchers for promising, resource-constrained researchers). ## Getting Involved - Work through the tutorial, or reproduce an existing result. - During the beta, feedback is requested on making the tool better for research. Contributors can push the state of the art on each environment, reproduce published results, or build new environments. Community chat is open.

OpenAI2016-02-241 min readCurated summary

Weight normalization: A simple reparameterization to accelerate training of deep neural networks

Weight normalization is a reparameterization of neural network weight vectors that separates each vector's length from its direction. This improves the conditioning of the optimization problem and speeds up stochastic gradient descent. Unlike batch normalization, it creates no dependencies between examples in a minibatch, so it works for recurrent models, reinforcement learning, and generative models. The authors report that it captures much of batch normalization's speedup at lower computational cost. ### The Reparameterization - Each weight vector is split into a length component and a direction component. - Decoupling these two components improves conditioning of the optimization problem. ### Advantages over Batch Normalization - It is inspired by batch normalization but is simpler to implement. - It does not depend on minibatch statistics, so each example is processed independently. - It suits recurrent architectures like LSTMs, where batch normalization is less well suited. - It suits noise-sensitive settings such as deep reinforcement learning and generative modelling. - Its computational overhead is lower, so more optimization steps fit in the same training time. ### Demonstrated Applications - Supervised image recognition - Generative modelling - Deep reinforcement learning