Proposal: Add comprehensive Link Prediction tutorial to documentation.

クローズ
#669 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
静か
技術スタック
julia

調査の方向性

提案されている rand_edge_split(g, 0.1) の設定と GCNConv または GraphSAGE エンコーダーから始め、negative sampling、Flux.logitbinarycrossentropy、training loop、AUC-ROC の各セクションを整理します。ドキュメントファイルもテストも指定されていないため、まず適切なチュートリアルのエントリポイントを探します。完了条件は、各ステップを説明し、ホールドアウトしたエッジで評価する、実行可能なリンク予測の例です。

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

説明

  1. The Setup & Data Splitting
    Starting by loading a standard dataset, like a simple citation network using MLDatasets.jl.
    The Code Goal: Using rand_edge_split(g, 0.1) to hold out 10% of the edges for testing.
    The Tutorial Explanation: Explain why we split edges. (e.g., "To evaluate our model, we pretend some edges don't exist during training. Our model must learn to predict those hidden edges based on the remaining graph structure.")
  2. Negative Sampling
    I would need to generate "fake" edges.
    The Code Goal: Writing a small function to randomly sample pairs of nodes that do not currently have an edge connecting them.
    The Tutorial Explanation: Clearly explain that for every "positive" edge in the training set, we need a "negative" edge (label 0) to compute our loss.
  3. The Encoder-Decoder Model
    Link prediction usually uses a two-part architecture. I will use Flux.jl for this.
    The Encoder (GNN.jl): A standard 2-layer Graph Convolutional Network (GCNConv) or GraphSAGE layer. This takes the node features and the training graph, and outputs node embeddings.
    The Decoder (Standard Julia/Flux): A function that takes the embeddings of two nodes (a source and a target) and computes their dot product. If the dot product is high, the model predicts an edge exists.
  4. The Loss Function & Training Loop
    The Loss: Because we are predicting 1 (edge) or 0 (no edge), we use Binary Cross-Entropy with Logits (Flux.logitbinarycrossentropy).
    The Loop: 1. Passing the graph through the Encoder to get node embeddings.
  5. Passing the positive and negative edge indices to the Decoder to get predictions.
  6. Calculating the loss against the true labels (1s for real edges, 0s for fake edges).
  7. Updating the GNN weights.
  8. Evaluation
    Calculating the Area Under the ROC Curve (AUC-ROC) on the test edges I hid in Step 1. Would this be a suitable example?
主要言語
Julia
スター
310
フォーク
74
平均マージ
1日 13時間
マージ済み PR(30日)
8

環境構築

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

はじめの一歩

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

JuliaGraphs/GraphNeuralNetworks.jl のほかの issue

JuliaGraphs/GraphNeuralNetworks.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

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

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