Skip to content

Zygote autodiff fails on remake tests with DifferentiationInterface #1208

@ChrisRackauckas-Claude

Description

@ChrisRackauckas-Claude

Summary

When using DifferentiationInterface.gradient with AutoZygote() backend on remake-based loss functions (using SciMLSensitivity with ZygoteVJP()), the tests fail.

Context

This was discovered during the migration from direct AD backend usage to DifferentiationInterface in PR #1206. The following test patterns fail with Zygote:

  • Basic remake autodiff: gradient of sum of solution w.r.t. u0 and p
  • Symbolic indexing autodiff: gradient of sum(soln[x]) w.r.t. u0 and p
  • Symbolic indexing observed autodiff: gradient of sum(soln[o, i]) w.r.t. u0 and p

Affected Files

  • test/downstream/remake_autodiff.jl

Current Status

Tests are marked as @test_broken in PR #1206 until this is resolved.

Related

These tests use BacksolveAdjoint(autojacvec = ZygoteVJP()) from SciMLSensitivity, so this may be related to how DifferentiationInterface interacts with SciMLSensitivity's Zygote extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions