JuliaDiff / JuliaDiff/ChainRules.jl
Non-associative number types
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 475
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
I was recently reminded that some number types are not even associative under multiplication, e.g. Quaternions.Octonion. So fixes like #504, #540, which would support numbers that don't commute under multiplication, like quaternions, would still do the wrong thing for octonions. On the other hand, there are number types like Unitful.Quantity, which are Numbers, for which we want our rules to work.
So I see 2 ways forward:
- Implement only rules that make no additional assumptions about the properties of the numbers beyond the primal, and only in cases where the primal is define in base.
- Try to implement rules generically, but assume that numbers that violate basic properties like associativity are rare and require (and document) that devs of packages with such numbers need to opt out of these rules for compatibility with ChainRules-compatible ADs.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the two proposed approaches in this issue and reviewing #504 and #540; no files or tests are named. The work is done when maintainers choose and document a compatibility strategy for non-associative number types while preserving support for Unitful.Quantity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100