Skip to main content
QUICK REVIEW

[論文レビュー] A fast algorithm for All-Pairs-Shortest-Paths suitable for neural networks

Zeyu Jing, Markus Meister|PubMed|Aug 6, 2023
Data Management and AlgorithmsComputer Science被引用数 3
ひとこと要約

本稿では、重み付き隣接行列の行列逆行列を用いた、全ペア最短経路(APSP)を計算する新しい微分可能アルゴリズムを提案する。最短経路距離は、リゾルベント行列の対数変換から得られる。この手法により、高速でスケーラブルかつ神経的に妥当なグラフ距離の計算が可能となり、特にアナログおよびニューラルネットワーク実装に適している。適切なγの選択のもとで、結果は厳密に正確であることが保証される。

ABSTRACT

Given a directed graph of nodes and edges connecting them, a common problem is to find the shortest path between any two nodes. Here we show that the shortest path distances can be found by a simple matrix inversion: If the edges are given by the adjacency matrix <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:msub><mml:mi>A</mml:mi> <mml:mrow><mml:mi>i</mml:mi> <mml:mi>j</mml:mi></mml:mrow> </mml:msub> </mml:math> then with a suitably small value of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>γ</mml:mi></mml:math> the shortest path distances are <DispFormula> <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow><mml:msub><mml:mi>D</mml:mi> <mml:mrow><mml:mi>i</mml:mi> <mml:mi>j</mml:mi></mml:mrow> </mml:msub> <mml:mo>=</mml:mo> <mml:mtext>ceil</mml:mtext> <mml:mrow><mml:mo>(</mml:mo> <mml:mrow> <mml:msub><mml:mrow><mml:mi>log</mml:mi></mml:mrow> <mml:mi>γ</mml:mi></mml:msub> <mml:msub> <mml:mrow><mml:mrow><mml:mo>[</mml:mo> <mml:mrow> <mml:msup><mml:mrow><mml:mo>(</mml:mo> <mml:mstyle><mml:mi>I</mml:mi></mml:mstyle> <mml:mo>-</mml:mo> <mml:mi>γ</mml:mi> <mml:mstyle><mml:mi>A</mml:mi></mml:mstyle> <mml:mo>)</mml:mo></mml:mrow> <mml:mrow><mml:mo>-</mml:mo> <mml:mn>1</mml:mn></mml:mrow> </mml:msup> </mml:mrow> <mml:mo>]</mml:mo></mml:mrow> </mml:mrow> <mml:mrow><mml:mi>i</mml:mi> <mml:mi>j</mml:mi></mml:mrow> </mml:msub> </mml:mrow> <mml:mo>)</mml:mo></mml:mrow> </mml:mrow> </mml:math> </DispFormula> We derive several graph-theoretic bounds on the value of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>γ</mml:mi></mml:math> , and explore its useful range with numerics on different graph types. Even when the distance function is not globally accurate across the entire graph, it still works locally to instruct pursuit of the shortest path. In this mode, it also extends to weighted graphs with positive edge weights. For a wide range of dense graphs this distance function is computationally faster than the best available alternative. Finally we show that this method leads naturally to a neural network solution of the all-pairs-shortest-path problem.

研究の動機と目的

  • ニューラルネットワークアーキテクチャに適した、微分可能で高速かつスケーラブルな全ペア最短経路(APSP)計算アルゴリズムの開発。
  • 行列逆行列 (I - γA)⁻¹ の対数変換により、有向かつ重み付きグラフに対しても正確な最短経路距離が得られることの実証。
  • 密行列において従来のAPSPアルゴリズムよりも高速に動作し、アナログまたはニューロモルフィックハードウェアに適していることの確認。
  • 再帰的ニューラル回路がR距離を計算するメカニズムとして、脳における経路探索の生物学的に妥当なメカニズムを提供すること。
  • 局所的および全域的精度を保証するためのγの実用的フレームワークの提供。

提案手法

  • 距離はR距離式 R_ij(γ) = log[(I - γA)⁻¹]_ij / log(γ) を用いて計算する。ここでAは隣接行列、γは小さな正のスカラーである。
  • 重みなしグラフでは、γが十分に小さい場合、R距離は真の最短経路距離D_ijに丸め上げられ、すべての経路に対して γ < 1/N_ij^(k) を満たす。
  • Aをγ^W_ijに置き換えることで、正の整数重みを持つグラフへ一般化可能である。
  • リゾルベント (I - γA)⁻¹ = I + γA + γ²A² + ... のべき級数展開を活用し、各経路の数をγ^kで重み付けした和を計算する。
  • アナログまたはニューラルネットワークハードウェアに自然に適しており、連続時間ダイナミクスにより行列逆行列および対数演算が実装可能である。
  • ネットワークは動的応答性を有する:エッジ重みや入力ノードを変更すると即座に出力が更新され、リアルタイムの経路探索が可能となる。
Figure 1: Performance of the R-distance. Each row represents a family of graphs illustrated by the icon on the left, with node numbers given in the legend. Global: Global performance: fraction of distances between nodes predicted correctly by Eqn 10 , as a function of the gain parameter $\gamma$ . L
Figure 1: Performance of the R-distance. Each row represents a family of graphs illustrated by the icon on the left, with node numbers given in the legend. Global: Global performance: fraction of distances between nodes predicted correctly by Eqn 10 , as a function of the gain parameter $\gamma$ . L

実験結果

リサーチクエスチョン

  • RQ1修正された隣接行列の行列逆行列は、有向かつ重み付きグラフに対しても正確な最短経路距離をもたらすか?
  • RQ2R距離近似における局所的および全域的精度を保証するためのγの最適範囲は何か?
  • RQ3本手法の計算性能は、密行列におけるFloyd-Warshallなどの古典的APSPアルゴリズムと比べてどうか?
  • RQ4本手法は、リアルタイムナビゲーションに適したアナログまたはニューラルネットワークハードウェアで効率的に実装可能か?
  • RQ5R距離関数は、動物の脳における経路探索の生物学的に妥当なメカニズムを提供するか?

主な発見

  • γがすべての経路に対して γ < 1/N_ij^(k) を満たす場合、R距離式 R_ij(γ) = log[(I - γA)⁻¹]_ij / log(γ) は正確な最短経路距離 D_ij を与え、ceil(R_ij(γ)) = D_ij が成り立つ。
  • 数千ノードを有する密グラフにおいて、本手法はFloyd-Warshallのナイーブ実装や他の従来のAPSPアルゴリズムよりも高速に動作する。
  • マシン精度の制限により全域的精度が損なわれても、局所的精度は保たれるため、動的環境においても頑健である。
  • Aをγ^W_ijに置き換えることで、正の整数重みを持つグラフへ一般化可能である。
  • アナログおよびニューロモルフィックコンピューティングに自然に適しており、ハードウェア上ではマイクロ秒スケールの安定化時間を見込むことができる。
  • 本手法は、動物の脳に見られる再帰的ニューラル回路に一致する回路モチーフを有するため、生物学的に妥当な経路探索メカニズムを提供する。
Figure 2: The R-distance on weighted graphs. Results on a dense graph (as in Fig 1 D,I) with random positive edge weights. A: The R-distance plotted against the true graph distance. $V=1000$ vertices, $p=0.5$ edge probability, edge weights range from 1 to 100 with log-uniform distribution. $\gamma=1
Figure 2: The R-distance on weighted graphs. Results on a dense graph (as in Fig 1 D,I) with random positive edge weights. A: The R-distance plotted against the true graph distance. $V=1000$ vertices, $p=0.5$ edge probability, edge weights range from 1 to 100 with log-uniform distribution. $\gamma=1

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。