HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
HIPS
autograd
Python2015–2023
HIPS / autograd

autograd

Efficiently computes derivatives of NumPy code.

18Distinct people
21Mentions
1Explicit recommenders
7.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Efficiently computes derivatives of NumPy code.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I love the discussion thread on GitHub: https://github.com/HIPS/autograd/pull/175#issuecomment-30652... As someone just starting to study machine learning it's inspiring and…

davedx used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 4:00:59 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year21 dated mentions

Observed mentions: 2015-05-12 08:42:52 UTC to 2023-10-02 17:28:27 UTC.

02462015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC312
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC606
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC312
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Autograd Autograd can automatically differentiate native Python and Numpy code. It can handle a large subset of Python's features, including loops, ifs, recursion and closures, and it can even take derivatives of derivatives of derivatives. It supports reverse-mode differentiation (a.k.a. backpropagation), which means it can efficiently take gradients of scalar-valued functions with respect to array-valued arguments, as well as forward-mode differentiation, and the two can be composed arbitrarily. The main intended application of Autograd is gradient-based optimization. For more information, check out the tutorial and the examples directory. Example use: >>> import autograd.numpy as np # Thinly-wrapped numpy >>> from autograd import grad # The only autograd function you may ever need >>> >>> def tanh(x): # Define a function ... return (1.0 - np.exp((-2 * x))) / (1.0 + np.exp(-(2 * x))) ... >>> grad_tanh = grad(tanh) # Obtain its gradient function >>> grad_tanh(1.0) # Evaluate the gradient at x = 1.0 np.float64(0.419974341614026) >>> (tanh(1.0001) - tanh(0.9999)) / 0.0002 # Compare to finite differences np.float64(0.41997434264973155) We can continue to differentiate as many times as we like, and use numpy's vectorization of scalar-valued functions across many different input values: >>> from autograd import elementwise_grad as egrad # for functions that vectorize over inputs >>> import matplotlib.pyplot as plt >>> x = np.linspace(-7, 7, 700) >>> plt.plot(x, tanh(x), ... x, egrad(tanh)(x), # first derivative ... x, egrad(egrad(tanh))(x), # second derivative ... x, egrad(egrad(egrad(tanh)))(x), # third derivative ... x, egrad(egrad(egrad(egrad(tanh))))(x),) # fourth derivative >>> plt.show() See the tanh example file for the code. Documentation You can find a tutorial here. End-to-end examples Simple neural net Convolutional neural net Recurrent neural net LSTM Neural Turing Machine Backpropagating through a fluid simulation Variational inference in Bayesian neural network Gaussian process regression Sampyl, a pure Python MCMC package with HMC and NUTS How to install Install Autograd using Pip: pip install autograd Some features require SciPy, which you can install separately or as an optional dependency along with Autograd: pip install "autograd[scipy]" Authors and maintainers Autograd was written by Dougal Maclaurin, David Duvenaud, Matt Johnson, Jamie Townsend and many other contributors. The package is currently being maintained by Agriya Khetarpal, Fabian Joswig and Jamie Townsend. Please feel free to submit any bugs or feature requests. We'd also love to hear about your experiences with Autograd in general. Drop us an email! We want to thank Jasper Snoek and the rest of the HIPS group (led by Prof. Ryan P. Adams) for helpful contributions and advice; Barak Pearlmutter for foundational work on automatic differentiation and for guidance on our implementation; and Analog Devices Inc. (Lyric Labs) and Samsung Advanced Institute of Technology for their generous support.
Read the full README on GitHub

What Hacker News says

3 sources
As far as I understand, the adjoint method computes gradients for functions that obey hard constraints (such as fluid solvers), and the main advantage is that it avoids differentiating through iterative constraint satisfaction procedures. I had some success with naively differentiating through fluid solvers, though. Here is a fluid field whose initial velocities have been initialized so that it will end up matching a given image (i.e. blowing a fancy smoke ring:) https://github.com/HIPS/autograd/blob/master/examples/fluids... and here's a free-form wing shape in the middle of being optimized to maximize lift-to-drag ratio: https://github.com/HIPS/autograd/blob/master/examples/fluids... I too find it baffling when I see engineers doing gradient-free optimization of simulated objective functions, although it's not always easy to compute gr
Read the rest
adients, especially when using massive Fortran codebases or very large-scale simulations.
In Gradient-Based Hyperparameter Optimization Through Reversible Learning
At the time this post was written, there was no good autodiff implementation for any language that anyone actually used for ML, meaning Python, Matlab, or Java. That's changed now; for example, Python autograd [1] is quite seamless and plays well with the entire Numpy stack. The bigger trend, though, has been towards DSLs such as Theano or Tensorflow (and Torch to a lesser degree) that include autodiff as a first class design consideration. The ability to build complicated networks out of modular parts, and have the gradient calculations automatically fall out, has been a major driver of the recent explosive progress in deep learning research, as has easy portability between CPU and GPU execution. It'll be exciting to see what happens as these tools mature and especially if they find applications in other fields. [1] https://github.com/HI
Read the rest
In Automatic Differentiation (2009)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.