随机K-FACs:用随机数值线性代数加速K-FAC
Randomized K-FACs: Speeding up K-FAC with Randomized Numerical Linear Algebra
摘要:
K-FAC是自然梯度在深度学习中的一个成功的易处理的实现,但是它需要计算克罗内克因子的逆(通过特征分解)。当这些因素很大时,这可能非常耗时(甚至令人望而却步)。在本文中,我们从理论上表明,由于指数平均建设范式的克罗内克因子,通常使用,其本征谱必须衰减。我们数值计算表明,在实践中,这种衰减是非常迅速的,导致的想法,我们可以节省大量的计算只专注于前几个本征模式时,反转的克罗内克因子。重要的是,光谱衰减发生在恒定数量的模式上,与层宽无关。这使得我们能够将K-FAC的时间复杂度从层宽度的三次方降低到二次方,部分地关闭了w.r.t. SENG(另一个用于深度学习的实用自然梯度实现,其宽度线性缩放)。随机数值线性代数为我们提供了必要的工具。数值结果表明,我们得到了$\approx2.5\times$减少每历元的时间和$\approx3.3\times$减少时间的目标精度。我们比较了我们提出的K-FAC加速版本SENG,并观察到对于CIFAR 10分类与VGG16_bn,我们的表现与之相当。
英文摘要:
K-FAC is a successful tractable implementation of Natural Gradient for Deep Learning, which nevertheless suffers from the requirement to compute the inverse of the Kronecker factors (through an eigen-decomposition). This can be very time-consuming (or even prohibitive) when these factors are large. In this paper, we theoretically show that, owing to the exponential-average construction paradigm of the Kronecker factors that is typically used, their eigen-spectrum must decay. We show numerically that in practice this decay is very rapid, leading to the idea that we could save substantial computation by only focusing on the first few eigen-modes when inverting the Kronecker-factors. Importantly, the spectrum decay happens over a constant number of modes irrespectively of the layer width. This allows us to reduce the time complexity of K-FAC from cubic to quadratic in layer width, partially closing the gap w.r.t. SENG (another practical Natural Gradient implementation for Deep learning which scales linearly in width). Randomized Numerical Linear Algebra provides us with the necessary tools to do so. Numerical results show we obtain $\approx2.5\times$ reduction in per-epoch time and $\approx3.3\times$ reduction in time to target accuracy. We compare our proposed K-FAC sped-up versions SENG, and observe that for CIFAR10 classification with VGG16_bn we perform on par with it.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。