summaryrefslogtreecommitdiff
path: root/README.md
blob: 2b559839dae46ff6d44a1c76a6447dc9387e7bcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# RRoG-GNN Runner

This repo runs the current RRoG/TRM-on-GNN experiment grid.

Core rule:

```text
view/graph aggregation happens once; recursive compute is edge-free hidden-state refinement.
```

The main reported table is:

```text
Task x Backbone -> classic baseline
Task x Backbone x fixed-RRoG -> delta against the matching classic row
```

`classic` is the non-RRoG baseline for every backbone: `T=0`, `n_sup=1`.

## One-command Run On 2x A6000

On a clean machine with two visible GPUs:

```bash
git clone git@github.com:YurenHao0426/rrog-gnn-runner.git
cd rrog-gnn-runner
./scripts/setup_and_run_two_a6000.sh
```

Defaults:

- GPU0: `zinc-cycle56` over 17 backbones, `classic + fixed-rrog`
- GPU1: `ogbg-molhiv` over 17 backbones, `classic + fixed-rrog`
- Results: `runs/*.json`
- Logs: `logs/*.log`
- Summaries: `summaries/*.md`

If the environment already has compatible `torch`, `torch_geometric`, and `ogb`:

```bash
SKIP_SETUP=1 ./scripts/setup_and_run_two_a6000.sh
```

To override CUDA wheel index during setup:

```bash
TORCH_INDEX_URL=https://download.pytorch.org/whl/cu121 ./scripts/setup_env.sh
```

## Common Commands

Smoke test:

```bash
./scripts/setup_env.sh
DEVICE=cuda:0 ./scripts/run_smoke.sh
```

Run the paired ZINC matrix only:

```bash
DEVICE=cuda:0 EPOCHS=200 ./scripts/run_zinc_cycle56_full.sh
```

Run one OGB molecular task:

```bash
TASK=ogbg-molhiv DEVICE=cuda:1 EPOCHS=100 ./scripts/run_ogb_mol_task_full.sh
```

Run the same OGB task with the lighter fixed recursion used by the ZINC sweep:

```bash
TASK=ogbg-molhiv DEVICE=cuda:1 EPOCHS=100 FIXED_T=1 FIXED_NS=3 ./scripts/run_ogb_mol_task_full.sh
```

Run all selected OGB molecular tasks serially on one GPU:

```bash
DEVICE=cuda:1 ./scripts/run_ogb_mol_all_tasks.sh
```

Collect summaries:

```bash
./scripts/collect_results.sh
```

## Backbones

The implemented 2D view/backbone list is shared across ZINC and OGB:

```text
gin, gine, gcn, graphsage, gatv2, graphconv, transformer, pna,
gen, film, resgated, tag, sgc, cheb, arma, mf, appnp
```

For ZINC `gine`, there are no bond features, so GINE uses a learned constant edge token.
For OGB molecular tasks, GINE and edge-aware backbones use OGB bond encodings.

## Notes

- Runs are resumable at the cell level: scripts skip existing expected JSON files.
- ZINC cycle-count cache is generated under `data/cycle_cache`.
- OGB datasets are downloaded under `data/ogb`.
- Override data/runs locations with `RROG_DATA_DIR` and `RROG_RUNS_DIR`.