Skip to content

Derivatives of log_sum_exp are wrong for large arguments #1679

Description

@martinmodrak

Description

When both arguments to log_sum_exp are large, the reverse mode derivatives can be wrong.

Example & expected output

We can arrive at a simple identity:
f(x) = d/dx(log_sum_exp(x,x)) == 1 for all x.

Currently Stan computes

f(1e10) = 0.99999952125830205
f(1e50) = 2

Current Version:

v3.1.0

Activity

  1. added a commit that references this issue on Mar 10, 2020
    5fd8e2b
  2. added this to the 3.1.0++ milestone on Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions