Software for Agent-based Network Simulation and Visualization

Patrick Shepherd, Isaac Batts, Judy Goldsmith, Emory Hufbauer, Mia Weaver, Angela ZhangAAAI 2021 · DOI

Abstract

Modern social network analysis requires tools that can model the complex, bidirectional relationship between network structure and agent behavior. This paper introduces a flexible, agent-based simulation framework designed to handle the co-evolution of network topology and multidimensional agent attributes. By utilizing a novel "archetype" system and integrating reinforcement learning capabilities, the software allows researchers to simulate diverse social phenomena—from epidemic spread to opinion polarization—with high customizability and reduced programming overhead.

Introduction

In real-world social systems, networks are rarely static. A person’s opinions are often shaped by their social circle, but their choice of friends is equally influenced by their beliefs. This "feedback loop" between network topology (who is connected to whom) and attribute space (what those individuals believe or do) is known as co-evolution. While existing tools like Gephi excel at static visualization and libraries like Tulip offer deep customization for experts, there remains a significant gap for a tool that simplifies the modeling of these dynamic, interacting systems.

Presented at AAAI-21, this research introduces a Python-based simulation suite developed at the University of Kentucky. The framework aims to "flatten the learning curve" for researchers, providing a scalable and modular environment to study how complex social behaviors emerge from individual agent interactions.

System Architecture and Core Innovations

The framework is built upon NetworkX, the industry-standard Python package for network structures, but extends it to support high-frequency temporal changes and complex agent logic.

1. Dynamic Topology

Unlike traditional models that treat edges as fixed, this framework treats the network as a living graph. It provides built-in mechanisms for edge creation and deletion, such as "triadic closure"—the social tendency for individuals with common acquaintances to form a direct link. Users can easily swap these default rules for custom deterministic or probabilistic models to suit specific research needs.

2. The Archetype System

The core innovation of the software is the Archetype System. In many traditional simulations, agents are treated as homogeneous units following identical rules. This framework allows researchers to define distinct archetypes with unique behavioral logic. For instance, a simulation might include:

  • Homophilic agents: Those who seek connections with similar individuals.
  • Heterophilic agents: Those who prefer diverse connections.
  • Influencers or Trolls: Agents with specific strategies for spreading information or causing disruption.

This behavioral heterogeneity is essential for modeling realistic social environments where different roles (e.g., lurkers vs. active participants) drive different network outcomes.

3. Multidimensional Attribute Spaces and Visibility

Agents are not limited to a single state. They can hold opinions or statuses across $k$ different dimensions simultaneously, which can be represented as binary or continuous values. Furthermore, the software introduces visibility control, allowing agents to decide when and to whom they reveal their internal states. This is a critical feature for modeling the difference between private beliefs and public discourse.

Advanced Features: RL and Visualization

To support modern AI research, the framework includes a native interface for Reinforcement Learning (RL). Agents can be treated as learners that receive rewards based on their network interactions, allowing researchers to evolve agent "policies" over time.

Complementing the simulation engine is a scalable Visualization API. The engine is designed to handle dynamic updates for thousands of nodes in real-time. This allows researchers to visually track the formation of opinion clusters, the "flattening of the curve" in epidemic models, or the emergence of echo chambers as they happen.

Applications and Demonstrations

The authors demonstrated the framework's versatility through two primary case studies:

  • Epidemic Modeling: A simulation of the SIR (Susceptible, Infected, Removed) model. The tool visualized not only the health status of agents but also behavioral attributes, such as whether an agent was adhering to safety protocols like wearing a face mask.
  • Opinion Dynamics: A study of "conformist" versus "contrarian" voters. The simulation showed how different ratios of these archetypes could lead to either a broad consensus or deep societal polarization.

Performance and Scalability

The software is optimized for medium-scale simulations, comfortably handling dynamic visualizations of thousands of nodes. By providing a high-level API for node styling and a replaceable mechanism for edge evolution, the authors have significantly reduced the "heavy programming load" typically associated with bespoke agent-based models.

Conclusion and Future Directions

This framework represents a significant step forward in making complex network simulation accessible. By emphasizing the co-evolution of structure and state, it provides a more accurate mirror for real-world social dynamics.

Future development is focused on further optimizing the underlying data structures to reach "Twitter-scale" simulations involving millions of nodes. Additionally, the team plans to expand the RL interface to support "deliberate actors"—AI agents capable of strategic manipulation to achieve specific network-wide goals.

Summary updated

BibTeX
@inproceedings{shepherd2021software,
  author = {Patrick Shepherd and Isaac Batts and Judy Goldsmith and Emory Hufbauer and Mia Weaver and Angela Zhang},
  title = {{Software for Agent-based Network Simulation and Visualization}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i18.18025},
}
Figure