# atharv1893/elph_dune architecture

> Architecture diagram of the GitHub repository atharv1893/elph_dune, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharv1893/elph_dune
- Repository: https://github.com/atharv1893/elph_dune

## Overview

The tree contains two graph-learning codebases: BUDDY/ELPH estimates link likelihood from graph substructure hashes and node signals, while DUNE implements directed and complex-valued graph models. BUDDY’s excerpts show hash propagation feeding subgraph features and link-prediction models; its baseline GNNs and utility functions are separate modules. DUNE’s excerpts show directed convolution/model variants and a Lightning full-batch training wrapper, alongside complex graph-convolution layers. No README is present, and DUNE’s layer-to-model wiring is not established by the excerpts.

Main entry points: [`BUDDY/buddy.py`](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/buddy.py) (ELPH model), [`DUNE/model.py`](https://github.com/atharv1893/elph_dune/blob/master/DUNE/model.py) (Directed GNNs), [`BUDDY/hashing.py`](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/hashing.py) (Subgraph hashes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_buddy["BUDDY link prediction"]
  node_elph["ELPH model<br/>[buddy.py]"]
end

subgraph group_buddy_internal["BUDDY models"]
  node_hash_features["Subgraph hashes<br/>[hashing.py]"]
  node_buddy_predictor["Link predictor<br/>[buddy.py]"]
  node_buddy_models["Baseline GNNs<br/>[gnn.py]"]
  node_buddy_utils["Graph utilities<br/>[utils.py]"]
end

subgraph group_dune["DUNE graph models"]
  node_directed_models["Directed GNNs<br/>[model.py]"]
  node_training_wrapper["Full-batch trainer<br/>[model.py]"]
end

subgraph group_dune_layers["Complex layers"]
  node_complex_layers["Complex convolutions"]
end

node_link_user(("Link prediction task"))
node_link_score(("Link scores"))
node_dune_input(("Graph learning task"))
node_node_predictions(("Node predictions"))

node_link_user -->|"provides graph"| node_elph
node_elph -->|"generates hashes"| node_hash_features
node_elph -->|"extracts features"| node_hash_features
node_elph -.->|"scores links"| node_buddy_predictor
node_buddy_predictor -->|"returns scores"| node_link_score
node_dune_input -->|"provides batches"| node_training_wrapper
node_training_wrapper -->|"invokes model"| node_directed_models
node_directed_models -.->|"returns predictions"| node_node_predictions

click node_elph "https://github.com/atharv1893/elph_dune/blob/master/BUDDY/buddy.py"
click node_hash_features "https://github.com/atharv1893/elph_dune/blob/master/BUDDY/hashing.py"
click node_buddy_predictor "https://github.com/atharv1893/elph_dune/blob/master/BUDDY/buddy.py"
click node_buddy_models "https://github.com/atharv1893/elph_dune/blob/master/BUDDY/gnn.py"
click node_buddy_utils "https://github.com/atharv1893/elph_dune/blob/master/BUDDY/utils.py"
click node_directed_models "https://github.com/atharv1893/elph_dune/blob/master/DUNE/model.py"
click node_training_wrapper "https://github.com/atharv1893/elph_dune/blob/master/DUNE/model.py"
click node_complex_layers "https://github.com/atharv1893/elph_dune/blob/master/DUNE/complex_valued_layers.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_elph toneBlue
class node_hash_features,node_buddy_predictor,node_buddy_models,node_buddy_utils toneAmber
class node_directed_models,node_training_wrapper toneMint
class node_complex_layers,node_link_user,node_dune_input toneRose
class node_link_score,node_node_predictions toneIndigo
```

## Components

### BUDDY link prediction

- [ELPH model](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/buddy.py): `BUDDY/buddy.py`

### BUDDY models

- [Subgraph hashes](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/hashing.py): `BUDDY/hashing.py`
- [Link predictor](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/buddy.py): `BUDDY/buddy.py`
- [Baseline GNNs](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/gnn.py): `BUDDY/gnn.py`
- [Graph utilities](https://github.com/atharv1893/elph_dune/blob/master/BUDDY/utils.py): `BUDDY/utils.py`

### DUNE graph models

- [Directed GNNs](https://github.com/atharv1893/elph_dune/blob/master/DUNE/model.py): `DUNE/model.py`
- [Full-batch trainer](https://github.com/atharv1893/elph_dune/blob/master/DUNE/model.py): `DUNE/model.py`

### Complex layers

- [Complex convolutions](https://github.com/atharv1893/elph_dune/blob/master/DUNE/complex_valued_layers.py): `DUNE/complex_valued_layers.py`

### Other components

- **Link prediction task**
- **Link scores**
- **Graph learning task**
- **Node predictions**

## Connections

- Link prediction task → ELPH model: provides graph (evidence: `BUDDY/buddy.py`)
- ELPH model → Subgraph hashes: generates hashes (evidence: `BUDDY/buddy.py`)
- ELPH model → Subgraph hashes: extracts features (evidence: `BUDDY/hashing.py`)
- ELPH model → Link predictor: scores links (evidence: `BUDDY/buddy.py`)
- Link predictor → Link scores: returns scores (evidence: `BUDDY/buddy.py`)
- Graph learning task → Full-batch trainer: provides batches (evidence: `DUNE/model.py`)
- Full-batch trainer → Directed GNNs: invokes model (evidence: `DUNE/model.py`)
- Directed GNNs → Node predictions: returns predictions
