techlist.io

Variational Autoencoder

4 posts

OpenAI2018-07-252 min readCurated summary

Variational option discovery algorithms

This paper applies variational inference to option discovery in reinforcement learning and shows that these methods have a close connection to variational autoencoders (VAEs). The authors introduce VALOR, a new method built on that connection, and add a curriculum that increases the number of contexts the agent sees as its performance improves. The curriculum stabilizes training for VALOR and earlier variational option discovery methods, letting a single agent learn many more modes of behavior than a fixed context distribution allows. ## Connecting Option Discovery to Variational Autoencoders - The authors draw a tight link between variational option discovery methods and VAEs. - This connection leads to VALOR (Variational Autoencoding Learning of Options by Reinforcement). - In VALOR, the policy acts as the encoder, mapping contexts sampled from a noise distribution into trajectories. - A decoder then tries to recover the original context from the complete trajectory. ## Curriculum Over Contexts - The number of contexts the agent trains on grows over time. - The set expands only when the decoder shows the agent performs well enough on the current contexts. - The authors report that this simple schedule stabilizes training for VALOR and prior variational methods. - With the curriculum, a single agent can learn many more distinct behaviors than it can under a fixed context distribution. ## Limitations and Downstream Use - The authors also examine fundamental limitations of the general variational option discovery approach. - They investigate whether the learned options can be applied to downstream tasks.

OpenAI2018-01-304 min readCurated summary

Requests for Research 2.0

OpenAI released a second batch of seven unsolved research problems in January 2018, meant as an entry point for newcomers and a way for practitioners to sharpen their skills. Two warmup problems have known solutions, and the rest are open-ended and difficulty-rated, with many requiring new ideas. The problems span sequence modeling, multi-agent reinforcement learning, distributed training, transfer learning, efficient attention, data augmentation, regularization in RL, and automated theorem proving. ## Warmup Problems - **Learning XOR with an LSTM:** Train an LSTM to output the parity of a bit sequence after reading it one bit at a time. Test on 100,000 random binary strings of fixed length 50, then on strings whose lengths are drawn uniformly from 1 to 50, and explain any difference in results. - **Snake as a Gym environment:** Implement the classic Snake game as a Gym environment and train a reinforcement learning policy that can win it. ## Multi-Agent Self-Play in a Snake Environment - The "Slitherin'" problem asks for a multiplayer Snake environment inspired by slither.io, with a large field, randomly appearing fruit that grows snakes, and deaths from collisions with other snakes, oneself, or walls. - Start with two snakes and scale up. The game ends when all snakes die. - Train with self-play, which tends to be unstable in a way similar to GANs. Possible fixes include training the current policy against a distribution of past policies. - Analyze whether agents learn to pursue food and avoid collisions, and whether they learn aggressive tactics like trapping or ganging up on opponents. ## Distributed RL and Parameter Averaging - Study how parameter averaging schemes affect sample complexity and communication cost. - Averaging gradients from every worker on every update is the simplest approach. Alternatives include letting workers update independently and averaging parameters infrequently, or using EASGD to pull parameters partly together at each update. - Independent workers may hold different parameters at any moment, which could improve exploration. ## Transfer Learning Through Generative Models - Train good policies for 11 Atari games and generate 10,000 trajectories of 1,000 steps per game. - Fit a generative model, such as a Transformer, on trajectories from 10 games, then fine-tune it on the 11th. - Measure how large the model must be for pre-training to help, and how the benefit changes when the 11th game's data is reduced by 10x and 100x. ## Linear Attention Transformers - Replace softmax attention with linear attention, which can be run as an RNN with fast weights. This would make RL rollouts over very long contexts practical. - The goal is to match the bits-per-character or bits-per-word of a standard Transformer on a language modeling task, using a linear-attention model with different hyperparameters and a similar parameter count. - The authors suggest linear attention may need much higher-dimensional key and value vectors, and that this may prove impossible. ## Learned Data Augmentation - Train a VAE on the inputs, then augment each training point by encoding it, adding a small Gaussian perturbation in latent space, and decoding it back. - The hope is that this captures nonlinear transformations such as viewpoint or lighting changes, and approximates the transformations under which labels are invariant. ## Regularization in Reinforcement Learning - Empirically test and qualitatively explain how regularizers like dropout, batch normalization, and L2 affect RL algorithms such as policy gradients and Q-learning, where they have historically helped little. - RL practitioners use much smaller models than supervised learning does, and larger models often perform worse, possibly because they overfit to recent experience. ## Automated Olympiad Inequality Proving - Build a dataset of olympiad inequality problems and write a program that solves a large share of them. - Machine learning may or may not help, but a learned policy could reduce the search branching factor.

OpenAI2016-11-072 min readCurated summary

Variational lossy autoencoder

Variational Lossy Autoencoder proposes a way to learn global representations that capture overall structure while discarding irrelevant detail such as texture. The method combines a Variational Autoencoder (VAE) with neural autoregressive models. The architecture is designed so the latent code cannot encode fine-grained information, which makes the VAE a lossy autoencoder. The approach also improves generative performance, reaching state-of-the-art density estimation results on MNIST, OMNIGLOT, and Caltech-101 Silhouettes. ### Learning Global Representations - Representation learning aims to expose useful aspects of data in a form that supports downstream tasks like classification. - For 2D images, a good representation describes global structure and ignores detailed texture. ### Controlling the Latent Code with Architecture - The VAE architecture is designed to control what the global latent code can learn. - By restricting the latent code, the model is forced to discard irrelevant information such as texture, so the VAE only "autoencodes" the data in a lossy way. ### Autoregressive Priors and Decoders - Autoregressive models such as RNN, MADE, and PixelRNN/CNN serve as both the prior distribution p(z) and the decoding distribution p(x|z). - This substantially improves the generative modeling performance of VAEs. ### Benchmark Results - The model achieves new state-of-the-art results on density estimation for MNIST, OMNIGLOT, and Caltech-101 Silhouettes.