Open source · Research contributions
Open-source contributions to the research community
By Dr Akanda Ashraf — Lead Perception Engineer · PhD in Artificial Intelligence · granted UK patent GB2622032
Published methods are only useful if someone else can run them. Everything below is code I have released publicly on GitHub so that the methods in my papers can be installed, tested, reproduced and argued with — reference implementations, documented APIs, benchmark scripts, simulated datasets with ground truth, and the negative results as well as the positive ones.
Research repositories
akanda-method — Physics-inspired link prediction — the reference implementation
PYTHON · MIT LICENCE · OPEN SOURCE
Newton's law of universal gravitation, repurposed as a link predictor: node centrality plays the role of mass and the inverse of node-pair similarity plays the role of distance, so Score(vi, vj) is proportional to P(vi)·P(vj) / D(vi, vj)². Coupling popularity with similarity in a single score is what makes the method work where either signal alone is weak.
This is the first public implementation of the method introduced in my Physica A paper — as of 2026 no other existed on GitHub, PyPI, CRAN or inside any link-prediction library. It is written to be checked, not just cited: centralities (degree, closeness, betweenness) and dissimilarities (shortest path, Katz, Adamic–Adar, Rooted PageRank, Matrix Forest Index) are pluggable, and every benchmark table ships with the script that produced it.
The replication is deliberately honest. On TGB's tgbl-flight benchmark — 16.7k airports, 138.5M candidate pairs per predictor, run on a laptop GPU — the gravity combination reaches 31.7× the random baseline against 22.4× for standalone Rooted PageRank. The papers' negative results replicate too: the Katz combination still fails to beat standalone Katz, exactly as reported in 2019. Selective replication is stronger evidence than uniform improvement.
Install: pip install git+https://github.com/AkandaAshraf/akanda-method
Documentation: README with the method, findings and provenance · docs/USAGE.md — full user guide · benchmarks/ — every result table plus its script · examples/ — including a GCN augmentation demo
Repository on GitHub · Physica A paper (DOI) · COMPLEX NETWORKS 2017 paper (DOI)
gnn-augment — Graph-augmented GNNs for semi-supervised node classification, on PyPI
PYTHON · MIT LICENCE · OPEN SOURCE
A graph neural network propagates features through the adjacency matrix, so at layer l only l-hop neighbours can influence a node. gnn-augment replaces the adjacency with a node-similarity representative — Katz, Rooted PageRank, Graph Gravity, or an LLM text-embedding view — so distant-but-similar nodes influence each other even in a shallow network. Node-classification accuracy improves without deepening the model.
Because the trick changes which graph the network sees rather than the network itself, it is architecture-agnostic: the same wrapper works across the Kipf–Welling GCN, GraphSAGE, GAT and GIN. Multi-view training combines several representatives at once, and a sparse mode keeps large graphs tractable.
This is the packaged, scikit-learn-style implementation of the augmentation method from Simulation and Augmentation of Social Networks for Building Deep Learning Models, with continuous integration, a changelog and a published wheel — so the result is installable in one line rather than reconstructed from a paper.
Install: pip install gnn-augment
Documentation: docs/USAGE.md — every option, semi-supervised conventions, multi-view, sparse mode · docs/API.md — API reference generated from docstrings · benchmarks/ — reproducible result tables · CHANGELOG.md and CI badge on every commit
Repository on GitHub · PyPI package · Paper (arXiv:1905.09087)
VirtualSoc — Dynamic social network simulation with ground-truth labels and features
PYTHON · OPEN SOURCE · 14 GITHUB STARS
Benchmarking a link-prediction or node-classification method against real social network data means accepting whatever labels happen to exist. VirtualSoc generates dynamic social networks where the generative process is known, so node attributes, community structure and the sequence of network snapshots all come with ground truth attached.
That makes it useful for the questions observational data cannot answer: how a predictor behaves as a network densifies, how sensitive it is to attribute homophily, and whether an apparent gain survives when the data-generating process changes. Single-network and multi-network simulation scripts are included, with a CUDA/cupy path for GPU-scale runs and an R helper for computing graph statistics over generated batches.
Documentation: README with dependencies and usage · ScriptSingleNetwork.py — one simulated network · ScriptMultiNetwork.py — batch simulation sweeps · Separate CPU and GPU branches
Repository on GitHub · Related paper: NetSim (DOI)
DeepFeatSelection — Learnable feature gates, plus MACE for driven-variable detection
PYTHON · OPEN SOURCE
Feature selection by putting a learnable, non-negative gate in front of every input feature, training the network end to end, and reading the gates back as importances. Written in 2021 against TensorFlow 2.4 and since brought up to TensorFlow 2.20 / Keras 3, with the parts of the method that made the importances hard to defend fixed rather than quietly kept. The original 2021 code is preserved unchanged under legacy/ so the two are comparable.
The repository also holds a second, self-contained line of work: MACE (Masked-Autoencoder Conditional Excess) asks which variables of a large dynamical system are driven by the rest of it and which evolve autonomously. The statistic is the gain in one-step predictability when a learned low-dimensional code of the remaining system is added to a model of a variable's own history — cheap enough that a scan of 71,721 variables runs in minutes on a consumer laptop, against roughly 800,000 GPU-hours for the pairwise equivalent. A ghost channel is embedded in every scan as a built-in null control.
FINDINGS.md consolidates every result in the repository in plain language, including the negative ones. Publishing what did not work is the part of open research that citation counts do not reward and reproducibility depends on.
Install: git clone https://github.com/AkandaAshraf/DeepFeatSelection
Documentation: FINDINGS.md — all results in plain language, negative ones included · paper/excess_paper.pdf — the MACE preprint · legacy/ — the unmodified 2021 implementation · Zenodo-archived, citable release
Repository on GitHub · Archived release (Zenodo DOI)
How I approach open research
A paper without code is a claim, not a result
Each of these repositories exists because a published method had no runnable implementation. Releasing one converts a claim someone must trust into a result they can test, extend or refute on their own data.
Benchmarks ship with the script that produced them
Every result table in these repositories is accompanied by the code and the seed that generated it. A number in a README that cannot be re-run is decoration.
Negative results are published too
Where a method fails — the Katz combination in akanda-method, the fixed importances in DeepFeatSelection — the failure is documented alongside the successes. Selective replication of a paper's negative findings is stronger evidence than uniform improvement.
Permissive licences and citable archives
MIT licensing where possible and DOI-archived releases where the work warrants citation, so the code can be used in industry and cited in academia without friction.
Frequently asked questions
Where can I find Dr Akanda Ashraf's open-source research code?
All of it is on GitHub at github.com/AkandaAshraf. The four active research repositories are akanda-method (physics-inspired link prediction), gnn-augment (graph-augmented graph neural networks, also on PyPI), VirtualSoc (dynamic social network simulation) and DeepFeatSelection (learnable feature gates plus the MACE driven-variable detector).
Is there an implementation of the gravitational link prediction method?
Yes — akanda-method is the reference implementation of the method from How to predict social relationships: a physics-inspired approach to link prediction (Physica A, 2019). As of 2026 it is the only public implementation, and it includes replication benchmarks on datasets that did not exist when the paper was written.
How do I install gnn-augment?
pip install gnn-augment for the release, or pip install "gnn-augment[semantic]" to include sentence-transformers for the LLM text-embedding view. It requires Python 3.10 or newer and depends on PyTorch, NetworkX, NumPy, SciPy and scikit-learn.
Can I use this code commercially?
akanda-method and gnn-augment are MIT licensed, which permits commercial use with attribution. Check the LICENSE file in each repository before use, and cite the underlying paper if the work is published.
How should I cite these repositories?
Cite the underlying peer-reviewed paper listed in each repository's README, and additionally the Zenodo DOI where one exists — DeepFeatSelection is archived at 10.5281/zenodo.21988145. Citing both credits the method and the specific implementation you actually ran.
Related
The theory behind akanda-method and gnn-augment is set out in my guide to link prediction in social networks. See also 3D LiDAR perception and safety-critical machine learning, or the articles and full list of publications.
Contributions welcome
Issues, pull requests and replication attempts are all welcome on any of these repositories. If you have used one of them in your own work I would like to hear about it — email akanda@akandaashraf.com, or find me on LinkedIn, Google Scholar and GitHub.