Skip to content

Fokker-Planck test fails: Zygote missing adjoint rules for IntegralSolution #1015

@ChrisRackauckas-Claude

Description

@ChrisRackauckas-Claude

Summary

The Fokker-Planck test in test/additional_loss_tests.jl fails because Zygote lacks adjoint rules for the IntegralSolution constructor from Integrals.jl. This prevents automatic differentiation through integral constraints.

Error

ERROR: Mutating arrays is not supported -- called setindex!(::Vector{Float64}, _...)

The error occurs during Zygote's backward pass when trying to differentiate through the integral solution construction.

Affected Tests

  • Fokker-Planck test in test/additional_loss_tests.jl

Root Cause

The Fokker-Planck test uses an integral constraint (_norm function with Integrals.jl). When Zygote tries to differentiate through this, it encounters the IntegralSolution type which doesn't have proper adjoint rules defined.

Current Status

Test is temporarily skipped in PR #1013 to unblock CI.

Potential Solutions

  1. Add ChainRulesCore.@non_differentiable rules for IntegralSolution constructor in Integrals.jl or SciMLBase
  2. Use a different approach for integral constraints that doesn't require differentiation through the integral solution
  3. Contribute adjoint rules for IntegralSolution to Integrals.jl

References

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