ONBRA Rigorous Estimation of the Temporal Betweenness Centrality in Temporal Networks (Santoro and Sarpe, TheWebConf 2022)
January 9, 2024 · View on GitHub
How to build
mkdir build.buildcd build.buildcmake ../srcmake
How to use
- Build (see
How to buildabove) - Use the
./onbraexecutable by supplying a graph in the proper format (described below) - Use
./onbra -hto see a list of available flags and options - Note: option
-Eselects if you need to compute the Temporal Betweenness for shortest paths (set it to1) or for shortest -restless walks (set it to3and in such case you will also need the parameter-D)
Example to use ONBRA for shortest paths with a sample size of 1000 pairs of nodes over 10 executions and appending all the results in "result.txt":
./onbra -f <filename> -d -s -E 1 -S 1000 -I 10 &> result.txt
Example to use ONBRA for restless walks with a sample size of 1000 pairs of nodes, delta 3200, over 10 executions and appending all the results in "result.txt":
./onbra -f <filename> -d -s -E 3 -S 1000 -I 10 -D 3200 &> result.txt
Output of ONBRA
A sample of the output that you may obtain by running ONBRA is the following (we comment each line by adding an arrow (→)):
Samples used: → : is the sample size you provided in input.
Bound epsilon, max with samples is: → : is a bound on the supremum deviation in current iteration using the empirical Bernstein bound (see paper).
Time to initizialize structures: → : time needed to initialize internal structures to ONBRA
Time to compute forward paths: → : time to compute paths for sampled pairs of nodes
Time to compute betweenness values: → : time used to process identified paths to update node values
Paths to s-z found: → : number of pairs of nodes sampled for which there exists at least a path from to .
Time needed to read and run sampling alg: → : total time to run an iteration of ONBRA (is at least )
Node 0: -> each is the estimate obtained by ONBRA in -th iteration () for node 0
Node : -> each is the estimate obtained by ONBRA in -th iteration () for node
Graph format for input into the ONBRA
Temporal graphs which are read by the benchmark suite need to have the following form:
- A graph is represented by a sequence of lines, with each corresponding to a temporal edge in the graph
- Node IDs should be non negative integers (starting from 0 included), such as
42or302are valid node IDs. - Timestamps must be positive integers (strictly greater than 0) but such that they fit inside 64-bit signed integer
- Each line of the input must start with the following description of an edge: ID of the origin (tail) node, ID of the destination (head) node, timestamp, all separated by (non-newline) whitespace.
- We assume the input network is pre-processed such that edges appear time-ordered, and nodes appear sequentially, i.e., node id cannot appear on one edge before has not been seen on some other edge. We provide a script to preprocess a dataset in the folder
utils. - Self-loops and duplicate edges are allowed, however they will be ignored
Example of a valid temporal network:
0 1 1
1 2 1
1 2 2
2 3 3