---
title: Qualitative Explainable Graphs (QXGs)
url: https://www.emergentmind.com/topics/qualitative-explainable-graphs-qxgs
type: topic
---

# Qualitative Explainable Graphs (QXGs)

Qualitative Explainable Graphs (QXGs) are symbolic, graph-structured representations that encode a scene through qualitative spatio-temporal relations among objects rather than through raw metric state alone. In the automated driving formulation introduced by Belmecheri and colleagues, a QXG represents a scene \(\mathcal{S}=\langle f_1,\dots,f_n\rangle\) as a graph whose nodes are objects and whose edges store per-frame qualitative relations, typically derived from bounding boxes and motion cues through qualitative calculi such as Rectangle Algebra (RA), Qualitative Distance Calculus (QDC), Qualitative Trajectory Calculus (QTC), and \(STAR_4\) [2308.12755; 2403.09668]. The central premise is that such symbolic relations are compact, human-understandable, and amenable to downstream reasoning, explanation, and learning, particularly in safety-critical domains where post-hoc rationalization of actions is insufficient unless it is grounded in semantically legible scene structure [2308.12755; 2403.16908].

## 1. Formal definition and representational core

In the original automated driving formulation, a Qualitative Explainable Graph is defined for a scene \(\mathcal{S}=\langle f_1,\dots,f_n\rangle\) as
\[
\text{QXG}=(\mathcal{O},\mathcal{E}),
\]
where \(\mathcal{O}=\{o_1,\dots,o_m\}\) is the set of objects appearing in at least one frame and \(\mathcal{E}\) is the set of labeled edges \(V_{ij}\) for each unordered pair \((o_i,o_j)\), \(i<j\), with
\[
V_{ij}=\langle r_{ij}^1,\dots,r_{ij}^n\rangle,\quad r_{ij}^k\in\Phi.
\]
Here \(\Phi\) is the set of qualitative relations induced by the chosen calculus; in the initial formulation, \(\Phi\) is the set of 169 atomic relations of Rectangle Algebra [2308.12755].

This construction makes QXGs explicitly scene-level and temporal. A node records the presence of an object across frames, while an edge records how the qualitative relation between two objects evolves over time. Unlike conventional scene graphs in computer vision, which often use loosely defined learned predicates, QXGs are built from formal qualitative calculi, so the edge labels have mathematically specified semantics and can, at least in principle, support symbolic constraint reasoning [2308.12755; 2504.12817].

A subsequent generalization broadens the edge label from a single calculus to a tuple over multiple calculi. In that formulation, for each frame \(f_k\), an edge label may be written as
\[
V_{ij}[k]=\big(RA(o_i,o_j,k),\;QTC(o_i,o_j,k),\;QDC(o_i,o_j,k),\;STAR_4(o_i,o_j,k)\big),
\]
so that relative position, motion, distance, and coarse orientation are represented simultaneously [2403.16908]. This suggests a useful distinction between the original "RA-centric QXG" and a later multi-calculus QXG; both share the same core idea of symbolic pairwise relation sequences, but differ in representational breadth.

The term "qualitative" in QXG refers to the replacement of continuous variables such as coordinates, metric distances, or velocities by discrete relational categories such as “in front of”, “overlaps”, “approaching”, “close”, or directional sector labels [2308.12755; 2504.12817]. The term "explainable" refers not to a post-hoc visualization of an opaque latent representation, but to the use of a representation whose primitives already possess direct human meaning. In the 2025 QXG+GNN formulation, an explanation \(X\) for an action or event is defined as a relation chain over time involving at least one relevant or causal object:
\[
X=\{(o_i,o_j,r_t)\mid (o_i\in\mathcal{C}\vee o_j\in\mathcal{C}),\ r\in R,\ t\in T\},
\]
which formalizes the idea that explanations are temporal chains of symbolic relations rather than isolated importance values [2504.12817].

## 2. Qualitative calculi and symbolic semantics

The earliest QXG construction is based on Rectangle Algebra, itself a two-dimensional extension of Allen’s Interval Algebra. Allen’s interval language contains 13 atomic relations
\[
\Gamma=\{\texttt{p},\texttt{m},\texttt{o},\texttt{d},\texttt{s},\texttt{f},\texttt{eq},\texttt{pi},\texttt{mi},\texttt{oi},\texttt{di},\texttt{si},\texttt{fi}\},
\]
including precedes, meets, overlaps, during, starts, finishes, equals, and their converses [2308.12755]. Rectangle Algebra defines
\[
\Phi=\Gamma^2,
\]
so each relation is a pair of Allen relations, one on the \(x\)-axis and one on the \(y\)-axis, yielding \(13\times 13=169\) atomic relations [2308.12755]. For two rectangles \(R_1\) and \(R_2\),
\[
R_1\ (a_x,a_y)\ R_2
\]
means that the interval projections of \(R_1\) stand in relation \(a_x\) and \(a_y\) to those of \(R_2\) along the two axes [2308.12755]. This calculus gives QXGs a rigorous geometric basis while preserving interpretability.

Later QXG work extends the relation space with additional qualitative calculi. QDC discretizes Euclidean distance into categories such as \(\{very\ close, close, far, very\ far\}\), using thresholds \(\theta\) over centroid distances [2504.12817; 2509.03169]. QTC captures relative motion patterns such as approaching, moving away, or overtaking, though the full symbol inventory is not enumerated in the 2025 GNN paper [2504.12817]. \(STAR_4\) partitions the area around an object into coarse directional sectors, providing labels such as north, east, south, west, or quadrant-style variants used in examples [2403.09668; 2403.16908].

The resulting representation is not tied to a single fixed calculus family. The 2025 Rashomon analysis explicitly notes that the QXG framework is not dependent on any specific calculus choice, so long as the chosen calculi are expressive enough to describe at least relative positioning and distance, and can be further enriched for particular use cases [2509.03169]. A plausible implication is that QXGs should be regarded less as a single formalism than as a representational template: a graph whose edge labels are temporally indexed qualitative relations drawn from one or more symbolic algebras.

This symbolic basis is one of the principal ways QXGs differ from ordinary scene graphs. Whereas learned scene-graph predicates may be fuzzy or task-contingent, QXG relations are grounded in calculi with explicit semantics and, in some variants, potential support for consistency checking or composition-based reasoning [2308.12755; 2403.09668].

## 3. Construction from perception data and computational properties

The QXG construction pipeline begins with perception outputs rather than raw sensor streams directly. In the 2023 formulation, the QXG Builder takes as input a scene \(\mathcal{S}=\langle f_1,\dots,f_n\rangle\), the qualitative language \(\Phi\), and an object detection and tracking function
\[
\Omega_k=\texttt{objectDT}(\mathcal{S},f_k),
\]
which returns all objects and their bounding boxes in frame \(f_k\) [2308.12755]. For each frame and each pair \((o_i,o_j)\in\Omega_k^2\), \(i<j\), the system uses GEQCA to determine the qualitative relation \(r_{ij}^k\), then updates the global QXG by adding nodes if needed and appending the relation into the temporal edge label sequence [2308.12755].

The underlying acquisition paradigm is Generic Qualitative Constraint Acquisition (GEQCA). In its general form, GEQCA starts from a complete graph over variables with all relations initially possible and eliminates inconsistent relations by querying an oracle and enforcing path consistency:
```text
G ← (X, {E_ij = Γ : i<j})
for each pair (X_i, X_j), i<j:
  for each relation r ∈ E_ij:
    if ask(X_i, r, X_j) == "no":
       E_ij ← E_ij \ {r}
       PC(G)
return G
```
[2308.12755]. In QXG construction, the human oracle is replaced by an automated oracle based on frame geometry, and GEQCA is applied locally on object pairs rather than over the full multi-object graph, so path consistency is not exploited in the current implementation [2308.12755].

The computational characteristics are explicit. Let \(n\) be the number of frames, \(m\) the number of distinct objects, and \(DT\) the cost of detection and tracking. The 2023 paper states time complexity as
\[
O\big(n\times(DT+m^2)\big)
\]
and space complexity as
\[
O(n\times m^2),
\]
since one qualitative relation per frame may be stored for each object pair [2308.12755]. This quadratic pairwise dependence is intrinsic to complete relational encoding and becomes a limiting factor in dense scenes.

The empirical performance reported on nuScenes is correspondingly important. For 40-frame scenes, QXGs reduce storage by 88–94% per sensor and compress roughly 43.3 GB of raw data into roughly 3 GB of QXGs [2308.12755]. For LiDAR, average QXG Builder time per frame is 1.7 ms with a maximum of 40 ms, compared to brute-force enumeration at 253.4 ms average and 3,985 ms maximum; for camera sensors, average QXG Builder time per frame is approximately 0.0–0.2 ms with maxima between 8 and 23 ms [2308.12755]. The paper therefore concludes that QXGs for 40-frame scenes can be computed in real time and stored efficiently enough for long-term logging in automated driving [2308.12755].

A related 2024 article reports incremental construction from LiDAR with per-frame times below 50 ms even for frames containing up to 160 objects, emphasizing real-time use in an automotive stack [2403.09668]. The later March 2024 version states that per-frame QXG construction is generally below one second for scenes up to roughly 50–100 objects, which is directionally consistent though numerically less aggressive [2403.16908]. This discrepancy likely reflects different implementation settings or reporting granularity rather than a substantive change in the representational idea.

## 4. QXGs for scene understanding, relevant object identification, and action explanation

The original QXG work focuses on construction and representational utility, but already frames QXGs as a basis for explanation. Because each edge encodes “who was where relative to whom” over time, relation chains can be verbalized as natural-language descriptions such as “Throughout the scene, the ego car \(o_1\) follows \(o_2\) at close range” or “Vehicle \(o_3\) appears in front of \(o_4\) for two frames, then disappears” [2308.12755]. The paper notes that an LLM can generate such descriptions from the graph, though the textual explanation system is not itself a core contribution [2308.12755].

The March 2024 and January 2024 trustworthy automated driving papers go further by explicitly linking QXGs to observed ego actions. They define action labels such as Cruising, Acceleration, and Stopping, derive object-pair relation chains over a recent time window, and train classifiers that score how strongly a given relation chain is associated with a given action [2403.09668; 2403.16908]. At runtime, the observed action is explained by ranking ego–object relation chains according to how typical they are for that action. The resulting explanation is of the form “The vehicle stopped because another car was approaching from the north-west at close distance” or, in pedestrian cases, because a pedestrian became close and entered the ego path [2403.09668; 2403.16908].

The January 2024 article reports training one random forest classifier per action on 595 QXG scenes and testing on 255 scenes, with precision and recall for Cruising, Acceleration, and Stopping of 89.7%, 89.2%, and 90.6%, respectively, and an average of 89.8% [2403.09668]. These figures are presented as evidence that qualitative relation chains extracted from QXGs carry strong explanatory signal for ego actions.

A distinct but related task is Relevant Object Identification (ROI), introduced in the 2025 "Explainable Scene Understanding with Qualitative Representations and Graph Neural Networks" paper. Here the aim is to identify which objects are relevant to ego decision-making using QXGs enriched with DriveLM relevance labels [2504.12817]. Earlier QXG approaches treated each ego–object relation chain independently and used shallow classifiers such as random forests and AdaBoost; the 2025 paper argues that this ignores full-scene context and cannot capture higher-order interactions [2504.12817].

To remedy this, the paper proposes a Graph Attention Network over the full QXG. Nodes carry only object type; edges carry qualitative features derived from QDC, QTC, and RA, with RA encoded as separate \(x\)- and \(y\)-axis features [2504.12817]. The architecture uses two GAT layers with four attention heads each, then extracts ego-centric star embeddings of the form
\[
v_{\text{ObjRelChain}}=[x_0\ \|\ e_{0j}\ \|\ x_j],
\]
combining the ego node embedding, the qualitative edge embedding, and the context-aware object embedding for each ego–object pair [2504.12817]. A binary classifier then predicts whether that object is relevant.

On 2,465 QXGs from nuScenes + DriveLM, evaluated with 10-fold cross-validation, the GNN achieves Accuracy 87.11, F1 27.28, Precision 17.58, Recall 63.19, and ROC-AUC 86.39, outperforming random forest and AdaBoost baselines that operate only on isolated relation chains [2504.12817]. The paper interprets this as evidence that global scene context encoded in full QXGs is important for relevance estimation [2504.12817]. It also stresses that explainability here derives primarily from the symbolic representation itself rather than from interpreting the GNN’s internal attention weights [2504.12817].

## 5. Empirical findings, ambiguity of explanations, and broader graph-learning connections

QXGs have been positioned not only as an explainable scene representation but also as a useful substrate for studying explanation quality itself. The 2025 paper "Rashomon in the Streets: Explanation Ambiguity in Scene Understanding" uses QXGs as the common symbolic representation for two model classes: pair-based gradient boosting models and graph-based GNNs for action explanation [2509.03169]. This paper is significant because it asks not whether QXGs are interpretable in isolation, but whether explanations derived from them are stable across equally accurate models.

Using QXG-based scenes from nuScenes with DriveLM relevance annotations, the authors train validation-based Rashomon sets of models and compare feature-level explanations with SHAP for gradient boosting and Integrated Gradients for GNNs [2509.03169]. For pair-based LightGBM models, all 100 trained models belong to the Rashomon set; for graph-based GNNs, 32 of 116 models do [2509.03169]. Agreement on explanation features is then measured with Fleiss’ \(\kappa\) for top-\(k\) feature sets and Kendall’s \(W\) for full rankings [2509.03169].

The reported mean Kendall’s \(W\) values are 0.32 for all pair-based predictions and 0.40 for correct pair-based predictions, versus 0.07 for all graph-based predictions and 0.14 for correct graph-based predictions [2509.03169]. The interpretation is that even with a shared symbolic QXG representation, explanation disagreement remains substantial, particularly for GNNs. The paper argues that explanation ambiguity is therefore an inherent property of the scene-understanding problem, not merely a by-product of raw-image inputs or a specific model architecture [2509.03169]. This materially complicates any simplistic claim that symbolic representations alone solve explanation reliability.

Outside automated driving, related work in graph explainability helps situate QXGs conceptually. In digital pathology, entity-centric graph explanations over cell graphs emphasize that moving from pixel-wise to entity-wise reasoning produces qualitatively more interpretable rationales because explanations refer to meaningful objects and their interactions rather than to diffuse saliency fields [2007.00311; 2011.12646]. In explainable graph representation learning, pattern-based decompositions similarly argue that human-understandable graph patterns can serve as semantic bases for graph embeddings [2512.04530]. These are not QXGs in the automotive sense, but they reinforce the broader methodological principle that explainability improves when graph primitives align with domain concepts.

A related survey of explainable GNNs distinguishes between score-based explanations and graph-structured explanation objects such as subgraphs, generated graphs, and semantic intermediate graphs [2207.12599]. QXGs fit most naturally into the latter tradition: they are not simply attribution overlays, but explicit structured objects that can themselves be queried, verbalized, or used as inputs to subsequent models.

## 6. Limitations, misconceptions, and future directions

Several limitations recur across the QXG literature. First, current formulations depend on upstream detection and tracking quality. Missed detections, ID switches, or inaccurate boxes propagate directly into erroneous qualitative relations [2308.12755; 2504.12817; 2403.09668]. This is especially consequential because the qualitative abstraction may make such errors less numerically obvious while still altering symbolic relation chains.

Second, the chosen qualitative calculi remain limited. The original QXG uses Rectangle Algebra only and models time as discrete frame indices without a separate temporal calculus [2308.12755]. The later multi-calculus variants add QDC, QTC, and \(STAR_4\), but still omit richer semantics such as lane membership, traffic light state, crosswalk occupancy, or explicit traffic-rule predicates [2403.09668; 2403.16908]. This suggests that current QXGs capture relational scene geometry well, but not the full normative structure needed for complete traffic reasoning.

Third, although QXGs are symbolic, current systems exploit only limited formal reasoning. The 2023 paper explicitly notes that GEQCA is applied pairwise and that full path consistency over the multi-object graph is not maintained [2308.12755]. The March 2024 work similarly identifies path consistency and qualitative reasoning over noisy relations as future work [2403.16908]. A common misconception is therefore that QXGs already perform symbolic reasoning; in fact, most current contributions focus on symbolic representation and ML over symbolic features, not full qualitative inference.

Fourth, the scope of explanation is often post-hoc. In action explanation work, QXGs rationalize observed ego actions but do not show that the planner itself operated over QXGs or used the same cues [2403.09668; 2403.16908]. This matters because a faithful explanation of model internals and a plausible external rationalization are not identical. The 2025 GNN paper partially reduces this gap by making QXGs the actual input to the predictive model [2504.12817], but even there the learned embeddings and attention operations remain black-box components.

Fifth, performance metrics should not be misread. For ROI, the 2025 GNN paper improves substantially over shallow baselines but still reports a modest F1 of 27.28, with severe class imbalance remaining a challenge [2504.12817]. This suggests that QXG-based scene understanding is promising but not yet solved, especially when richer relevance semantics are required.

Future directions are consistent across papers. They include scaling QXG construction to more objects and longer temporal windows, integrating richer calculi and static infrastructure semantics, learning and mining recurring interaction patterns, connecting QXGs more tightly with perception and control modules, enforcing global consistency, and using QXGs as a basis for formal verification or knowledge-graph augmentation [2308.12755; 2504.12817; 2403.09668; 2403.16908]. The Rashomon study adds another prospective direction: using explanation variance across QXG-based model sets as an uncertainty signal and moving toward consensus explanations rather than single-model attributions [2509.03169].

Taken together, the literature presents QXGs as a technically specific answer to a broader problem in explainable AI for automated driving: how to transform raw, noisy, high-dimensional sensor streams into a compact scene model whose primitives are meaningful enough for human communication yet structured enough for machine reasoning. Their distinctive contribution lies not in explanation after the fact, but in making the scene itself explainable.

Source: https://www.emergentmind.com/topics/qualitative-explainable-graphs-qxgs