JuliaDiff / JuliaDiff/DifferentiationInterface.jl

Option for Native AD backend APIs to offer direct stability guarantees ?

Open
#993 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backend core
Dominant language
Julia
Stars
313
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Native AD backend APIs often provide better stability and stronger correctness guarantees than DI's layer around them.
eg: https://github.com/chalk-lab/Mooncake.jl/issues/992 - a frule!!/rrule!! inconsistency in nan_tangent_guard causes forward-mode to return NaNwhere reverse-mode returns 0.0. This kind of edge-case divergence between modes is invisible to DI, which wraps each mode independently.

Broadly the concerns are:

Is there a path toward DI where we can either :

  • (a) call native backend APIs more directly where they exist, or
  • (b) expose a "native-first" mode that bypasses the wrapper for backends that have the latest stable and correct API?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Mooncake.jl issue #992 and DifferentiationInterface.jl issues #986 and #854, then inspect how DI currently wraps backend APIs. Determine whether direct native calls or a native-first mode can preserve correctness and stability while reducing overhead. Done would require an agreed scope, supported backends, and validation criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.