techlist.io

Variational Autoencoders

3 posts

OpenAI2018-11-063 min readCurated summary

Learning concepts with energy functions

# Learning Concepts with Energy Functions OpenAI researchers developed an energy-based model that learns to identify and generate abstract concepts, such as "near," "between," or "furthest," from just five demonstrations. The concepts are expressed as sets of 2D points, and the model can transfer them across domains: concepts learned in a 2D particle environment are used to solve tasks on a 3D physics-based robot without retraining. The authors argue that forming reusable concepts is a basic building block of generalization, abstract reasoning, and planning. ## Why Concepts Matter - Human intelligence relies on consolidating experience into concepts, such as visual ("red," "square"), spatial ("inside," "on top of"), temporal ("slow," "after"), and social ("helpful") ones. - Concepts give agents basic building blocks for understanding and reasoning, enabling them to generalize from limited experience. ## How Energy Functions Represent Concepts - Energy models are inspired by physics: observed states correspond to low-energy configurations. - Each concept is defined by an energy function E(x, a, w) with three inputs: - **x**: the state of the world, composed of entities and their properties and positions - **a**: an attention mask over entities, used for identification - **w**: a continuous conditioning vector specifying which concept is being evaluated - The model outputs a single positive number. Energy is zero when the concept is satisfied and high otherwise. - A concept is satisfied when the attention mask focuses on entities that are in the correct positions (generation) and are the right entities (identification). - The energy function is a relational network, so it can accept an arbitrary number of entities. ## One Network for Generation and Recognition - A single network handles both generating a concept (moving entities in x) and identifying it (changing the attention mask over a fixed x). - Concepts learned through one mode can be applied to the other. ## Training Procedure - Training data consists of trajectories of (attention mask, state) pairs generated for each target concept. - The model sees about five demonstrations of a concept, then receives a new environment (X0) and predicts the next state (X1) and next attention mask (a). - The energy function is optimized so the correct next state and mask receive low energy, similar in spirit to variational autoencoders, which encourages compressed, useful representations. - Training covered visual, spatial, proximal, and temporal relations, plus quantification, in a 2D particle environment. ## Results - The system learned to classify and generate spatial relationships, move entities through scenes in specified ways, and judge quantities (one, two, three, or more than three) and proximity. - Joint training on generation and identification outperformed training on either operation alone. - Transfer also emerged: an energy function trained only on recognition performed well on generation without explicit training for it. ## Future Directions - Learning concepts in richer, three-dimensional environments - Integrating concepts with agent decision-making policies, since the work so far used only passive experience - Connecting concepts to language understanding

OpenAI2017-03-112 min readCurated summary

Prediction and control with temporal segment models

This paper introduces a method for learning the dynamics of complex nonlinear systems using deep generative models over temporal segments of states and actions rather than single timesteps. The approach combines convolutional autoregressive models with variational autoencoders to produce stable, accurate long-horizon predictions for stochastic systems. The learned model and action prior support end-to-end, differentiable trajectory optimization and model-based policy optimization, and the authors evaluate both performance and sample efficiency. ## Segment-level Dynamics Modeling - Traditional dynamics models predict one discrete timestep at a time. - This method instead learns a distribution over future state trajectories. - Predictions are conditioned on past states, past actions, and planned future action trajectories. - A latent prior over action trajectories is learned alongside the dynamics model. ## Architecture - The model is built on convolutional autoregressive models. - Variational autoencoders provide the generative framework. - The design is intended to handle complex, stochastic systems. ## Modeled Phenomena and Prediction Quality - Predictions remain stable and accurate over long horizons. - The model expresses uncertainty explicitly. - It captures collisions, sensory noise, and action delays. ## Applications in Control - The learned dynamics model and action prior can be used for end-to-end, fully differentiable trajectory optimization. - The same components support model-based policy optimization. - The authors use these applications to evaluate both the performance and sample efficiency of the method.

OpenAI2016-11-132 min readCurated summary

On the quantitative analysis of decoder-based generative models

Generative models such as variational autoencoders, GANs, and generative moment matching networks share a decoder network, but their performance is hard to measure because their log-likelihoods are intractable and inspecting samples can be misleading. The post proposes Annealed Importance Sampling (AIS) as a way to estimate log-likelihoods for decoder-based models, and it validates the estimates with bidirectional Monte Carlo. The authors use this technique to assess how well these models perform, how reliable existing estimators are, how much they overfit, and how well they cover the modes of the data distribution. ## Decoder-Based Generative Models - A decoder is a parametric deep neural network that defines a generative distribution over data. - The approach covers several families: variational autoencoders, generative adversarial networks, and generative moment matching networks. - The post treats the decoder as the shared component across these otherwise different models, which is what makes a single evaluation method applicable to all of them. ## The Evaluation Problem - Log-likelihood is the standard quantitative metric for generative models, but it cannot be computed exactly for decoder-based models. - Visual inspection of samples is the common fallback, but the post argues it can mislead, since good-looking samples do not show whether the model covers the whole data distribution or merely memorizes parts of it. ## Annealed Importance Sampling for Log-Likelihood Estimation - AIS is used to estimate the log-likelihood of decoder-based models in place of an intractable exact computation. - Its accuracy is checked with bidirectional Monte Carlo, which bounds the estimate from both directions to show how close it is to the true value. - The evaluation code is released publicly so others can reproduce the method. ## What the Analysis Reveals - The approach measures overall performance of decoder-based models across the families above. - It tests how effective existing log-likelihood estimators are, not just the models themselves. - It quantifies the degree of overfitting to the training data. - It indicates how much of the data distribution these models fail to capture, specifically which important modes they miss. ## Practical Takeaway If you are comparing decoder-based generative models, relying on sample quality alone is insufficient. Estimating log-likelihood with AIS, and checking the estimate with bidirectional Monte Carlo, gives a more rigorous basis for comparison, including on overfitting and mode coverage.