https://twitter.com/theshawwn/status/1355343951033602057
https://news.ycombinator.com/item?id=25964420
Unfortunately, no one seems to understand it, which isn't a great sign. I'm either not explaining it very well, or the idea doesn't make sense.
In short:
for example in batch:
accum += adam(gradients(example))
param += accum
accum = 0
That way, adam statistics are updated for every training example.Traditional gradient accumulation looks like this:
for example in batch:
accum += gradients(example)
param += adam(accum)
accum = 0
... which only updates Adam once.(It's equivalent to a bigger batch size.)
Probably best to just implement Adam accumulation and see if it works, I suppose.
(Sorry for rambling about this here. I was just hoping to find some prior work along these lines, if anyone knew of something.)