A 290-parameter learned genome that selects which protein–protein interactions matter for cancer. Trained on TCGA-BRCA, the genome (i) recovers Wnt signaling and cell cycle pathways at statistically significant rates over a random control (Fisher's exact p = 0.013 for both), (ii) actively excludes the estrogen-receptor pathway, and (iii) when frozen, transfers to lung, colon, and prostate cancer with 5–20× lower seed variance than random selection.
This is the third paper in the Neural DNA series:
- Paper 1: Neural DNA: A Compact Genome for Growing Network Architecture — small-scale experiments (MLP, CNN, Transformer, Video)
- Paper 2: Scaling Neural DNA to GPT-2 — 354 parameters wire 35.4M connections
- Paper 3 (this repo): Neural DNA on PPI graphs — pan-cancer pathway recovery and cross-cancer transfer
Author: Tejas Parthasarathi Sudarshan · Independent Researcher, Chennai, India · tejas@winsenlabs.com · tejassuds.com
| Pathway | NDNA OR | NDNA p | Random OR | Random p |
|---|---|---|---|---|
| Wnt signaling | 5.97 | 0.013 | 0.33 | 0.943 |
| Cell cycle | 2.08 | 0.013 | 1.45 | 0.163 |
| HER2/ErbB | 2.69 | 0.060 | 2.26 | 0.111 |
| Estrogen receptor | 0.00 | 1.000 | 0.30 | 0.957 |
Random control matched on density (24.9%). Fisher's exact one-sided.
| Cancer | Frozen test AUC | Random test AUC | Variance ratio (random/frozen) |
|---|---|---|---|
| LUAD | 0.9299 ± 0.0020 | 0.9431 ± 0.0403 | 20× |
| COAD | 0.9349 ± 0.0144 | 0.9395 ± 0.0330 | 2.3× |
| PRAD | 0.8470 ± 0.0170 | 0.8429 ± 0.0372 | 2.2× |
Frozen NDNA is the most reproducible condition in every cancer.
CEACAM5–KLK3 (CEA + PSA — clinically validated tumor markers), FZD9–WNT3 (canonical Wnt receptor–ligand), LAMB3–LAMC3 (laminin subunits, tumor invasion), CEACAM5–EPCAM (epithelial markers), DSG3–DSP (desmosomes, lost in metastasis). See §5.3 of the paper.
.
├── paper_ndna_protein.md Paper source (markdown)
├── paper_ndna_protein.pdf Paper PDF (generated)
├── convert_to_html.py Markdown -> HTML with MathJax
├── generate_pdf.mjs HTML -> PDF via Puppeteer
├── package.json npm metadata for PDF pipeline
├── requirements.txt Python deps for experiments
│
├── data/
│ ├── preprocess.py BRCA: STRING + TCGA-BRCA -> tensors
│ └── preprocess_cancer.py Other cancers, aligned to BRCA gene set
│
├── models/
│ ├── genome.py EdgeGenome (290 params)
│ └── gnn.py 3-layer GCN, no self-loops
│
├── experiments/
│ └── train.py TrainConfig + train_one()
│
├── analysis/
│ ├── pathway.py Fisher's exact pathway enrichment
│ └── visualize.py Subgraph and band figures
│
├── run.py BRCA dense / NDNA / random
├── run_transfer.py Cross-cancer dense / frozen / random
├── run_seeds.py 5-seed ensemble across all conditions
├── run_all_gaps.sh Chained orchestrator (BRCA seeds -> transfer seeds)
├── make_paper_figures.py Final paper figures from ensemble JSON
│
├── figures/ Paper figures (PNG)
├── results/ Per-experiment outputs (gitignored except summary JSONs)
└── RESULTS.md Detailed results write-up
# 1. Set up environment
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 2. Preprocess BRCA (downloads STRING + TCGA-BRCA from public sources)
python data/preprocess.py
# 3. Preprocess transfer cancers (uses BRCA's gene set)
python data/preprocess_cancer.py LUAD COAD PRAD
# 4. Run BRCA experiments (dense, NDNA, random)
python run.py --epochs 60
# 5. Run cross-cancer transfer
python run_transfer.py --cancers LUAD COAD PRAD --epochs 60
# 6. Run 5-seed ensemble for all conditions (~9 hours on M-series Mac MPS)
./run_all_gaps.sh
# 7. Generate paper figures
python make_paper_figures.pyAll checkpoints, edge masks, and per-seed summaries are written to results/.
# Python side: markdown -> HTML
python convert_to_html.py
# Node side: HTML -> PDF (requires Node.js + Puppeteer)
npm install
node generate_pdf.mjsProduces paper_ndna_protein.pdf with embedded figures, MathJax-rendered equations, and proper page-break behaviour.
A 290-parameter genome (EdgeGenome(n_types=8, type_dim=8, n_bands=10)) computes a per-edge binary mask on a STRING PPI subgraph. Nodes are binned into 10 bands by degree quantile; the genome learns 8 types per band, a type–type compatibility matrix, and a band-distance penalty. Per-edge logit:
logit(u, v) = τ(v)ᵀ R τ(u) − softplus(δ) · |band(u) − band(v)| / L
where R = softplus(γ) · (A Aᵀ / √D + C). Hard masks via straight-through estimator.
The original NDNA initializes the compatibility matrix at –1 (default disconnected). For PPI edge masking that fails: the GCN with add_self_loops=False has no signal pathway when most edges are masked, so the genome receives no gradient. We use:
- Neutral prior: compatibility ~ 𝒩(0, 0.3²), ~50% initial soft density. Sparsity loss drives density down.
add_self_loops=False: with self-loops the GCN classifies from per-node expression alone and the genome prunes to ~0% density. Disable them.
Both changes are required; failure modes are documented in Appendix A of the paper.
- STRING v12 (Szklarczyk et al., 2023) — high-confidence (combined_score ≥ 700) human PPI from
9606.protein.links.v12.0.txt.gz.data/preprocess.pyfilters to the top 5,000 most-variable genes from the BRCA training split. - TCGA-BRCA HiSeqV2 (UCSC Xena Hub; Goldman et al., 2020) — gene expression for 1,097 primary tumors and 114 solid-tissue normals.
- TCGA-LUAD, COAD, PRAD HiSeqV2 — same source, used for cross-cancer transfer.
All data is publicly available and downloaded automatically by the preprocess scripts.
If you use this work, please cite:
@article{sudarshan2026ndnappi,
author = {Sudarshan, Tejas Parthasarathi},
title = {Neural DNA on Protein Interaction Networks: A Compact Genome
Recovers Pan-Cancer Pathways and Transfers Across Cancer Types},
year = {2026},
doi = {10.5281/zenodo.20026016},
url = {https://doi.org/10.5281/zenodo.20026016}
}The two prior NDNA papers should also be cited if you reference the genome architecture:
- Sudarshan, T. P. (2026). Neural DNA: A Compact Genome for Growing Network Architecture. DOI: 10.5281/zenodo.19248389
- Sudarshan, T. P. (2026). Scaling Neural DNA to GPT-2. DOI: 10.5281/zenodo.19390927
MIT. See LICENSE.
The TCGA and STRING data this work uses are subject to their original licenses; see the respective project pages.
Questions, collaborations, or wet-lab follow-ups on novel edges: tejas@winsenlabs.com.



