Chordless cycle filtrations for dimensionality detection in complex networks via topological data analysis.
The 5 matches
- [1] § Methods › Database and neural network architecture › Neural network DIMNN model ↔ scripts/neural_network_training_two_phases.py, lines 23–101 · score 0.71 · hidden layers, AdamW, activations, dropout, optimizer, residual
- [2] § Methods › Database and neural network architecture › Neural network DIMNN model ↔ dimnn/neural_network_training_clean.py, lines 64–168 · score 0.69 · hidden layers, AdamW, dropout, optimizer, residual, MLP
- [3] § Results › Dimensionality estimation using neural networks ↔ geometric-randomization/notebooks/network-properties-d-mercator.ipynb, lines 194–214 · score 0.65 · clustering spectrum, connected component, neighbor degree, Mercator, properties, networks
- [4] § Methods › Multidimensional geometric soft configuration model › Microcanonical formulation of model ↔ SD-model/notebooks/tutorial.ipynb, lines 37–54 · score 0.55 · power law, generated synthetic networks, exponent, nodes, model, dimension
- [5] § Methods › Multidimensional geometric soft configuration model › Microcanonical formulation of model ↔ geometric-randomization/generate_synthetic_networks.py, lines 18–61 · score 0.51 · generated synthetic networks, geometric randomization, realizations, dimension
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 105 lines · 4.6 KB · no license · 1 match
- import pandas as pd
- import numpy as np
- import matplotlib.pyplot as plt
- from sklearn.preprocessing import StandardScaler
- import keras
- import tensorflow as tf
- from keras.callbacks import EarlyStopping
- import seaborn as sns
- from residual_network import build_residual_mlp
- gpus = tf.config.list_physical_devices('GPU')
- if gpus:
- # Restrict TensorFlow to only use the first GPU
- try:
- tf.config.set_visible_devices(gpus[0], 'GPU')
- logical_gpus = tf.config.list_logical_devices('GPU')
- print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPU")
- except RuntimeError as e:
- # Visible devices must be set before GPUs have been initialized
- print(e)
- def main():
- keras.utils.set_random_seed(42)
- data = pd.read_csv('../data/data_for_training_large.csv')
- #data2 = pd.read_csv('./data/training_synthetic_networks.csv', index_col=0)
- #data = pd.concat([data, data2], ignore_index=True)
- # Possible feature vectors
- columns = ['num_nodes', 'avg_degree', 'Ct', 'Cs', 'Cp']
- columns = ['num_nodes', 'avg_degree', 'tp1_t', 'tp1_s', 'tp1_p']
- columns = ['num_nodes', 'avg_degree', 'Ct', 'Cs', 'Cp','tp1_t', 'tp1_s', 'tp1_p']
- y_train_phase_1 = data[['gamma', 'beta']]
- y_train_phase_2 = data['dim'] - 1 # Ensure 'dim' is zero-indexed
- X_train_phase_1 = data[columns]
- X_train_phase_2 = data[columns + ['gamma', 'beta']]
- # Number of classes of phase 2
- N = len(np.unique(y_train_phase_2))
- print(f"Number of classes: {N}")
- # For test
- X_test = pd.read_csv('../data/test_real_networks.csv', index_col=0)
- X_test = X_test[columns]
- # Normalization
- scaler_phase_1 = StandardScaler()
- scaler_phase_2 = StandardScaler()
- X_train_phase_1 = scaler_phase_1.fit_transform(X_train_phase_1)
- X_train_phase_2 = scaler_phase_2.fit_transform(X_train_phase_2)
- model_phase_1 = build_residual_mlp(input_dim=len(columns),
- hidden_layer_sizes=[32, 64, 64, 128, 256, 512, 1024, 1024, 512,
- 256, 128, 64, 64, 64, 32, 32, 16, 16, 16, 8, 8],
- output_dim=2, dropout_rate=0.5)
- model_phase_2 = build_residual_mlp(input_dim=len(columns) + 2,
- hidden_layer_sizes=[32, 64, 64, 128, 256, 512, 1024, 1024, 512,
- 256, 128, 64, 64, 64, 32, 32, 16, 16, 16, 8, 8],
- output_dim=N, dropout_rate=0.5, output_activation='linear')
- optimizer_phase_1 = keras.optimizers.AdamW(learning_rate=0.0005)
- model_phase_1.compile(optimizer=optimizer_phase_1, loss='mse', metrics=['mae'])
- early_stopping_phase_1 = EarlyStopping(monitor='val_loss', patience=20, restore_best_weights=True)
- history = model_phase_1.fit(X_train_phase_1, y_train_phase_1, epochs=200, batch_size=64, validation_split=0.2,
- callbacks=[early_stopping_phase_1], verbose=2)
- loss, mae = model_phase_1.evaluate(X_train_phase_1, y_train_phase_1)
- print(f"Train mae: {mae:.4f}")
- model_phase_1.save('base_NN_model_residual_phase_1.keras')
- # Train phase 2
- optimizer_phase_2 = keras.optimizers.AdamW(learning_rate=0.0005)
- model_phase_2.compile(optimizer=optimizer_phase_2, loss='sparse_categorical_crossentropy', metrics=['accuracy'])
- early_stopping_phase_2 = EarlyStopping(monitor='val_loss', patience=20, restore_best_weights=True)
- history = model_phase_2.fit(X_train_phase_2, y_train_phase_2, epochs=200, batch_size=64, validation_split=0.2,
- callbacks=[early_stopping_phase_2], verbose=2)
- loss, accuracy = model_phase_2.evaluate(X_train_phase_2, y_train_phase_2)
- print(f"Train accuracy: {accuracy:.4f}")
- model_phase_2.save('base_NN_model_residual_phase_2.keras')
- # Perform predictions
- X_test_phase_1 = scaler_phase_1.transform(X_test)
- predictions_phase_1 = model_phase_1.predict(X_test_phase_1)
- # Concatenate predictions with previous X_test on columns
- X_test_phase_2 = pd.concat([X_test, pd.DataFrame(predictions_phase_1, columns=['gamma', 'beta'])], axis=1)
- X_test_phase_2 = scaler_phase_2.transform(X_test_phase_2)
- predictions_phase_2 = model_phase_2.predict(X_test_phase_2)
- y_hat = np.argmax(predictions_phase_2, axis=1)
- y_hat = y_hat + 1
- test_networks = pd.read_csv('../data/test_real_networks.csv', index_col=0)
- for i, name in enumerate(test_networks['name']):
- print("Network "+name)
- print("Inferred dimension: "+str(y_hat[i]))
- print("Probability: "+format(predictions_phase_2[i][y_hat[i]-1], '.4f'))
- if __name__ == '__main__':
- main()
neural_network_training_two_phases.py at commit 870c695, no license · at the source
Overview
- Departament de Matèmatiques i Informàtica, Universitat de Barcelona, Barcelona, Spain
- Departament de Física de la Matèria Condensada, Universitat de Barcelona, Barcelona, Spain
- Universitat de Barcelona Institute of Complex Systems (UBICS), Universitat de Barcelona, Barcelona, Spain
- Faculty of Electrical Engineering, Mathematics and Computer Science, Delft University of Technology, Delft, Netherlands
- Center for Complex Networks and Systems Research, Luddy School of Informatics, Computing, and Engineering, Indiana University, Bloomington, IN USA
- ICREA, Barcelona, Spain
Abstract
Many complex networks, ranging from social to biological systems, exhibit structural patterns consistent with an underlying hyperbolic geometry. Revealing the dimensionality of this latent space can disentangle the structural complexity of communities, impact efficient network navigation, and fundamentally shape connectivity and system behavior. We introduce a topological data analysis weighting scheme for graphs based on chordless cycles to estimate network dimensionality in a data-driven way. We further show that the resulting descriptors can effectively estimate network dimensionality using a neural network architecture trained on a synthetic graph database constructed for this purpose, which requires no retraining to transfer effectively to real-world networks. Thus, by combining cycle-aware filtrations, algebraic topology, and machine learning, our approach provides a robust and effective method for uncovering the hidden geometry of complex networks and guiding accurate modeling and low-dimensional embedding.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
networkgeometry/detecting-dimensionality-TDA-DimNN
870c69581f70a1503691efa8713f09b152136bd3, 8 April 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
46 files
- SD-model/
include/ , C/C++, 637 linesAEAE/ complex_functions.H - SD-model/
include/ , C++, 1,050 linesAEAE/ hyp_2F1.cpp - SD-model/
include/ , C/C++, 84 linesincbeta.h - SD-model/
notebooks/ , Jupyter, 172 lines, 1 matchtutorial.ipynb - SD-model/
src/ , C++, 41 linesgeneratingSD_unix.cpp - SD-model/
src/ , C++, 16 linesinfer_kappas_beta_unix.c pp - cycles/
__init__.py , Python, 1 line - cycles/
generate_SD_networks_par , Python, 144 linesallel.py - cycles/
run_compute_edgecycles.p , Python, 71 linesy - cycles/
run_compute_edgecycles_p , Python, 136 linesarallel.py - dimnn/
__init__.py , Python, 1 line - dimnn/
comparison_models_real_d , Python, 174 linesata.py - dimnn/
config.py , Python, 178 lines - dimnn/
neural_network_training_ , Python, 172 lines, 1 matchclean.py - dimnn/
neural_network_training_ , Python, 161 linesmlp.py - dimnn/
neural_network_training_ , Python, 161 linesregressor.py - dimnn/
residual_network.py , Python, 90 lines - dimnn/
retraining_agreement.py , Python, 281 lines - geometric-randomization/
generate_network_surroga , Python, 117 linestes.py - geometric-randomization/
generate_network_surroga , Python, 107 linestes_parallel.py - geometric-randomization/
generate_synthetic_netwo , Python, 157 lines, 1 matchrks.py - geometric-randomization/
geometric_randomization. , C++, 327 linescpp - geometric-randomization/
geometric_randomization. , C/C++, 53 linesh - geometric-randomization/
main.cpp , C++, 104 lines - geometric-randomization/
notebooks/ , Jupyter, 89 linescheck-dimension.ipynb - geometric-randomization/
notebooks/ , Jupyter, 737 lines, 1 matchnetwork-properties-d-mer cator.ipynb - geometric-randomization/
run_all_generate_network , Python, 78 lines_surrogates.py - geometric-randomization/
run_generate_real_networ , Python, 56 linesk_surrogate.py - notebooks/
check-properties-for-tra , Jupyter, 482 linesining-neural-network.ipy nb - notebooks/
prepare-real-networks-fo , Jupyter, 409 linesr-classification-combine .ipynb - notebooks/
prepare-real-networks-fo , Jupyter, 257 linesr-classification-communi tyfitnet.ipynb - notebooks/
prepare-real-networks-fo , Jupyter, 339 linesr-classification-mercato r-datasets.ipynb - scripts/
__init__.py , Python, 1 line - scripts/
compute_properties.py , Python, 92 lines - scripts/
merge_tda_csv_files.py , Python, 42 lines - scripts/
neural_network_predictio , Python, 86 linesn.py - scripts/
neural_network_training. , Python, 60 linespy - scripts/
neural_network_training_ , Python, 105 lines, 1 matchtwo_phases.py - scripts/
predict_dimension.py , Python, 89 lines - scripts/
residual_network.py , Python, 73 lines - tda_code/
__init__.py , Python, 1 line - tda_code/
main_server.py , Python, 111 lines - tda_code/
pipeline_utils.py , Python, 326 lines - tda_code/
topological_functions.py , Python, 60 lines - tda_code/
utils.py , Python, 300 lines - README.md, Text, 141 lines
Code availability
The open-source code generated in this work, along with the code to reproduce the figures, is available on GitHub at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 45 scripts, each with its path and the digest of its content;
- 5 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- zenodo:19470037, at Zenodo; found in the references
Data availability
The real network datasets used in this study are available from the sources referenced in the manuscript and the Supplementary Information. The SYNNET dataset of 792 000 synthetic networks generated with the SD model used for neural network training, along with the neural network checkpoints, is available on Zenodo73.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 2 keywords, 1 funder, 29 references.
Cite
This paper
Ferrà Marcús, A., Jankowski, R., Vila-Miñana, M., Casacuberta, C., & Serrano, M. Á. (2026). Chordless cycle filtrations for dimensionality detection in complex networks via topological data analysis. Nature communications, 17(1), 6105. https://
BibTeX
@article{ferramarcus2026
author = {Ferrà Marcús, Aina and Jankowski, Robert and Vila-Miñana, Meritxell and Casacuberta, Carles and Serrano, M Ángeles},
title = {{Chordless cycle filtrations for dimensionality detection in complex networks via topological data analysis}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {6105},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42091870},
pmcid = {PMC13358065}
}
RIS
TY - JOUR
AU - Ferrà Marcús, Aina
AU - Jankowski, Robert
AU - Vila-Miñana, Meritxell
AU - Casacuberta, Carles
AU - Serrano, M Ángeles
TI - Chordless cycle filtrations for dimensionality detection in complex networks via topological data analysis
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 6105
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Chordless cycle filtrations for dimensionality detection in complex networks via topological data analysis",
"container-title": "Nature communications",
"author": [
{
"family": "Ferrà Marcús",
"given": "Aina"
},
{
"family": "Jankowski",
"given": "Robert"
},
{
"family": "Vila-Miñana",
"given": "Meritxell"
},
{
"family": "Casacuberta",
"given": "Carles"
},
{
"family": "Serrano",
"given": "M Ángeles"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "6105",
"DOI": "10.1038/
"PMID": "42091870",
"PMCID": "PMC13358065",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
6
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-75959-w [code]
- Charting higher-order models of brain function beyond pairwise interactions.Journal: Nature communicationsIn common: Numba, NetworkX, seaborn, 5 other tools, 3 references
- [2] doi:10.3389/fnsys.2026.1822122 [code]
- Convergence-divergence circuits for multimodal integration of innate and learned opponent valences.Journal: Frontiers in systems neuroscienceIn common: Keras, Numba, TensorFlow, 7 other tools, systems
- [3] doi:10.1126/sciadv.aed3650 [code]
- Truthful visualizations for mass spectrometry imaging enable high-spatial-resolution interactive &
lt;i& gt;m/ z& lt;/ i& gt; mapping and exploration. Journal: Science advancesIn common: Keras, Numba, TensorFlow, 6 other tools, 1 reference - [4] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: Keras, Numba, TensorFlow, 7 other tools
- [5] doi:10.1371/journal.pcbi.1014571 [code]
- SynAPSeg: A novel dataset and image analysis framework for deep learning-based synapse detection and quantification.Journal: PLoS computational biologyIn common: Keras, Numba, TensorFlow, 7 other tools
- [6] doi:10.1093/nar/gkag706 [code]
- scDifformer: diffusion-based post-training for virtual cell modeling across large-scale single-cell data.Journal: Nucleic acids researchIn common: Keras, Numba, TensorFlow, 7 other tools
- [7] doi:10.1016/j.xcrm.2026.102766 [code]
- A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.Journal: Cell reports. MedicineIn common: Keras, Numba, TensorFlow, 7 other tools
- [8] doi:10.1016/j.isci.2026.116439 [code]
- Decoding the role of transcriptomic clocks in the human prefrontal cortex.Journal: iScienceIn common: Keras, TensorFlow, NetworkX, 6 other tools, 1 reference
- [9] doi:10.1038/s41467-026-72057-9 [code]
- Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.Journal: Nature communicationsIn common: Keras, Numba, TensorFlow, 6 other tools, systems
- [10] doi: [code]
- Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement controlJournal: eLifeIn common: Keras, Numba, TensorFlow, 6 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 45 scripts, and 5 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:c2e5a88d4b039b73…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
