CAFIN: CUDA-accelerated Adaptive Fisher Information Matrix Network Optimization via GPU-Native Kernel Fusion
Maryam Arshad, Muhammad Khuram Shahzad
Abstract
Second-order optimizers improve deep neural network training using curvature information, but their practical efficiency is limited by GPU execution overhead. AdaFisher reduces Fisher Information Matrix (FIM) approximation costs through diagonal Kronecker structures and exponential moving averages, yet its PyTorch implementation requires sequential CUDA kernel launches, intermediate tensor allocations, and repeated memory accesses. We introduce CAFIN, a GPU-native CUDA kernel fusion framework that improves AdaFisher execution efficiency without changing its optimization formulation. The proposed approach progressively integrates FIM preconditioner construction, exponential moving average updates, gradient preconditioning, momentum accumulation, weight decay, and parameter updates into fused CUDA kernels. Shared-memory reuse, register-resident computation, and in-place operations further reduce memory traffic and intermediate allocations. Experiments using ResNet-18 on CIFAR-10, CIFAR-100, and Tiny ImageNet across NVIDIA GTX 1660 Ti and RTX 3060 Laptop GPUs demonstrate up to 78.4% lower isolated FIM construction latency and 2.1-26.9% lower optimizer-step latency. The implementation also eliminates approximately 18.91 MB of intermediate GPU memory allocations per optimizer step. Numerical validation confirms consistency within the predefined FP32 tolerance, while convergence accuracy remains comparable across evaluated datasets and random seeds. These findings demonstrate that CUDA kernel fusion can substantially accelerate second-order optimization while preserving AdaFisher's underlying mathematical formulation and learning behavior.
Create a lesson
Related papers
KernelMosaic: An Open Dataset and Agentic Framework for CUDA Kernel Generation
Shared title terminology · Ningyuan Xi, Yuhang Lai, Ning Miao
Solving the pre-image problem in kernel PCA: The reproducing property is all you need
Shared title terminology · Joel-Pascal Ntwali N'konzi, Stefan Klus
Beyond Sample Hardness: Adaptive Data Selection through Learning Dynamics
Shared title terminology · Hai Gan, Suorong Yang, Guang Li et al.
Quantum-Informed Regularized Poisson Learning for Graph-Based Semi-Supervised Classification
Shared title terminology · Hamed Gholipour, Farid Bozorgnia, Hamzeh Mohammadigheymasi et al.
Adapting AI Weather Foundation Models to a Changing Climate
Shared title terminology · Xinlei Xiong, Wenbo Hu, Shuxun Zhou et al.
Minimax-Optimal Small-Loss Regret in Online Convex Optimization and Applications to Contextual Search and Online Inverse Optimization
Shared title terminology · Shinsaku Sakaue