inf-backprop

Automatic differentiation and backpropagation.

LTS Haskell 24.21:0.1.1.0
Stackage Nightly 2025-11-24:0.2.0.2
Latest on Hackage:0.2.0.2

See all snapshots inf-backprop appears in

BSD-3-Clause licensed by Alexey Tochin
Maintained by [email protected]
This version can be pinned in stack with:inf-backprop-0.2.0.2@sha256:09deafccd1bf8f8e5fa36739d7c5c7ea710c843f38d75a25d2a5411caefa8b47,5193

Automatic differentiation library with efficient reverse-mode backpropagation for Haskell.

This package provides a general-purpose automatic differentiation system designed for building strongly typed deep learning frameworks. It offers:

  • Reverse-mode automatic differentiation (backpropagation)

  • Support for higher-order derivatives

  • Type-safe gradient computation

  • Integration with numhask

The library emphasizes composability and type safety, making it suitable for research, prototyping neural networks, and implementing custom differentiable algorithms.

See the tutorial for detailed examples and usage patterns.

Similar Projects:

  • ad - Comprehensive automatic differentiation library supporting forward and reverse modes

  • backprop - Heterogeneous automatic differentiation with emphasis on ease of use

Changes

Revision history for inf-backprop

[0.2.0.2] – 2025-11-23

  • Documentation fixes

[0.2.0.1] – 2025-11-23

  • Dependency upper bounds
  • Documentation fixes

0.2.0.0 – 2025-11-13

Major Breaking Changes

  • Complete rewrite: The entire codebase has been rewritten from scratch with a redesigned architecture.
  • Differentiation can now be applied to ordinary functions through the RevDiff type,
  • rather than requiring special function wrappers.

New Features

  • Core automatic differentiation:

    • RevDiff type for reverse-mode automatic differentiation
    • Typeclass instances for RevDiff
    • Support for higher-order derivatives through the derivative operator composition
  • NumHask integration:

    • Orphan instances for NumHask typeclasses, providing polymorphic numeric operations
  • Utility modules:

    • Sized vectors
    • Tuple and triple manipulation utilities for multi-argument functions
    • Vector utilities
  • Documentation:

    • Comprehensive tutorial introducing core concepts and usage patterns

0.1.0.0 – 2023-05-12

  • Basic types Backprop, StartBackprop etc.
  • Basic function backprrop derivative implementations.
  • Isomorphism tyepclass and extra instances for IsomorphicTo typeclass from isomorphism-class package.
  • Extra instancies for Additive typeclass from numhask package.
  • Tutorial