This repository is the companion repository for the paper "The Impact of Dimensionality on the Stability of Node Embeddings". It contains the reference code for reproducing experiments on how node embedding dimensionality affects downstream performance, representational stability across random seeds, and functional stability across downstream predictions.
Below we describe the design of the repository and how to rerun our experiments.
This repository contains scripts to reproduce the experiment pipeline used in the paper:
- tuning embedding hyperparameters,
- training embeddings across dimensions and seeds,
- evaluating downstream tasks,
- computing representational and functional stability summaries.
The runnable embedding methods are:
graphsagedginode2vecverseasne
The empirical datasets used in the reproducibility scripts are:
CoraPubMedwikifacebookblogcatalogogbl_ddicoauthor
The synthetic graph families used in the reproducibility scripts are:
barabasi-albertwatts-strogatz
The downstream classifiers used in the reproducibility scripts are:
LogisticRegressionMLP
Experiment-wide defaults and path helpers are centralized in paths_globals.py.
The main directories group model implementations, dataset handling, experiment utilities, stability measures, and publication analyses:
-
configs/
Default per-model training hyperparameters. -
data/
Dataset code plus prepared dataset artifacts used by the pipeline. -
envs/
Conda environment specifications for the main environment and method-specific environments. -
models/
Embedding implementations grouped by framework/source (pyg,grape,karateclub,verse), plus downstream classifier utilities. -
stability/measures/
Representational and functional similarity measures. -
tools/
Shared utilities for data loading, configuration, tuning selection, embedding loading, and analysis helpers. -
case_studies/
Publication case-study scripts for embedding costs, stability-performance bootstrap analysis, hyperparameter sensitivity, and MinGE. Seecase_studies/README.mdfor case-study-specific commands and output files. -
plotting/
Publication plotting/table helpers inviz.pyand theplots_tables.ipynbnotebook. -
output/
Generated embeddings, downstream results, stability results, case-study reports, plots, and tables.
Experiment-wide constants for names, defaults, and path construction are centralized in paths_globals.py.
The main root-level scripts are the executable workflow entry points; they are introduced in the order they are used
below.
All workflow scripts expose their full argument list through --help. In the examples below, -dim is shown only when
a restricted dimension subset is useful. If omitted, tuning uses the default tuning dimension, while training and
stability scripts use the default experiment dimension grid from paths_globals.py. Seed defaults are also defined
centrally and do not need to be passed explicitly to reproduce the default runs.
Run tune_embeddings.py before empirical training so train.py can load best-known parameters.
Example:
python tune_embeddings.py -a graphsage -d CoraTuning summaries are written under output/embeddings/.../tune/.../tuning_results.json.
Run train.py with one or more algorithms, datasets, and dimensions.
Example:
python train.py -a graphsage -d Cora --n_jobs 4Embeddings are written to output/embeddings/<algorithm>/<dataset>/.../stability_analysis/dim_<d>/.
Synthetic graph experiments use train_synth_embeddings.py.
Example:
python train_synth_embeddings.py -a graphsage -d watts-strogatz --n_jobs 4Evaluate embeddings for downstream performance and generate prediction files used in functional stability.
Example:
python run_downstream_tasks.py -a graphsage -d Cora -c LogisticRegression MLP --n_jobs 4Results are written under output/downstream_results/....
Example:
python stability/representational.py -a graphsage -d Cora --n_jobs 4Results are written to output/stability_results/<algorithm>/<dataset>/.../stability_results_representational.json.
Example:
python stability/functional.py -a graphsage -d Cora -c LogisticRegression MLP --n_jobs 4Results are written to output/stability_results/<algorithm>/<dataset>/.../stability_results_functional.json.
Case-study scripts are collected in case_studies/ and should be run from the repository root with module syntax:
python -m case_studies.embedding_costs ...Case-study outputs are written under the regular output directory as output/<case_study_name>/.
See case_studies/README.md for details on the embedding-cost, stability-performance-bootstrap,
hyperparameter-sensitivity, and MinGE analyses.
Publication plotting functions live in plotting/viz.py; the notebook plotting/plots_tables.ipynb assembles the main
figures and tables. Generated plots and tables are written under output/plots/ and output/tables/.
envs/dimpact.ymlrecords the reference environment used for the main code path. It should be treated as a reproducibility reference; on other machines or future package distributions, individual dependency versions may need adjustment.node2vecis launched through a separategrapeenvironment, andasnethrough a separatekarateclubenvironment. YAML files for both method-specific environments are provided inenvs/.verseuses C++ sources undermodels/verse/src/, which need to be compiled before running VERSE experiments. The included code follows the reference implementation at https://github.com/xgfs/verse.- First dataset load may trigger dataset preparation or download, depending on the dataset.
- Large sweeps can be CPU/RAM intensive; use
--n_jobsconservatively.
If you use this repository or build on the experiments, please cite:
@online{schumacher_impact_2026,
title = {The Impact of Dimensionality on the Stability of Node Embeddings},
author = {Schumacher, Tobias and Reichelt, Simon and Strohmaier, Markus},
eprint = {2604.08492},
eprinttype = {arXiv},
doi = {10.48550/arXiv.2604.08492},
url = {https://arxiv.org/abs/2604.08492}
}