Search

Search papers and lessons

Progressive Neural Networks

Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins et al. · 2016

Rusu and colleagues add a fresh network column for each new task and connect it sideways to the frozen columns, so a network learns new tasks in sequence without overwriting old ones.

On this page

  • Colour = topic mix
  • Reinforcement learning
  • Probability
  • Discrete math
  • Calculus
  • Neural network basics
  • Linear algebra
  • ReadReady to readNot yet

TL;DR

Fine-tuning a pretrained network on a new task overwrites the weights that served the old task, so after a sequence of tasks the network has forgotten the earlier ones. Rusu and colleagues propose progressive networks: each new task gets a new network column, the earlier columns are frozen, and the new column receives their features through lateral connections. Old tasks stay intact by construction, and the new column can reuse whichever old features help. On reinforcement learning tasks (Pong variants, Atari games and a 3D maze) it transfers about as well as fine-tuning or better, without destroying what was learned before.

Builds on: Transfer Learning, Catastrophic Forgetting, Asynchronous Methods for Deep Reinforcement Learning, Fisher Information, Convolutional Neural Network · Leads to: architectures for continual learning that add capacity as tasks arrive

Why it mattered

Pretraining and fine-tuning is the default way to reuse a network, and it works well when the new task is similar to the old one. It fails as a sequence method: the model has no record of earlier tasks once it is updated, and choosing which checkpoint to start from becomes a question of its own. The paper's architecture makes the old tasks permanent. Its ideas show up in later work on continual and lifelong learning, where the central design question became how to add capacity for new tasks without overwriting old ones. The paper's own limits, such as the growing parameter count, are still open problems in that area.

The problem

Reinforcement learning agents often face several tasks in sequence: a game is replaced by another game, or a robot's environment changes. A network trained on the first task and then trained on the second is pulled by the second task's loss, so the weights that solved the first task drift away from their old values. This is catastrophic forgetting, and it is especially damaging in reinforcement learning because the old skill cannot be relearned from a fixed dataset.

Fine-tuning reduces the cost of a new task when the tasks overlap, but it still destroys the old function. A common fix is to keep a copy of each model, which keeps the old behavior but gives no path for the new task to reuse old features. The paper asks for three things at once: solve each task at the end of training, speed up learning through transfer when possible, and avoid forgetting. It makes no assumption that the tasks are related, which means they may even be unrelated or conflicting.

How it works

The architecture is built one column at a time. Each column is a deep network with the same layer structure, and a column is trained for one task.

  1. Train column 1. Train an ordinary network on task 1 until it converges. Then freeze all of its weights.
  2. Add column 2. For task 2, create a new column with random weights. Each of its hidden layers receives two inputs: the previous layer of its own column, and the previous layer of column 1 through a lateral connection.
  3. Train only the new column. The weights of column 1 are constants for the optimizer. Gradients only update column 2 and its lateral connections, so task 1 cannot be disturbed.
  4. Use the frozen features. If column 1 has a useful low-level feature, column 2 can wire its lateral connection to that feature. If the feature is useless, the connection learns a small weight. Column 2 can use, reshape or ignore what column 1 computed.
  5. Repeat for later tasks. Column 3 receives inputs from columns 1 and 2, and so on. Each new column is trained with all earlier columns frozen.
  6. Pick a column at test time. Each task keeps its own column, so inference for task kk uses column kk. The paper notes that this needs the task label at test time.

A tiny trace shows the lateral path. Suppose column 1 has one hidden unit with value h(1)=2h^{(1)} = 2 on some input, frozen from task 1. Column 2 has a unit that receives input x=1x = 1 with weight W=0.5W = 0.5, and a lateral connection from column 1 with weight U=0.25U = 0.25. Its activation is max⁡(0, 0.5⋅1+0.25⋅2)=max⁡(0,1.0)=1.0\max(0,\, 0.5 \cdot 1 + 0.25 \cdot 2) = \max(0, 1.0) = 1.0. If the frozen column instead produced −4-4, the same unit would get max⁡(0, 0.5−1.0)=0\max(0,\, 0.5 - 1.0) = 0. The new column reads old features without changing them. This trace is an illustration written for this lesson, not a number from the paper.

flowchart LR
    subgraph C1["Column 1: task 1, frozen"]
        A1["Layer 1"] --> A2["Layer 2"] --> A3["Output 1"]
    end
    subgraph C2["Column 2: task 2, trained"]
        B1["Layer 1"] --> B2["Layer 2"] --> B3["Output 2"]
    end
    A1 -. lateral .-> B2
    A2 -. lateral .-> B3

The paper adds one practical element: the lateral connections are not plain weight matrices. An adapter first passes the old features through a small hidden layer, which projects them to a lower dimension and keeps the parameter count of the lateral path in the same order as the first column. A learned scalar rescales the old activations before they enter the adapter, because the old features can have very different sizes.

The math

Let column kk have layers i=1,…,Li = 1, \dots, L, with hidden activations hi(k)h_i^{(k)}. For one column with no lateral inputs, the layer rule is

hi(k)=f(Wi(k)hi−1(k)+∑j<kUi(k:j)hi−1(j)),h_i^{(k)} = f\left(W_i^{(k)} h_{i-1}^{(k)} + \sum_{j < k} U_i^{(k:j)} h_{i-1}^{(j)}\right),

where Wi(k)W_i^{(k)} is the weight matrix of layer ii in column kk, and Ui(k:j)U_i^{(k:j)} are the lateral weights from layer i−1i - 1 of column jj into layer ii of column kk. The non-linearity is f(x)=max⁡(0,x)f(x) = \max(0, x), the Rectified Linear Unit (ReLU) function, for all intermediate layers.

Step 3 in symbols: freezing the earlier columns

When training column kk, the parameters {Θ(j):j<k}\{\Theta^{(j)} : j < k\} are held constant. The gradient with respect to column kk only involves the terms that contain Θ(k)\Theta^{(k)} and the lateral weights into column kk. The lateral connections carry features from columns j<kj < k into column kk and never the other way, so the earlier columns' outputs do not depend on column kk and never change. This is the formal reason no task interferes with another.

Step 4 in symbols: adapters

The adapter version of a dense layer is

hi(k)=σ(Wi(k)hi−1(k)+Ui(k:j) σ(Vi(k:j) αi−1(<k) hi−1(<k))),h_i^{(k)} = \sigma\left(W_i^{(k)} h_{i-1}^{(k)} + U_i^{(k:j)} \, \sigma\left(V_i^{(k:j)} \, \alpha_{i-1}^{(<k)} \, h_{i-1}^{(<k)}\right)\right),

where hi−1(<k)h_{i-1}^{(<k)} stacks the earlier columns' features, αi−1(<k)\alpha_{i-1}^{(<k)} is the learned scalar that rescales them, and Vi(k:j)V_i^{(k:j)} is a projection matrix that reduces dimension before the non-linearity. For convolutional layers the paper uses 1×11 \times 1 convolutions for the same reduction. The symbol σ\sigma stands for the non-linearity of the adapter.

Step 5 in symbols: the sensitivity measure

To see which features a column uses, the paper defines a diagonal Fisher matrix over the normalized activations h^\hat{h} of a layer:

F^i(k)=Eρ(s,a)[∂log⁡π∂h^i(k)(∂log⁡π∂h^i(k))T],\hat{F}_i^{(k)} = \mathbb{E}_{\rho(s,a)}\left[\frac{\partial \log \pi}{\partial \hat{h}_i^{(k)}} \left(\frac{\partial \log \pi}{\partial \hat{h}_i^{(k)}}\right)^{T}\right],

where π\pi is the policy and ρ(s,a)\rho(s,a) the distribution of states and actions. Its diagonal entry for feature mm is the Average Fisher Sensitivity of that feature:

AFS(i,k,m)=F^i(k)(m,m)∑k′F^i(k′)(m,m).\text{AFS}(i, k, m) = \frac{\hat{F}_i^{(k)}(m,m)}{\sum_{k'} \hat{F}_i^{(k')}(m,m)}.

The denominator sums over columns, so AFS measures what share of a feature's sensitivity comes from each column. The paper uses the Fisher Information idea of squared slopes of the log-likelihood as a cheap local stand-in for perturbation analysis, which it compares against directly.

Results

The reinforcement learning setup uses the Async Advantage Actor-Critic method (Asynchronous Methods for Deep Reinforcement Learning) on CPUs with multiple threads. Each reported number averages the top 3 of 25 jobs, with different seeds and hyperparameters. Performance is the area under the learning curve, not the final score. The transfer score is the performance relative to a single column trained only on the target task (baseline 1).

  • Pong variants. Baseline 2 (pretrain, then fine-tune only the output layer) often fails. Full fine-tuning (baseline 3) transfers well when the tasks are compatible. Progressive networks beat it on the mean, where the paper's Table 1 shows 222 percent for three columns against 181 percent for baseline 3, and on the median, 183 against 160.
  • Atari. Across 12 target games, progressive nets show positive transfer on 8 and negative transfer on 2, while baseline 3 is positive on 5 of 12. On the mean, two columns give 132 percent and four columns 141 percent, against 133 percent for baseline 3, so with two columns the mean is roughly equal. On the median, four columns reach 116 percent against 110 percent for baseline 3. The advantage grows with more columns, but it is modest on Atari.
  • Labyrinth. Two columns reach a mean of 491 percent against 235 percent for baseline 3, with medians of 115 and 112. The median gain is small, so the large mean reflects a few tasks where transfer was strong.
  • Where transfer happens. On the Pong variants, switching from Pong to horizontal flip keeps the convolutional features and relearns the fully connected layer. Switching to the zoomed version keeps low-level vision and learns new mid-level features.

Limits: the number of parameters grows with the number of columns, and the paper finds that only part of the new capacity is used. Choosing a column at test time needs the task label. The Atari results are the paper's broadest test, and the authors note that the most negative transfer occurs when the new column depends entirely on the old convolutional features without learning new ones.

Reading guide

Check yourself

QuestionWhy can a progressive network learn a new task without forgetting an old one, even though the new task updates some weights?Show answer

The old columns are frozen, so their weights are constants for the optimizer during training of the new column. The new column only adds parameters and lateral connections, and lateral connections run from the old columns into the new one, so the old columns' outputs are unchanged in the forward pass.

QuestionA frozen column produces −4-4 for a feature, and a new unit has a lateral weight U=0.25U = 0.25 on it and an input contribution of 0.5⋅1=0.50.5 \cdot 1 = 0.5. What is the unit's output after the ReLU?Show answer

The pre-activation is 0.5+0.25⋅(−4)=0.5−1.0=−0.50.5 + 0.25 \cdot (-4) = 0.5 - 1.0 = -0.5. The ReLU gives max⁡(0,−0.5)=0\max(0, -0.5) = 0. The unit is switched off by that feature.

QuestionWhy does the paper rescale the lateral inputs with a learned scalar before the adapter?Show answer

The features of different earlier columns can have very different magnitudes, so without rescaling one column could dominate the adapter's input. The learned scalar adjusts each input to a comparable scale, which helps the initial conditioning of the lateral path.

QuestionOn Atari, the paper reports that two progressive columns have a mean transfer of 132 percent and baseline 3 has 133 percent. What does this say about the claim that progressive networks always beat fine-tuning?Show answer

On the mean over Atari target games, the two-column progressive network does not beat full fine-tuning. The claim of a clear advantage holds for more columns, for the median in some settings, and on Labyrinth and Pong. The result shows that progressive nets are competitive with fine-tuning on Atari, not uniformly better.

QuestionA team wants to deploy a progressive network on ten tasks in sequence. Name one cost the paper identifies and one practical question they should answer before deploying.Show answer

The cost is that the number of parameters grows with the number of tasks, and the paper finds only part of the new capacity is used. The question is how the system will pick the right column at test time, because the paper's design needs the task label for inference.

Sources

Read the full paper

Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins et al., 2016. arXiv:1606.04671