patrick-kidger / patrick-kidger/diffrax
Consider switch to a max norm
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 189
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 1
Description
At the moment, padding the state with constant values (zero vector field) means that rms_norm(state) -> 0 as this padding increases. This can cause issues with steady state detection, and with the nonlinear solve inside implicit stages, which end up producing less-meaningful estimates for being close to zero. Switching to a max norm, which is invariant to the number of dimensions, would fix this.
On the other hand there are classically good reasons for using an average norm, so it's not clear which is best.
Worth noting that whilst this padding is weird from the point of view of a numerical diffeq solver, it is a thing that users do in practice.
Contributor guide
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
No files or tests are named. Start by locating the state norm implementation and its uses in steady-state detection and implicit stages, then compare the consequences of RMS and max norms for padded states. Done requires a maintainer decision on the appropriate norm, an agreed scope, and tests covering the relevant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100