JuliaDiff / JuliaDiff/DifferentiationInterface.jl

AD-agnostic stop gradient

Open
#949 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Can we have in DI an AD-agnostic stop-gradient operator? That is the equivalent of to pytorch's .detach() or chainrules' ignore_derivatives.

Maybe something similar to what is done with DifferentiateWith can be done here.

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 existing DifferentiateWith implementation and the surrounding DifferentiationInterface.jl APIs to understand how backend-independent behavior is expressed. Define the intended stop-gradient semantics from the issue's PyTorch detach and ChainRules ignore_derivatives references, then determine how the behavior should be validated across the supported AD backends.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.