patrick-kidger / patrick-kidger/diffrax

Consider switch to a max norm

Open
#131 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactor
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.