techlist.io

Acktr

1 posts

OpenAI2017-08-173 min readCurated summary

OpenAI Baselines: ACKTR & A2C

# OpenAI Baselines: ACKTR and A2C OpenAI released two new reinforcement learning implementations in its Baselines library: ACKTR and A2C. A2C is a synchronous, deterministic version of Asynchronous Advantage Actor Critic (A3C) that matches A3C's performance, while ACKTR is more sample-efficient than both TRPO and A2C at only a slightly higher computational cost per update. The post presents both as practical, well-benchmarked options for researchers and practitioners. ## What ACKTR Is - ACKTR (Actor Critic using Kronecker-factored Trust Region) was developed by researchers at the University of Toronto and New York University, with OpenAI collaborating on the Baselines release. - It combines three techniques: actor-critic methods, trust region optimization for more consistent improvement, and distributed Kronecker factorization to improve sample efficiency and scalability. - The authors applied it to simulated robots (pixel input, continuous actions) and Atari agents (pixel input, discrete actions). ## Sample and Computational Efficiency - **Sample complexity** is the number of environment interaction timesteps needed, and **computational complexity** is the number of numerical operations required. - ACKTR takes a step along the natural gradient rather than the plain gradient (or a rescaled version such as ADAM's). The natural gradient gives the parameter-space direction with the largest improvement in the objective per unit change in the network's output distribution, measured by KL divergence. - Limiting the KL divergence keeps the new policy from changing radically from the old one, which could otherwise collapse performance. - The KFAC update used by ACKTR costs only 10–25% more per step than a standard gradient update. TRPO, by contrast, relies on Hessian-free optimization with a more expensive conjugate-gradient computation. - In a Q-Bert comparison across timesteps, ACKTR agents achieved higher scores than A2C agents. ## Benchmarks - The release includes benchmarks comparing ACKTR against A2C, PPO, and ACER across a range of tasks. - On 49 Atari games, ACKTR was compared with A2C, PPO, and ACER. Its hyperparameters were tuned by the algorithm's author on a single game, Breakout. - ACKTR scales well with batch size because it uses each batch both to estimate the gradient and to approximate the local curvature of the parameter space. This makes it well suited to large-scale distributed training with large batches. ## A2C and A3C A3C combined three ideas: updates over fixed-length experience segments (for example, 20 timesteps) used to estimate returns and the advantage function, policies and value functions sharing layers, and asynchronous updates. Researchers questioned whether the asynchrony actually improved performance or was just an implementation detail enabling faster CPU-based training. - A2C answers this with a synchronous, deterministic design: it waits for every actor to finish its segment, then performs a single update averaging over all actors. - This suits GPUs, which perform best with large batches. - OpenAI found the synchronous A2C outperforms its asynchronous implementations, with no evidence that asynchrony's noise helps performance. - A2C is more cost-effective than A3C on single-GPU machines and faster than CPU-only A3C when using larger policies. - Baselines includes code for training feedforward convnets and LSTMs on the Atari benchmark with A2C.