Skip to main content

Run Python Tests Version Python 3 Python 3 Documentation Status License: MIT arXiv

TIGER Library

TIGER is a Python toolbox to conduct graph vulnerability and robustness research. TIGER contains numerous state-of-the-art methods to help users conduct graph vulnerability and robustness analysis on graph structured data. Specifically, TIGER helps users:

  1. Quantify network vulnerability and robustness,
  2. Simulate a variety of network attacks, cascading failures and spread of dissemination of entities
  3. Augment a network's structure to resist attacks and recover from failure
  4. Regulate the dissemination of entities on a network (e.g., viruses, propaganda).

For additional information, take a look at the Documentation and our paper:

Evaluating Graph Vulnerability and Robustness using TIGER. Scott Freitas, Diyi Yang, Srijan Kumar, Hanghang Tong, and Duen Horng (Polo) Chau. CIKM Resource Track, 2021.


Setup

To quickly get started, install TIGER using pip

$ pip install graph-tiger

Alternatively, you can clone TIGER, create a new Anaconda environment, and install the library by running python setup.py install.

To verify that everything works as expected, you can run the tests cases using python -m pytest tests/.


Tutorials

We provide 5 in-depth tutorials in the Documentation, each covers a core aspect of TIGER's functionality.

Tutorial 1: Measuring Graph Vulnerability and Robustness

Tutorial 2: Attacking a Network

Tutorial 3: Defending A Network

Tutorial 4: Simulating Cascading Failures on Networks

Tutorial 5: Simulating Entity Dissemination on Networks


Citing

If you find TIGER useful in your research, please consider citing the following paper:

@article{freitas2021evaluating,
    title={Evaluating Graph Vulnerability and Robustness using TIGER},
    author={Freitas, Scott and Yang, Diyi and Kumar, Srijan and Tong, Hanghang and Chau, Duen Horng},
    journal={ACM International Conference on Information and Knowledge Management},
    year={2021}
}

Quick Examples

EX 1. Calculate graph robustness (e.g., spectral radius, effective resistance)

from graph_tiger.measures import run_measure
from graph_tiger.graphs import graph_loader

graph = graph_loader(graph_type='BA', n=1000, seed=1)

spectral_radius = run_measure(graph, measure='spectral_radius')
print("Spectral radius:", spectral_radius)

effective_resistance = run_measure(graph, measure='effective_resistance')
print("Effective resistance:", effective_resistance)

EX 2. Run a cascading failure simulation on a Barabasi Albert graph

Use model='motter_lai' for permanent overload failures or model='crucitti' for dynamic edge-efficiency congestion. Crucitti results are average network efficiencies and are already normalized.

from graph_tiger.cascading import Cascading
from graph_tiger.graphs import graph_loader

graph = graph_loader('BA', n=400, seed=1)

params = {
    'model': 'motter_lai',
    'runs': 1,
    'steps': 100,
    'seed': 1,

    'r': 0.2,
    'c': int(0.1 * len(graph)),

    'k_a': 30,
    'attack': 'rb_node',
    'attack_approx': int(0.1 * len(graph)),

    'k_d': 0,
    'defense': None,

    'robust_measure': 'largest_connected_component',

    'plot_transition': True,  # False turns off key simulation image "snapshots"
    'gif_animation': False,  # True creaets a video of the simulation (MP4 file)
    'gif_snaps': False,  # True saves each frame of the simulation as an image

    'edge_style': 'bundled',
    'node_style': 'force_atlas',
    'fa_iter': 2000,
}

cascading = Cascading(graph, **params)
results = cascading.run_simulation()

cascading.plot_results(results)
Step 0: Initial attacked state Step 6: Beginning of cascading failure Step 100: Final simulated state

EX 3. Run an SIS virus simulation on a Barabasi Albert graph

from graph_tiger.diffusion import Diffusion
from graph_tiger.graphs import graph_loader

graph = graph_loader('BA', n=400, seed=1)


sis_params = {
    'model': 'SIS',
    'b': 0.001,
    'd': 0.01,
    'c': 1,

    'runs': 1,
    'steps': 5000,
    'seed': 1,

    'diffusion': 'min',
    'method': 'ns_node',
    'k': 5,

    'plot_transition': True,
    'gif_animation': False,

    'edge_style': 'bundled',
    'node_style': 'force_atlas',
    'fa_iter': 2000
}

diffusion = Diffusion(graph, **sis_params)
results = diffusion.run_simulation()

diffusion.plot_results(results)
Step 0: Virus infected network Step 80: Partially infected network Step 4999: Virus contained

Techniques Implemented

Vulnerability and Robustness Measures:

Attack Strategies:

Defense Strategies:

Simulation Frameworks:

TIGER implements SIS and SIR as synchronous, discrete-time stochastic processes on a contact network.


License

MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graph_tiger-0.5.0.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graph_tiger-0.5.0-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

Details for the file graph_tiger-0.5.0.tar.gz.

File metadata

  • Download URL: graph_tiger-0.5.0.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for graph_tiger-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3d579a0f56e040731c9697adc20d00115b77e7718b5f48dd55b9bb861d241560
MD5 9a289658ace05df338bd5b056d005e02
BLAKE2b-256 1aff83253367117648baa0f12906423b416c09c42bc46283001069b9201d76fd

See more details on using hashes here.

File details

Details for the file graph_tiger-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: graph_tiger-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 53.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for graph_tiger-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c58f69be26960ea3d96ee1ef2fa0636942b09bbf0129cae4d4a6f38c6621e0
MD5 e44ab7073fcde9e0cdc40e3c12ad5e92
BLAKE2b-256 a2c94d1361edb02ccf17d868c18ae631ad93be9034f385624d24c8534e840ba1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.0

2 files

0.6.0

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.0

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page