[New Paper + Source Code] GraphOptima: A graph layout optimization framework for visualizing large networks

We are excited to announce the publication of a new paper titled GraphOptima: A graph layout optimization framework for visualizing large networks” in Software X by Anatoliy Gruzd (Toronto Metropolitan University), Jingwei Zhang (University of Toronto), and Philip Mai (Toronto Metropolitan University).

Graphs are crucial in visualizing online and offline networks, their participants and interactions. These visual representations have become indispensable tools for studying various issues, including the propagation of misinformation, botnet activities, algorithmic filtering, and the spread of disease. Researchers rely on these graphs to uncover underlying structures, formulate hypotheses, and communicate their findings to the public.

However, creating visually appealing and informative network visualizations is no simple task, especially for large networks with millions of nodes and edges. It often requires researchers to manually experiment with multiple layout algorithms and fine-tune parameters to achieve the desired result. This process is time-consuming, particularly for large networks, where the computational complexity of rendering a graph can lead to significant delays between adjustments and results. These challenges can hinder iterative exploration and analysis.

To address these issues, this paper introduces GraphOptima, an open-source framework designed to optimize graph layouts and improve readability metrics. GraphOptima automates key steps in the visualization process, including parameter selection, layout computation, and readability metric evaluation. Unlike conventional approaches that aim to provide a single “optimal” solution, GraphOptima generates a set of solutions by applying multi-objective optimization. This allows researchers to compare and evaluate different layouts based on multiple readability metrics, such as:

  • Crosslessness: Minimizing the number of edge crossings.
  • Normalized Edge Length Variance: Ensuring uniformity in edge lengths.
  • Minimum Angle: Maximizing the smallest angle between edges to enhance clarity.

For example, the figure below shows a scatter plot representing possible layout solutions for a Reply-To network from Reddit with 39,492 nodes and 232,717 edges. The network is derived from 359,289 posts shared in r/conspiracy between August 10 and 31, 2020. Each dot represents a ForceAtlas2 layout with specific parameter values for the Scaling Factor, Gravity, and Max Number of Iterations. The X, Y, and Z coordinates correspond to the values of the three readability metrics used for optimization: Crosslessness, Normalized Edge Length Variance, and Minimum Angle.

Objective Space of Layout Solutions for a Reply-To Reddit Network
  • Layout A maintains uniform edge lengths throughout the graph, resulting in more edge crossings and smaller minimum angles between edges.
  • Layout B keeps angles between edges as orthogonal as possible.
  • Layout C minimizes edge crossings, producing even fewer overlapping edges than in Layout B. While this optimization leads to a more uneven edge length distribution, this layout may be more desirable for researchers interested in examining hubs, rather than other aspects of a network.

If you would like to learn more about this new open-source framework and how it can help you visualize large networks, check out the full paper here. As for the source code and documentation for GraphOptima, they are available on GitHub.

Citation:

Gruzd, A., Zhang, J., & Mai, P. (2025). GraphOptima: A graph layout optimization framework for visualizing large networks. SoftwareX29, 102034.