---
title: '3D Call Graphs: Models & Analysis'
url: https://www.emergentmind.com/topics/3d-call-graphs
type: topic
---

# 3D Call Graphs: Models & Analysis

“3D call graphs” is a polysemous term spanning at least three research lineages. In one lineage, it denotes mathematically exact 3D graph representations in which vertices become axis-aligned polyhedra or voxel blobs and adjacencies are realized by face contacts of positive area [1501.00304; 1507.01450]. In a second lineage, it denotes literal 3D or VR-supported graph exploration systems, where the third dimension is used to expose hierarchy and direction in large directed graphs rather than merely to increase display area [1905.07076]. In a third lineage, it refers to call-graph analysis for software systems such as game engines, HPC codes, and microservices; there the contribution is often dynamic trace reconstruction, comparative profiling, or time-varying pattern modeling rather than 3D rendering itself [2207.06473; 2007.01395; 2412.19083; 2602.01044]. The shared problem is how to preserve structural, semantic, and performance information under severe scale, cyclicity, and variability.

## 1. Representational regimes and scope

The literature distinguishes sharply between abstract graph representation, interactive graph visualization, and software call-graph analysis. This distinction is essential because several papers relevant to “3D call graphs” are explicit that they do **not** study program-analysis call-graph extraction, interprocedural analysis, or runtime invocation semantics; instead they develop 3D contact models for graphs as combinatorial objects [1501.00304; 1507.01450]. Conversely, several call-graph papers focus on runtime traces, architectural recovery, or ensemble comparison, but do not propose literal 3D layouts [2207.06473; 2007.01395; 2602.01044].

| Regime | Core object | Representative focus |
|---|---|---|
| 3D contact representation | Abstract graph as boxes, L-shaped polyhedra, or voxels | Proper contact, realizability, size bounds |
| Interactive 3D viewing | Large directed graph in 3D or VR | Hierarchical force-directed layout, filtering, navigation |
| Software call-graph analysis | Static or dynamic caller–callee structure | Profiling, pattern recovery, comparative analysis |

A persistent misconception is that all work indexed by the phrase concerns software-engineering call graphs in the strict sense. The graph-theoretic contact-representation literature does not. Its value for call-graph research is indirect: it supplies rigorous spatial models for representing adjacency in 3D, including constructive algorithms, lower bounds, and impossibility results [1501.00304; 1507.01450].

Another misconception is that any 3D depiction is automatically a better call-graph view. The visualization literature is more cautious. TGView3D argues for 3D and VR as a way to expose hierarchy and support navigation in very large graphs, but it does not provide a formal comparative evaluation of 2D versus 3D readability or task performance [1905.07076]. Comparative call-graph work in HPC similarly shows that aggregation, alignment, and statistical summarization are often the hard part; geometric embedding alone is not sufficient [2007.01395].

## 2. Geometric and contact-theoretic foundations

The most formal 3D models represent each graph vertex by an axis-aligned polyhedron in $\mathbb{R}^3$, with an edge $(u,v)$ realized when the corresponding polyhedra share a boundary region of non-zero area. The literature distinguishes **proper** contact—positive 2D-area boundary intersection—from point or line contacts, which do not count as valid edges in the intended model [1501.00304]. In this setting, the central planar result is:

$$
\textbf{Theorem 1.}\quad \text{Every } 3\text{-connected planar graph } G=(V,E) \text{ admits a proper primal-dual box-contact representation in 3D and it can be computed in } O(|V|)\text{ time.}
$$

This theorem is constructive. One proof route uses Schnyder woods, ordered path partitions, and orthogonal surfaces; the coordinate assignment gives each vertex $u$ a box
$$
R(u)=[x_M(u),x_m(u)]\times [y_M(u),y_m(u)]\times [z_M(u),z_m(u)],
$$
with facet contacts corresponding to parent-child relations in the Schnyder wood. The construction yields proper non-zero-area contacts and is grid realizable on the $n\times n\times n$ grid [1501.00304].

The same paper extends beyond planar graphs to optimal 1-planar graphs. It proves that every prime optimal 1-planar graph admits a shelled box-contact representation in 3D in $O(|V|)$ time, but also establishes a genuine negative result: $K_5$ has no proper box-contact representation in 3D, and some optimal 1-planar graphs have neither box-contact nor shelled box-contact representations [1501.00304]. This expressive gap motivates a richer primitive. The paper therefore defines L-shaped polyhedra and proves:

$$
\textbf{Theorem 2.}\quad \text{Every optimal }1\text{-planar graph }G=(V,E)\text{ has a proper L-contact representation in 3D and it can be computed in }O(|V|^2)\text{ time.}
$$

A complementary block-based model uses voxels rather than general boxes. A voxel representation assigns each vertex a connected blob of face-adjacent unit cubes, with blob adjacency encoding graph adjacency exactly. In 3D, $\Theta(n^2)$ voxels are always sufficient and sometimes necessary for any $n$-vertex graph; this improves to $\Theta(n\cdot \tau)$ for graphs of treewidth $\tau$ and to $O((g+1)^2n\log^2 n)$ for graphs of genus $g$, implying $O(n\log^2 n)$ voxels for planar graphs [1507.01450]. The paper also proves that minimizing voxel-representation size is NP-complete.

For call graphs, these models are only a partial fit. The voxel paper is explicit that the theory applies to the underlying undirected graph rather than to directed call semantics; direction, edge type, and frequency would have to be encoded separately [1507.01450]. This suggests a mathematically grounded substrate for 3D call-graph geometry, but not a complete semantics-preserving model.

## 3. Literal 3D and VR visualization of large directed graphs

TGView3D provides the clearest example of a literal 3D graph viewer whose design is transferable to call graphs even though its application domain is theory graphs from the MMT/OMDoc ecosystem [1905.07076]. Its key design decision is to treat the third dimension as semantically loaded. The base layout is force-directed: edge directions are ignored for the basic force-directed component, connected nodes attract, all nodes repel, and repeated iterations produce force balance, clusters, and shorter average edge lengths. A second component adds a directional force so that connected nodes are repelled downward or upward depending on whether they are successors or predecessors, yielding a consistent bottom-to-top hierarchy [1905.07076].

This hybrid layout is particularly relevant to call graphs because many call-graph applications have a privileged directional backbone: caller-to-callee depth, architectural layering, package containment, or control-flow strata. TGView3D’s main transferable lesson is therefore not “use 3D because there is more space,” but “use 3D to encode graph semantics.” The paper argues that 3D provides more space, projects hierarchy in a way difficult to emulate in 2D, and supports global and local exploration when combined with scaling and movement, but it also states that regular displays are limiting and that mouse-and-keyboard 3D navigation can be non-intuitive [1905.07076].

Interaction design is central. Users can move through the virtual world using the left control stick; the graph itself can be translated, rotated, and scaled; nodes can be selected by grabbing nearby nodes or using a tractor beam; and filtering can disable edge types, restrict the display to reachable or reverse-reachable subgraphs, focus on neighborhoods, or hide distant regions. Rotation is deliberately constrained to the vertical axis so that hierarchical semantics remain stable [1905.07076]. The implementation uses Unity, Oculus Rift support, GPU instancing, hidden distant labels, and a single-object edge combination to reduce rendering overhead.

The empirical basis is demonstrative rather than comparative. A figure shows the PVS NASA library theory graph with 739 nodes and 2851 edges, and the paper reports design feedback from demos, but no controlled user studies, quantitative readability metrics, or time-to-comprehension comparisons are provided [1905.07076]. For call-graph research, this positions TGView3D as a design and implementation case study rather than a validated superiority claim for 3D.

## 4. Software call graphs: topology, profiling, and comparative analysis

Static call-graph topology places strong constraints on what a useful 3D system would need to emphasize. A corpus study of 35 open-source projects in C, C++, OCaml, and Haskell finds that call graphs are directed and simple, can contain loops and cycles, and are generally not strongly connected. Indegree is consistent with a power law with $2.3 \le \gamma \le 2.9$, outdegree is consistent with an exponential distribution, call graphs are decidedly small world, and symmetrized call graphs are scale-rich rather than scale-free [0803.4025]. The same study reports high clustering relative to random graphs, a clustering-by-degree relation $C(d_i)\propto d_i^{-1}$, rapidly decaying exponential betweenness, and largest strongly connected components ranging from about 1% to 30% of nodes, depending on system and language [0803.4025]. For 3D design, these results imply that hubs, recursive cores, clustered subsystems, and bridge functions are structural first-class objects rather than secondary annotations.

Dynamic profiling studies expose a different layer of semantics. The game-engine comparison of Godot and Urho3D does not provide 3D graph drawing, but it uses Callgrind and KCachegrind to recover a high-level architecture view from runtime call graphs [2207.06473]. The workflow is explicit: select engines, compile them, create a minimal runnable “base game,” build the executable with debug symbols, run it under Callgrind, and inspect the resulting trace in KCachegrind. The resulting graphs preserve caller–callee relations, call order, call frequency, and CPU-cycle cost per method, though the paper reports the last only qualitatively [2207.06473]. Godot’s profiled startup includes class registration, X11 window initialization, scene creation, message-queue activity, GUI theme initialization, and repeated calls to `ProceduralSky::_generate_sky`, while Urho3D initializes its graphics object first and then uses SDL/X11 to open a window [2207.06473]. The contribution is architectural recovery from execution traces rather than 3D rendering.

Comparative performance analysis of call-graph ensembles introduces yet another set of requirements. “Scalable Comparative Visualization of Ensembles of Call Graphs” treats hierarchical performance profiles from tools such as gprof, HPCToolkit, and Caliper as ensembles of related graphs, and represents them with Hatchet GraphFrames [2007.01395]. It constructs an ensemble calling-context tree by unifying calling contexts across runs, uses $\varnothing$ for missing nodes, aggregates to call graphs and semantically grouped super graphs, and encodes run distributions with ensemble-Sankey. The system supports ensemble summary, target-versus-ensemble comparison, and target-versus-target diff, and is reported to scale up to about 100 profiles while maintaining interactivity [2007.01395]. Although this system is 2D, its main relevance to 3D call graphs is methodological: multi-run alignment, explicit missingness, and linked statistical views are indispensable.

## 5. Runtime microservice call graphs as multi-dimensional structures

Microservice research pushes the notion of a call graph beyond static topology toward a high-dimensional runtime object. DGG distinguishes **fine-grained call graphs** from **service dependency graphs** [2412.19083]. A call graph corresponds to the execution path of one class of user query through part of the microservice system; all the call graphs of a service form its service dependency graph. The paper argues that coarse DAGs miss two production realities: dynamic interfaces and repeated calling. It therefore defines fine-grained call graphs as weighted directed graphs in which each vertex is a triplet
$$
(ms\_name, interface, label),
$$
with
$$
L=\{\text{database}, \text{memcached}, \text{normal}, \text{relay}, \text{leaf}\},
$$
and each edge is
$$
(u,v,w,t),
$$
where $w$ is repeated-call count and
$$
T=\{\text{http}, \text{rpc}, \text{mq}, \text{mc}, \text{db}\}.
$$

The trace statistics are explicitly production-oriented. In Meta trace, 20.4% of repeated calls occur within children sets; in Alibaba trace, 16.2%; for database and memcached microservices in Alibaba, repeated calls are 52.5% [2412.19083]. After filtering Alibaba data, the top 90% of call graphs retained totaled 72,942, and on average there are more than 45 call graphs per dependency graph. Shared structure is dominant: 92.2% of microservices in Meta and 77.1% in Alibaba appear in different children sets. DGG models branching with a conditional probability
$$
P(u \to C \mid s, d) = \frac{\sum_{cg_i \in CG} I(u \to C , s, d, cg_i) \cdot count(cg_i)}{\sum_{C' \in C_u} \sum_{cg_j \in CG} I(u \to C', s, d, cg_j) \cdot count(cg_j)},
$$
which depends on the current microservice $u$, candidate children set $C$, sibling set $s$, and depth $d$ [2412.19083]. Using graph kernels and K-means, the paper categorizes Alibaba dependency graphs into 6 classes, reports intra-cluster similarity 3.4X higher than inter-cluster similarity, and shows that the resulting FineGrained-Scale improves resource efficiency by up to 44.8% while ensuring the required QoS [2412.19083].

Morphis models the same problem at a higher level of structural abstraction. It treats traces of one semantic request type as
$$
T = \{T_1, T_2, \ldots, T_n\},
$$
and each trace as a DAG
$$
G_i = (V_i, E_i, P_i),
$$
where $V_i$ is the set of service invocation spans, $E_i$ are parent-child relations, and $P_i$ maps nodes and edges to attributes such as latency, error flags, and timestamps [2602.01044]. A set of traces is summarized by a structural signature
$$
Y(T) := (B, S),
$$
where $B$ is an execution backbone and $S=\{\sigma_1,\ldots,\sigma_m\}$ is a set of deviation subgraphs. Backbone extraction operates on root-to-leaf paths decomposed into overlapping $k$-grams with $k=3$, with segment support
$$
s(w) = \frac{1}{|T|} \left|\left\{ T \in T \mid \exists p \in \text{Paths}(G_i) \text{ such that } w \subset p \right\}\right|,
$$
and a criticality score
$$
\mathcal{C}(w)=\alpha \cdot \frac{1}{|T|}\sum_{T \in T}\frac{L_w(T)}{L_{e2e}(T)} +(1-\alpha)\cdot \frac{1}{|T|}\sum_{T \in T}\frac{|D_w(T)|}{|V(T)|}.
$$
Deviation subgraphs are represented as
$$
\sigma = (V_\sigma, E_\sigma, v_d, v_m, \phi_\sigma),
$$
with feature vector
$$
\phi_\sigma = [\text{depth}, \text{width}, |V_\sigma|, P_{\text{exec}}, P_{\text{fail}}].
$$
The paper’s empirical claim is that over 500,000 ByteDance production traces, execution paths concentrate around a small set of recurring invocation patterns; in one service, 19 distinct end-to-end call patterns account for 90% of traces, and in a comment-processing service, the top 8 patterns account for over 50% while the top 110 cover 80% [2602.01044]. Morphis then forecasts pattern frequencies and optimizes resource allocation, reducing CPU consumption by 35–38% while maintaining 98.8% SLO compliance [2602.01044].

Taken together, these microservice papers suggest that a “3D call graph” may need three orthogonal dimensions even before any geometric rendering is considered: stable topology versus deviation structure, pattern identity across request classes, and temporal variation in pattern prevalence. This is an inference from their formal models rather than an explicit visualization proposal.

## 6. Limits, open questions, and synthesis

The literature is unified less by a single technique than by recurring constraints. First, directed semantics remain difficult to encode in contact-based 3D models. Voxel and polyhedral contact representations are exact for adjacency, but not for call direction, recursion semantics, dynamic dispatch, or weighted invocation frequency [1507.01450; 1501.00304]. Second, literal 3D navigation is itself a usability problem. TGView3D explicitly notes the limitations of regular displays and the non-intuitive character of mouse-and-keyboard 3D navigation, motivating head-mounted display support and constrained rotation [1905.07076]. Third, several of the most informative call-graph systems are not 3D at all, because comparative analysis often depends on linked histograms, box plots, parameter projections, and ensemble summaries that are perceptually more stable in 2D [2007.01395].

Graph-class restrictions are also substantial. The strongest box-contact theorem applies to 3-connected planar graphs, prime optimal 1-planar graphs admit shelled box-contact representations, and arbitrary optimal 1-planar graphs require L-shaped polyhedra rather than boxes [1501.00304]. Voxel bounds improve dramatically under low treewidth or bounded genus, but exact minimization is NP-complete [1507.01450]. In software terms, this means that raw call graphs may be too dense or semantically rich for direct contact representation, and preprocessing—such as condensation, aggregation, or semantic filtering—becomes structurally important.

On the software side, open questions concern realism, evaluation, and dimensionality. DGG preserves interface-level identity, repeated calls, communication modes, and shared services across many call graphs, but does not provide an explicit 3D or temporal visualization model [2412.19083]. Morphis formalizes time-varying runtime call graphs and structural fingerprints, but it is a provisioning framework rather than a 3D viewing system [2602.01044]. Comparative HPC visualization demonstrates that even when graph structure is similar across runs, structural union, missingness, and performance variability require explicit analytical support [2007.01395]. This suggests that a mature 3D call-graph system would need to integrate spatial hierarchy, distributional overlays, and linked non-spatial analytics rather than relying on depth alone.

The field therefore presents a layered picture. The graph-theoretic literature provides exact 3D adjacency models and complexity bounds; interactive 3D visualization supplies design patterns for hierarchy, filtering, and VR navigation; software call-graph analysis contributes profiling workflows, topological regularities, and multi-run comparison; and microservice research contributes dynamic, weighted, interface-aware, time-varying call-graph models [1501.00304; 1905.07076; 0803.4025; 2412.19083]. A plausible implication is that “3D call graphs” are best understood not as a single artifact, but as an intersection of geometric representation, interactive spatial analysis, and richly annotated execution structure.

Source: https://www.emergentmind.com/topics/3d-call-graphs