Skip to content

Mooncake does not support SymbolicIndexingInterface AD #1207

Description

@ChrisRackauckas-Claude

Summary

When using DifferentiationInterface.gradient with AutoMooncake() backend on functions that involve SymbolicIndexingInterface operations (like sol[sys.x] symbolic indexing), 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 Mooncake:

  • Symbolic indexing gradients: sol -> sum(sol[lorenz1.x])
  • Vector symbolic indexing: sol -> sum(sum.(sol[[lorenz1.x, lorenz2.x]]))
  • Tuple symbolic indexing: sol -> sum(sum.(collect.(sol[(lorenz1.x, lorenz2.x)])))
  • Time series symbolic indexing: sol -> sum(sum.(sol[[lorenz1.x, lorenz2.x], :]))
  • Observable function AD: sol -> sum(sol[sys.w])
  • BatchedInterface AD

Affected Files

  • test/downstream/adjoints.jl
  • test/downstream/observables_autodiff.jl

Current Status

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

Related

This may be related to how Mooncake handles the ChainRules/rrules defined in SymbolicIndexingInterface or SciMLBase's extensions.

Metadata

Metadata

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