OSCR

Efficient Gillespie algorithms for spreading phenomena in large and heterogeneous higher-order networks.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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

Fortran · 443 lines · 19 KB · LGPL-3.0

  1. program simple_network_example_p
  2. use hyperSIS_kinds_mod, only: dp, i4, fmt_general
  3. use hyperSIS_network_mod, only : network_t
  4. use hyperSIS_dynamics_mod, only: dyn_parameters_t, net_state_base_t, net_state_choose
  5. use hyperSIS_program_common_mod, only: read_network, set_dyn_params, check_qs_method, proc_net_state_gen, proc_export_states, check_export_nodes_and_edges_state, set_initial_number_of_infected_nodes
  6. use datastructs_mod, only: measure_controller_t, statistical_measure_t
  7. use rndgen_mod, only: rndgen
  8. use datastructs_mod, only: log_write, set_level, set_verbose, LOGGER_OK, LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_DEBUG
  9. implicit none
  10. ! Network and dynamics variables
  11. type(network_t) :: net
  12. type(dyn_parameters_t) :: dyn_params
  13. class(net_state_base_t), allocatable :: dynamics_state
  14. procedure(proc_net_state_gen), pointer :: after_dynamics_step => null()
  15. procedure(proc_export_states), pointer :: export_states => null()
  16. ! Random number generator
  17. type(rndgen) :: dyn_gen
  18. ! Auxiliary variables
  19. integer(kind=i4) :: i, i_sample
  20. ! Parameters (via CLI)
  21. logical :: logger_verbose
  22. character(len=:), allocatable :: logger_level
  23. integer(kind=i4) :: rnd_seed
  24. integer(kind=i4) :: n_samples
  25. integer(kind=i4) :: initial_number
  26. character(len=:), allocatable :: output_prefix, edges_file, algorithm, sampler_choice, time_scale
  27. real(kind=dp) :: par_b, par_theta, initial_infected_fraction, beta_1, tmax
  28. logical :: use_qs, use_example_network, export_states_flag
  29. ! Measurers
  30. type(measure_controller_t) :: time_control
  31. type(statistical_measure_t) :: time_average
  32. type(statistical_measure_t) :: rho_average
  33. ! Get input data
  34. call handle_cli()
  35. ! Initialize main structures (network, parameters, measurers)
  36. call init_main()
  37. ! Loop over dynamics samples
  38. do i_sample = 1, n_samples
  39. ! Allocate dynamics state
  40. call init_dynamics(i_sample + (n_samples + 1))
  41. ! Run the dynamics up to time tmax, while there are infected nodes
  42. call loop_over_time()
  43. ! Write results to a file
  44. call write_results()
  45. ! Deallocate dynamics state for the next sample
  46. deallocate(dynamics_state)
  47. end do
  48. contains
  49. subroutine handle_cli()
  50. use flap, only : command_line_interface
  51. type(command_line_interface) :: cli ! Command Line Interface (CLI)
  52. character(len=2048) :: cli_string
  53. integer(kind=i4) :: cli_error
  54. call cli%init(progname = 'Run temporal dynamics on a hypergraph network', &
  55. description = 'This program runs a temporal dynamics on a hypergraph network, using the Gillespie algorithm. The network can be read from a file or generated as a small example. The dynamics can be configured with various parameters.', &
  56. version = '1.0', &
  57. authors = 'Wesley Cota')
  58. ! Add options to the CLI
  59. ! IO parameters
  60. call cli%add(switch='--output', &
  61. switch_ab='-o', &
  62. help='Output prefix for result files', &
  63. required=.false., &
  64. act='store', &
  65. def='./output', &
  66. error=cli_error); if (cli_error /= 0) error stop 'Error adding --output'
  67. call cli%add(switch='--remove-files', &
  68. switch_ab='-rm', &
  69. help='Remove existing output files before running', &
  70. required=.false., &
  71. act='store', &
  72. def='false', &
  73. error=cli_error); if (cli_error /= 0) error stop 'Error adding --remove-files'
  74. call cli%add(switch='--edges-file', &
  75. switch_ab='-e', &
  76. help='File containing the edge list of the network as input', &
  77. required=.false., &
  78. act='store', &
  79. def='', &
  80. error=cli_error); if (cli_error /= 0) error stop 'Error adding --edges-file'
  81. ! Dynamics and sampler
  82. call cli%add(switch='--algorithm', &
  83. switch_ab='-a', &
  84. help='Dynamics algorithm to use', &
  85. required=.false., &
  86. act='store', &
  87. choices='HB_OGA,NB_OGA', &
  88. def='HB_OGA', &
  89. error=cli_error); if (cli_error /= 0) error stop 'Error adding --algorithm'
  90. call cli%add(switch='--sampler', &
  91. switch_ab='-s', &
  92. help='Sampler choice', &
  93. required=.false., &
  94. act='store', &
  95. choices='rejection_maxheap,btree', &
  96. def='rejection_maxheap', &
  97. error=cli_error); if (cli_error /= 0) error stop 'Error adding --sampler'
  98. ! Temporal parameters
  99. call cli%add(switch='--tmax', &
  100. switch_ab='-t', &
  101. help='Maximum simulation time', &
  102. required=.false., &
  103. act='store', &
  104. def='1000.0', &
  105. error=cli_error); if (cli_error /= 0) error stop 'Error adding --tmax'
  106. call cli%add(switch='--use-qs', &
  107. switch_ab='-qs', &
  108. help='Use Quasi-Stationary method', &
  109. required=.false., &
  110. act='store', &
  111. def='false', &
  112. error=cli_error); if (cli_error /= 0) error stop 'Error adding --use-qs'
  113. ! Sampling and statistics
  114. call cli%add(switch='--n-samples', &
  115. switch_ab='-ns', &
  116. help='Number of samples to average over', &
  117. required=.false., &
  118. act='store', &
  119. def='10', &
  120. error=cli_error); if (cli_error /= 0) error stop 'Error adding --n-samples'
  121. call cli%add(switch='--time-scale', &
  122. switch_ab='-ts', &
  123. help='Time scale to use', &
  124. required=.false., &
  125. act='store', &
  126. choices='powerlaw,uniform', &
  127. def='powerlaw', &
  128. error=cli_error); if (cli_error /= 0) error stop 'Error adding --time-scale'
  129. ! Dynamical parameters
  130. call cli%add(switch='--initial-fraction', &
  131. switch_ab='-if', &
  132. help='Initial fraction of infected nodes', &
  133. required=.false., &
  134. act='store', &
  135. def='1.0', &
  136. error=cli_error); if (cli_error /= 0) error stop 'Error adding --initial-fraction'
  137. call cli%add(switch='--initial-number', &
  138. switch_ab='-in', &
  139. help='Initial number of infected nodes (overrides initial-fraction)', &
  140. required=.false., &
  141. act='store', &
  142. def='0', &
  143. error=cli_error); if (cli_error /= 0) error stop 'Error adding --initial-number'
  144. call cli%add(switch='--beta1', &
  145. switch_ab='-b1', &
  146. help='Infection rate parameter beta1', &
  147. required=.true., &
  148. act='store', &
  149. error=cli_error); if (cli_error /= 0) error stop 'Error adding --beta1'
  150. call cli%add(switch='--par-b', &
  151. switch_ab='-pb', &
  152. help='Dynamical parameter b', &
  153. required=.false., &
  154. act='store', &
  155. def='0.5', &
  156. error=cli_error); if (cli_error /= 0) error stop 'Error adding --par-b'
  157. call cli%add(switch='--par-theta', &
  158. switch_ab='-pt', &
  159. help='Dynamical parameter theta', &
  160. required=.false., &
  161. act='store', &
  162. def='0.5', &
  163. error=cli_error); if (cli_error /= 0) error stop 'Error adding --par-theta'
  164. ! Additional parameters
  165. call cli%add(switch='--export-states', &
  166. switch_ab='-es', &
  167. help='Export the states of nodes and edges at the end of each sample (be careful with large networks)', &
  168. required=.false., &
  169. act='store', &
  170. def='false', &
  171. error=cli_error); if (cli_error /= 0) error stop 'Error adding --export-states'
  172. call cli%add(switch='--seed', &
  173. switch_ab='-rs', &
  174. help='Random seed for the dynamics', &
  175. required=.false., &
  176. act='store', &
  177. def='42', &
  178. error=cli_error); if (cli_error /= 0) error stop 'Error adding --seed'
  179. call cli%add(switch='--verbose', &
  180. switch_ab='-vv', &
  181. help='Enable verbose logging', &
  182. required=.false., &
  183. act='store', &
  184. def='true', &
  185. error=cli_error); if (cli_error /= 0) error stop 'Error adding --verbose'
  186. call cli%add(switch='--verbose-level', &
  187. switch_ab='-vl', &
  188. help='Logging level', &
  189. required=.false., &
  190. act='store', &
  191. choices='error,warning,info,debug', &
  192. def='info', &
  193. error=cli_error); if (cli_error /= 0) error stop 'Error adding --verbose-level'
  194. call cli%parse(error=cli_error); if (cli_error /= 0) error stop 'Error parsing command line arguments'
  195. ! Collect parameters from CLI
  196. call cli%get(switch='--output', val=cli_string, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --output'
  197. output_prefix = trim(adjustl(cli_string))
  198. call cli%get(switch='--remove-files', val=export_states_flag, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --remove-files'
  199. call cli%get(switch='--edges-file', val=cli_string, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --edges-file'
  200. edges_file = trim(adjustl(cli_string))
  201. call cli%get(switch='--algorithm', val=cli_string, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --algorithm'
  202. algorithm = trim(adjustl(cli_string))
  203. call cli%get(switch='--sampler', val=cli_string, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --sampler'
  204. sampler_choice = trim(adjustl(cli_string))
  205. use_example_network = (len_trim(edges_file) == 0)
  206. call cli%get(switch='--tmax', val=tmax, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --tmax'
  207. call cli%get(switch='--use-qs', val=use_qs, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --use-qs'
  208. call cli%get(switch='--n-samples', val=n_samples, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --n-samples'
  209. call cli%get(switch='--time-scale', val=cli_string, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --time-scale'
  210. time_scale = trim(adjustl(cli_string))
  211. call cli%get(switch='--initial-fraction', val=initial_infected_fraction, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --initial-fraction'
  212. call cli%get(switch='--initial-number', val=initial_number, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --initial-number'
  213. call cli%get(switch='--beta1', val=beta_1, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --beta1'
  214. call cli%get(switch='--par-b', val=par_b, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --par-b'
  215. call cli%get(switch='--par-theta', val=par_theta, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --par-theta'
  216. call cli%get(switch='--export-states', val=export_states_flag, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --export-states'
  217. call cli%get(switch='--seed', val=rnd_seed, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --seed'
  218. call cli%get(switch='--verbose', val=logger_verbose, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --verbose'
  219. call cli%get(switch='--verbose-level', val=cli_string, error=cli_error); if (cli_error /= 0) error stop 'Error parsing --verbose-level'
  220. logger_level = trim(adjustl(cli_string))
  221. call set_verbose(logger_verbose)
  222. select case (trim(adjustl(logger_level)))
  223. case ('error')
  224. call set_level(LOG_ERROR)
  225. case ('warning')
  226. call set_level(LOG_WARNING)
  227. case ('info')
  228. call set_level(LOG_INFO)
  229. case ('debug')
  230. call set_level(LOG_DEBUG)
  231. case default
  232. call set_level(LOG_INFO)
  233. end select
  234. if (len(edges_file) == 0) then
  235. use_example_network = .true.
  236. else
  237. use_example_network = .false.
  238. end if
  239. end subroutine
  240. subroutine init_main()
  241. call time_control%init(time_scale)
  242. call time_average%init(time_control%get_max_array_size(real(tmax,dp)))
  243. call rho_average%init(time_control%get_max_array_size(real(tmax,dp)))
  244. select case (use_example_network)
  245. case (.true.)
  246. ! Generate a simple network
  247. call generate_example_network(net)
  248. case (.false.)
  249. ! Read the network from a file
  250. call read_network(net, edges_file)
  251. end select
  252. ! Clear and check the network (always necessary)
  253. call net%clear_and_check_all(min_order=1)
  254. ! Set initial number of infected nodes if specified
  255. call set_initial_number_of_infected_nodes(net, initial_infected_fraction, initial_number)
  256. ! Set the dynamical parameters
  257. call set_dyn_params(net, dyn_params, par_b, par_theta)
  258. ! Check if the chosen QS method is compatible with the dynamics
  259. call check_qs_method(after_dynamics_step, use_qs)
  260. ! Check if the export states procedure is set
  261. call check_export_nodes_and_edges_state(export_states, export_states_flag)
  262. end subroutine init_main
  263. subroutine init_dynamics(extra_seed)
  264. integer(kind=i4), intent(in), optional :: extra_seed
  265. integer(kind=i4) :: seed_offset
  266. if (present(extra_seed)) then
  267. seed_offset = extra_seed
  268. else
  269. seed_offset = 0
  270. end if
  271. ! reset the time control
  272. call time_control%reset()
  273. call dyn_gen%init(rnd_seed + seed_offset) ! initialize the random generator with a seed
  274. ! select dynamics algorithm
  275. call net_state_choose(dynamics_state, algorithm)
  276. ! allocate and initializes the dynamics with a random configuration
  277. call dynamics_state%init_config(net=net, gen=dyn_gen, params=dyn_params, sampler_choice=sampler_choice, fraction=initial_infected_fraction)
  278. ! Set the beta scale parameter
  279. ! by default, alpha = 1.0
  280. dynamics_state%params%beta_scale = beta_1
  281. ! Initialize the dynamics
  282. call dynamics_state%dynamics_init(net)
  283. end subroutine init_dynamics
  284. subroutine loop_over_time()
  285. ! main dynamics loop
  286. do while (dynamics_state%time < tmax)
  287. ! get Gillespie time
  288. call dynamics_state%just_update_dt(net, dyn_gen)
  289. ! update the state
  290. call dynamics_state%dynamics_step(net, dyn_gen)
  291. ! do something after the dynamics step
  292. call after_dynamics_step(net, dynamics_state, dyn_gen)
  293. ! collect the new data
  294. call collect_data()
  295. ! leave if no infected nodes
  296. if (dynamics_state%get_num_infected() == 0) then
  297. call log_write(LOG_DEBUG, "No more events can occur, stopping the dynamics at t = ", dynamics_state%time)
  298. exit ! exit if no infected nodes
  299. end if
  300. end do
  301. end subroutine loop_over_time
  302. subroutine collect_data()
  303. integer(kind=i4), allocatable :: time_pos_array(:)
  304. integer(kind=i4) :: time_pos
  305. !$omp critical
  306. time_pos_array = time_control%get_pos_array(dynamics_state%time)
  307. do time_pos = 1, size(time_pos_array)
  308. call time_average%add_point(time_pos_array(time_pos), dynamics_state%time)
  309. call rho_average%add_point(time_pos_array(time_pos), 1.0_dp * dynamics_state%get_num_infected() / net%num_nodes)
  310. call export_states(net, dynamics_state, get_filename('states_nodes.dat'), get_filename('states_edges.dat'))
  311. end do
  312. !$omp end critical
  313. end subroutine collect_data
  314. subroutine write_results()
  315. integer(kind=i4) :: unidade_arquivo
  316. integer(kind=i4) :: time_pos
  317. !$omp critical
  318. ! write time average
  319. open(newunit=unidade_arquivo, file=get_filename('results.dat'), status='replace', action='write', form='formatted')
  320. ! write even when not finished
  321. ! For that, we need to know the maximum number of samples
  322. write(unidade_arquivo, fmt_general) '# Number of samples: ', time_average%max_n_samples
  323. write(unidade_arquivo, fmt_general) '# time', 'rho', 'rho_variance', 'n_samples'
  324. do time_pos = 1, time_control%get_max_array_size(real(tmax,dp))
  325. if (rho_average%n_samples(time_pos) > 0) then
  326. ! We use `use_max=.true.` since the missing samples have zero infected nodes
  327. write(unidade_arquivo, fmt_general) time_average%get_mean(time_pos), rho_average%get_mean(time_pos, use_max=.true.), rho_average%get_variance(time_pos, use_max=.true.), rho_average%n_samples(time_pos)
  328. end if
  329. end do
  330. close(unidade_arquivo)
  331. !$omp end critical
  332. end subroutine write_results
  333. subroutine generate_example_network(net)
  334. use hyperSIS_network_mod, only : hyperedge, network
  335. type(network_t), intent(inout) :: net
  336. integer(kind=i4) :: edge_id, node_pos, node_id
  337. net = network(num_nodes = 10, num_edges = 7)
  338. net%edges(1) = hyperedge([1, 2, 3])
  339. net%edges(2) = hyperedge([2, 3, 4])
  340. net%edges(3) = hyperedge([4, 5])
  341. net%edges(4) = hyperedge([1, 5])
  342. net%edges(5) = hyperedge([6, 7, 8])
  343. net%edges(6) = hyperedge([1, 2, 3, 7, 8, 9])
  344. net%edges(7) = hyperedge([9, 10])
  345. net%nodes(:)%degree = 0
  346. ! for each edge, collect the degree of each node
  347. do edge_id = 1, net%num_edges
  348. do node_pos = 1, net%edges(edge_id)%order + 1
  349. node_id = net%edges(edge_id)%nodes(node_pos)
  350. net%nodes(node_id)%degree = net%nodes(node_id)%degree + 1
  351. end do
  352. end do
  353. ! allocate the arrays of edges for each node
  354. do node_id = 1, net%num_nodes
  355. allocate(net%nodes(node_id)%edges(net%nodes(node_id)%degree))
  356. net%nodes(node_id)%degree = 0 ! reset to use as position counter
  357. end do
  358. ! for each edge, fill the edges array of each node
  359. do edge_id = 1, net%num_edges
  360. do node_pos = 1, net%edges(edge_id)%order + 1
  361. node_id = net%edges(edge_id)%nodes(node_pos)
  362. net%nodes(node_id)%degree = net%nodes(node_id)%degree + 1
  363. net%nodes(node_id)%edges(net%nodes(node_id)%degree) = edge_id
  364. end do
  365. end do
  366. end subroutine generate_example_network
  367. function get_filename(filename) result(pathname)
  368. character(len=*), intent(in) :: filename
  369. character(len=256) :: pathname
  370. write(pathname, '(g0)') trim(adjustl(output_prefix))//'_'//trim(adjustl(filename))
  371. end function get_filename
  372. end program simple_network_example_p

hyperSIS_sampling.f90 at commit ecea142, under LGPL-3.0 · at the source

Overview

  1. Departamento de Física, Universidade Federal de Viçosa, Viçosa, MG Brazil
  2. Institute for Biocomputation and Physics of Complex Systems (BIFI), University of Zaragoza, Zaragoza, Spain
  3. Department of Theoretical Physics, Faculty of Sciences, University of Zaragoza, Zaragoza, Spain
  4. National Institute of Science and Technology for Complex Systems, Centro Brasileiro de Pesquisas Físicas, Rua Xavier Sigaud 150, Rio de Janeiro, Brazil
  5. Instituto de Ciências Matemáticas e de Computação, Universidade de São Paulo, São Carlos, SP Brazil
Journal: Nature communications, volume 17, issue 1, article 8665
Dates: received 27 November 2025; accepted 29 June 2026; published online 15 July 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-75402-0 · PMID 42457723 · PMCID PMC13490459 · OpenAlex W7168415193
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: none (in silico) (organism)
Keywords: Complex networks, Biological physics
Topic: Complex Network Analysis Techniques (Statistical and Nonlinear Physics, Physics and Astronomy), according to OpenAlex
Funding: Ministerio de Ciencia, Innovación y Universidades (10.13039.501100011033, PID2023, PID2023-149409NB-I00, / AEI10.13039/501100011033, 13039, MICIU/AEI/ 10.13039/501,100,011,033 /, MICIU/AEI/10.13039, 10.13039, 13039/501100011033, 501100011033, MICIU/AEI/10); Fundação de Amparo à Pesquisa do Estado de São Paulo (AEI/10.13039/501100011033, 10.13039/501100011033, 25/24366-1, 408389/2024-9, MICIU/AEI/10.13039/501100011033); Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (MICIU/AEI/10.13039/501100011033); Conselho Nacional de Desenvolvimento Científico e Tecnológico (408775/2024-6, MICIU/AEI/10.13039/501100011033, 10.13039/501100011033, 408389/2024-9, 310984/2023-8, AEI/10.13039/501100011033); Fundação de Amparo à Pesquisa do Estado de Minas Gerais (APQ-01973-24, APQ-03079-24); Gobierno de Aragón (E36_23R, 501100011033, 10.13039/501100011033, MICIU/AEI/10.13039/501100011033); European Regional Development Fund (10.13039/501100011033, 13039/501100011033, MICIU/ AEI /10.13039/501100011033, AEI/10.13039/501100011033, 501100011033, MICIU/AEI/10, E36-23R, PID2023-149409NB-I00); Agencia Estatal de Investigación (AEI//10.13039/501100011033/, 501100011033, MICIU/AEI /10.13039/501100011033, 10.13039/501100011033, 13039, 13039/501100011033, PID2023, 10.13039, PID2023-149409NB-I00, AEI/10)
Citations: cited by 1 paper (Europe PMC); 59 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above.

gisc-ufv/hyperSIS

License: LGPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: ecea14277af316e9b48066f85532b03cdf98c6d6, 20 August 2026
Languages: Fortran (19), Python (6), Jupyter (2), JavaScript (2)
Size: 114 files, 29 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (python/pyproject.toml, python/setup.py), continuous integration, documentation, 2 notebooks
Not found: CITATION.cff, tests
Tools: NumPy (5 files), NetworkX (4 files), Matplotlib (2 files), seaborn (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
31 files

Zenodo 20548808

License: LGPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (5 files), NetworkX (4 files), Matplotlib (2 files), seaborn (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
31 files
At the source:

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-75402-0.

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 58 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-75402-0.

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 2, 28 September 2026

  • Funding: added Ministerio de Ciencia, Innovación y Universidades: 10.13039.501100011033, PID2023, PID2023-149409NB-I00, / AEI10.13039/501100011033, 13039, MICIU/AEI/ 10.13039/501,100,011,033 /, MICIU/AEI/10.13039, 10.13039, 13039/501100011033, 501100011033, MICIU/AEI/10; Fundação de Amparo à Pesquisa do Estado de São Paulo: AEI/10.13039/501100011033, 10.13039/501100011033, 25/24366-1, 408389/2024-9, MICIU/AEI/10.13039/501100011033; Coordenação de Aperfeiçoamento de Pessoal de Nível Superior: MICIU/AEI/10.13039/501100011033; Conselho Nacional de Desenvolvimento Científico e Tecnológico: 408775/2024-6, MICIU/AEI/10.13039/501100011033, 10.13039/501100011033, 408389/2024-9, 310984/2023-8, AEI/10.13039/501100011033; Fundação de Amparo à Pesquisa do Estado de Minas Gerais: APQ-01973-24, APQ-03079-24; Gobierno de Aragón: E36_23R, 501100011033, 10.13039/501100011033, MICIU/AEI/10.13039/501100011033; European Regional Development Fund: 10.13039/501100011033, 13039/501100011033, MICIU/ AEI /10.13039/501100011033, AEI/10.13039/501100011033, 501100011033, MICIU/AEI/10, E36-23R, PID2023-149409NB-I00; Agencia Estatal de Investigación: AEI//10.13039/501100011033/, 501100011033, MICIU/AEI /10.13039/501100011033, 10.13039/501100011033, 13039, 13039/501100011033, PID2023, 10.13039, PID2023-149409NB-I00, AEI/10

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 2 keywords, 32 references.

Cite

This paper

Maia, H. P., Cota, W., Moreno, Y., & Ferreira, S. C. (2026). Efficient Gillespie algorithms for spreading phenomena in large and heterogeneous higher-order networks. Nature communications, 17(1), 8665. https://doi.org/10.1038/s41467-026-75402-0

BibTeX

@article{maia2026efficient,
author = {Maia, Hugo P and Cota, Wesley and Moreno, Yamir and Ferreira, Silvio C},
title = {{Efficient Gillespie algorithms for spreading phenomena in large and heterogeneous higher-order networks}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {8665},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-75402-0},
url = {https://doi.org/10.1038/s41467-026-75402-0},
pmid = {42457723},
pmcid = {PMC13490459}
}

RIS

TY - JOUR
AU - Maia, Hugo P
AU - Cota, Wesley
AU - Moreno, Yamir
AU - Ferreira, Silvio C
TI - Efficient Gillespie algorithms for spreading phenomena in large and heterogeneous higher-order networks
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/07/15
VL - 17
IS - 1
SP - 8665
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-75402-0
UR - https://doi.org/10.1038/s41467-026-75402-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-75402-0",
"type": "article-journal",
"title": "Efficient Gillespie algorithms for spreading phenomena in large and heterogeneous higher-order networks",
"container-title": "Nature communications",
"author": [
{
"family": "Maia",
"given": "Hugo P"
},
{
"family": "Cota",
"given": "Wesley"
},
{
"family": "Moreno",
"given": "Yamir"
},
{
"family": "Ferreira",
"given": "Silvio C"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "8665",
"DOI": "10.1038/s41467-026-75402-0",
"PMID": "42457723",
"PMCID": "PMC13490459",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-75402-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
15
]
]
}
}

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 communications
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 3 references
[2] doi:10.1016/j.isci.2026.116144 [code]
Spatial continuity of neurons explains non-random network architecture.
Journal: iScience
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 2 references
[3] doi:10.1038/s41467-026-72687-z [code]
Chordless cycle filtrations for dimensionality detection in complex networks via topological data analysis.
Journal: Nature communications
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[4] doi:10.64898/2026.03.04.709586 [code]
Mapping Higher-Order Topology in OCD Brain Networks with Hodge Laplacian
Journal: bioRxiv (preprint)
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[5] doi:10.1016/j.nicl.2026.104052 [code]
Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks.
Journal: NeuroImage. Clinical
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[6] doi:10.1073/pnas.2531706123 [code]
Metabolism-weighted brain connectome reveals synaptic integration and vulnerability to neurodegeneration.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[7] doi:10.1016/j.isci.2026.116173 [code]
Hierarchical sparse spatiotemporal graph neural network for brain graph classification.
Journal: iScience
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[8] doi:10.1016/j.nicl.2026.104012 [code]
Structural-functional multilayer brain network properties and outcome of combined repetitive transcranial magnetic stimulation and psychotherapy for obsessive-compulsive disorder.
Journal: NeuroImage. Clinical
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[9] doi:10.3389/fnsys.2026.1822122 [code]
Convergence-divergence circuits for multimodal integration of innate and learned opponent valences.
Journal: Frontiers in systems neuroscience
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference
[10] doi:10.1093/sleep/zsag030 [code]
Divergent disruption of brain networks following total and chronic sleep loss: a longitudinal fMRI study.
Journal: Sleep
In common: NetworkX, seaborn, Matplotlib, 1 other tool, 1 reference

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.

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.