Search for dense subgraphs

Search for dense subgraphs (or corrupted cliques) is a very common problem arising in bioinformatics (e.g., co-expression of genes) and studies of social interactions (e.g., recommendation services).

We decided to make an algorithm for dense subgraphs search available as an independent tool. One can download IgRepertoireConstructor archive and run DSF for search of dense subgraphs. Details of DSF usage can be found in manual.

Input / output

DSF takes indirected graph in GRAPH format as an input. Below are examples representation of unweigthed (left), edge weighted (middle) and edge & vertex weighted (right) graphs in GRAPH format:

Unweighted Edge weighted Edge & vertex weighted
7 9
2 3
1 3
1 2 4 6 7
3 6 7

3 4 7
3 4 6
7 9 001
2 20 3 -3
1 20 3 4.5
1 -3 2 4.5 4 1 6 0.7 7 0.8
3 1 6 -1.5 7 43

3 0.7 4 -1.5 7 7.8
3 0.8 4 43 6 7.8
7 9 011
3 2 20 3 -3
7 1 20 3 4.5
2 1 -3 2 4.5 4 1 6 0.7 7 0.8
0.6 3 1 6 -1.5 7 43
1
1 3 0.7 4 -1.5 7 7.8
11.5 3 0.8 4 43 6 7.8

Output of DSF is a decomposition of an input graph where the identical ids are assigned for vertices from the same dense subgraph.

Example of DSF work

Density of constructed subgraph can be tuned via parameter -f (minimum edge fill-in in dense subgraphs). Table below shows how dense subgraph decomposition varies depending of minimal edge fill-in value.

dsf_example_edge_fill-in_0.3
dsf_example_edge_fill-in_0.4
Minimal edge fill-in = 0.3 Minimal edge fill-in = 0.4
# dense subgraphs = 55
# trivial subgraphs = 40
size of maximal subgraph = 157
# dense subgraphs = 61
# trivial subgraphs = 46
size of maximal subgraph = 104
dsf_example_edge_fill-in_0.5 dsf_example_edge_fill-in_0.7
Minimal edge fill-in = 0.5 Minimal edge fill-in = 0.7
# dense subgraphs = 60
# trivial subgraphs = 43
size of maximal subgraph = 87
# dense subgraphs = 68
# trivial subgraphs = 42
size of maximal subgraph = 43

Here is an example of DSF work for finding recommendations. Graph polbooks shows books about USA politics that were bought by the same customer on Amazon. Dense subgraphs in such graph present books that can be recommended together.

polbooks_fill-in_0.2
polbooks_fill-in_0.2
polbooks_fill-in_0.2
Minimal edge fill-in = 0.2 Minimal edge fill-in = 0.5 Minimal edge fill-in = 0.7
# dense subgraphs = 17
# trivial subgraphs = 8
size of maximal subgraph = 28
# dense subgraphs = 30
# trivial subgraphs = 11
size of maximal subgraph = 16
# dense subgraphs = 45
# trivial subgraphs = 16
size of maximal subgraph = 6

Citation and feedback

Your comments, suggestions and bug reports are very welcome. If you use DSF in your research, please cite our paper: