Rules for det are not general and likely unstable

オープン
#468 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
julia
領域
devtools

調査の方向性

まず det、inv、frule、rrule、svd の既存のルールを確認し、次に issue で説明されている LU アプローチと SVD アプローチを比較します。実装前に、det で SVD を使用すべきか、そのルールが疎行列を対象にすべきか、またどのような数値安定性の保証が必要かを解決します。合意された一般的な設計が実装され、その動作が検証されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

A = [1.0 1.0; 1.0 1.0] 
det(A) * inv(A) 
# ERROR: SingularException(2)

to be fair, the LU approach is remarkably resiliant...

A = [1.0 1.0; 1.0 1.0-1e-16]
det(A) * inv(A)
# 2×2 Matrix{Float64}:
#   1.0  -1.0
#  -1.0   1.0

But I am nervous that this is too simple a special case to draw any conclusions.

Either way - it seems to me that an implementation that always works and is guaranteed numerically stable is preferrable. If the maintainers agree, then I would be happy to make a PR and implement frule and rrule via SVD instead of LU.

Questions:

  • should the det evaluation then also use SVD, or should it use whichever the standard implementation is?
  • should the SVD implementation be only for a specific class of matrices, or general? E.g. I'm unsure about sparse.
  • I noticed that there are rules for svd - I'm guessing this means one will be able to differentate the frule or rrule based on SVD?
主要言語
Julia
スター
479
フォーク
100
平均マージ
1日 8時間
マージ済み PR(30日)
10

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaDiff/ChainRules.jl のほかの issue

JuliaDiff/ChainRules.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。