2017

Automatic Differentiation in PyTorch

A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. Devito, Zongyu Lin, A. Desmaison, L. Antiga, Adam Lerer

citations

Cite Score

89

AI summary

This paper introduces an automatic differentiation module of PyTorch, a library designed to enable rapid research on machine learning models. It focuses on differentiation of purely imperative programs, with a focus on extensibility and low overhead. It achieves high performance on both CPU and GPU.

Main Contributions

  • Introduces a novel design and implementation choices for automatic differentiation.
  • Implements simple but effective mechanisms to address problems with in-place operations.
  • Eschews the traditional tape, where every intermediate result records only the subset of the computation graph that was relevant to their computation.
  • Achieves lower overhead compared to other frameworks using carefully tuned C++ code.
  • Allows users to inspect gradients through a hooks mechanism to observe when the backwards of a function is invoked.

Abstract

In this article, we describe an automatic differentiation module of PyTorch a library designed to enable rapid research on machine learning models. It builds upon a few projects, most notably Lua Torch, Chainer, and HIPS Autograd [4], and provides a high performance environment with easy access to automatic differentiation of models executed on different devices (CPU and GPU). To make prototyping easier, PyTorch does not follow the symbolic approach used in many other deep learning frameworks, but focuses on differentiation of purely imperative programs, with a focus on extensibility and low overhead. Note that this preprint is a draft of certain sections from an upcoming paper covering all PyTorch features.

Citation Graph

Loading graph...

References [6]

Sort:
Filter:

M. Abadi, Akshat Agarwal, P. Barham, E. Brevdo, Ziru Chen, C. Citro, G. Corrado, A. Davis, Jeffrey Dean, M. Devin, Sanjay Ghemawat, I. Goodfellow, A. Harp, Geoffrey Irving, M. Isard, Y. Jia, R. Jozefowicz, Lukasz Kaiser, M. Kudlur, J. Levenberg, D. Mane, R. Monga, S. Moore, D. Murray, Christopher Olah, M. Schuster, J. Shlens, B. Steiner, Ilya Sutskever, K. Talwar, P. Tucker, Vincent Vanhoucke, V. Vasudevan, F. Viegas, Oriol Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, Xiaoqiang Zheng - 2015

11 papers in library cite

E. Jones, T. Oliphant, P. Peterson - 2001

2 papers in library cite

B. Speelpenning - 1980

1 paper in library cites

Graham Neubig, C. Dyer, Y. Goldberg, O. Matthews - 2017

1 paper in library cites

A. Griewank - 2000

1 paper in library cites

D. Maclaurin - 2016

1 paper in library cites

Cited by

3

papers in your library

Cites

1

papers in your library

Read

on November 21, 2025

Your review

Tags

Paper Aliases

No aliases