stan-dev / stan-dev/math

Reuse direct reverse mode autodiff specializations for known laplace distributions

Open
#3,287 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

3f310e79f58c315f148540f0938a6c3f4ea09ac7 is a commit that has the specialized reverse mode functions for the explicit laplace distributions. for instance the file here that has reverse mode specializations for neg_binomial_2. Right now we use embedded reverse and higher order autodiff to calculate these from the likelihood function. If we need to speedup laplace one of the first places we should look is adding these back.

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 inspecting commit 3f310e79f58c315f148540f0938a6c3f4ea09ac7, especially the linked reverse-mode specialization for neg_binomial_2. Compare those direct specializations with the current Laplace likelihood path that uses embedded reverse and higher-order autodiff; done should mean identifying and restoring the applicable specializations with evidence of improved Laplace performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.