A network learned an old task and is now training on a new one. So it doesn’t forget the old task, training pays a cost for moving weights away from where the old task left them: how much worse the old task gets. Write forgetting_cost(old_weights, new_weights, importance). importance[i] is how much the old task’s loss rises when weight i moves by 1, either way: 0 means the old task doesn’t care about that weight.
Training on the new task slides each weight away from where the old task left it. The old task cares about w3 most and about w2 not at all. What should this move cost?
click a weight to see where it moved
forgetting_cost(old_weights, new_weights, importance)| old_weights | where the old task left each weight | e.g. [0.5, −1.2, 2] |
| new_weights | where they are now | e.g. [0.5, −1.2, 2] |
| importance | how much the old task's loss rises if that weight moves by 1 | e.g. [2, 0, 5] |
| returns | one number: the cost of the move | |