Differentiable programming is a fresh programming paradigm which composes parameterized algorithmic components and optimizes them using gradient search. The concept emerges from deep learning but is not limited to training neural networks. We present the theory and practice of programming tensor network algorithms in a fully differentiable way. By formulating the tensor network algorithm as a computation graph, one can compute higher-order derivatives of the program accurately and efficiently using automatic differentiation. We present essential techniques to differentiate through the tensor networks contraction algorithms, including numerical stable differentiation for tensor decompositions and efficient backpropagation through fixed-point iterations. As a demonstration, we compute the specific heat of the Ising model directly by taking the second-order derivative of the free energy obtained in the tensor renormalization group calculation. Next, we perform gradient-based variational optimization of infinite projected entangled pair states for the quantum antiferromagnetic Heisenberg model and obtain state-of- the-art variational energy and magnetization with moderate efforts. Differentiable programming removes laborious human efforts in deriving and implementing analytical gradients for tensor network programs, which opens the door to more innovations in tensor network algorithms and applications.
Dr. Haijun Liao is an associate professor in Institute of Physics, Chinese Academy of Sciences (CAS). His main research interest is the development of new tensor renormalization group methods to study strongly correlated systems as well as classical statistical models. He obtained his Ph.D in 2014 from Renmin University of China. During 2014/7-2017/10, he worked in Institute of Physics, CAS as a postdoc. From 2017/11 to present, he works in Institute of Physics, CAS. In 2021, he was selected as a member of the Youth Promotion Association of the Academy of Sciences.