IGS is a graph-based scoring method that quantifies semantic and logical dependencies by leveraging structured graph representations and dependency order.
It supports multi-step reasoning in natural language and code tasks as well as integrity evaluation in quantum circuits through asymmetric, query-anchored or symmetric formulations.
IGS employs tailored graph constructions, aggregation techniques, and discrepancy metrics to detect subtle anomalies and enhance candidate selection in retrieval systems.
Searching arXiv for the specified papers to ground the article.
Interaction Graph Semantic-Logical Score (IGS) is a graph-based scoring construct used to compare structured dependencies and semantic content beyond surface similarity. In the cited literature, the term is used for two distinct formulations. In GraphIC, IGS is a query-anchored, asymmetric similarity score for in-context example retrieval in multi-step reasoning, derived from a Bayesian Network likelihood on a thought graph (Fu et al., 2024). In a quantum-circuit integrity framework, IGS is a pre-execution score defined from normalized discrepancies between interaction graphs of a candidate circuit and a reference circuit, and is positioned alongside the Structural Integrity Score (SIS) and the Operational Integrity Score (OIS) (Ahmed et al., 29 Apr 2026). Both formulations emphasize interaction patterns, dependency order, and semantics carried by graph structure rather than direct text cosine similarity or structure-only comparison.
1. Scope and naming
The two reported uses of IGS differ in objective, graph construction, and mathematical form, while sharing the assumption that a graph can encode semantic-logical dependencies more faithfully than flat representations.
In GraphIC, the graph is built from a formalized reasoning representation (FRR) or, for code, from a control-flow graph; the score is asymmetric because candidate parameters are applied to the query graph (Fu et al., 2024). In the quantum-circuit framework, the graph is a labeled directed acyclic graph whose nodes are operations and whose edges encode shared-qubit precedence; the score is symmetric in presentation as a discrepancy from a reference artifact, although the framework itself is oriented around candidate-versus-reference validation (Ahmed et al., 29 Apr 2026).
2. GraphIC formulation: thought graphs, aggregation, and asymmetric scoring
GraphIC defines a thought graph for any example or query as a directed, vertex-attributed graph G=(V,E,A), where V={v1​,…,vn​} are reasoning units, E⊆V×V are directed dependencies, and A contains node text, node embeddings xi​∈Rnf​, and, for math, logic, and proofs, an operation label oi​ (Fu et al., 2024). Each vertex corresponds to an operation or intermediate conclusion in natural-language reasoning, or to a code block or basic block in code tasks. The adjacency matrix is binary, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​0 if S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​1, and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​2 is the in-degree of S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​3.
For math and logical reasoning, GraphIC generates an FRR with an LLM and parses lines of the exact form
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​4
The parser extracts inputs, output, and operation name, creates nodes as needed, labels the output node with the operation name, and adds directed edges from each input to the output, yielding a DAG that respects causal and temporal order. For code generation on MBPP, the paper uses staticfg to parse Python into a control-flow graph, anonymizes identifiers, and computes node features with CodeBERT (Fu et al., 2024).
GraphIC then performs graph-dependent aggregation with a Personalized PageRank-style mixture of forward propagation and return-to-sources: S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​6
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​7
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​8
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​9
G(C)=(V,E,λV​,λE​)0
This recurrence propagates and smooths node features along ordered dependency paths while allowing periodic revisits to root or earlier nodes, which the paper describes as capturing sequential and temporal patterns in multi-step reasoning (Fu et al., 2024).
The score is then derived from a Bayesian Network conditional model on aggregated features. With G(C)=(V,E,λV​,λE​)1 the G(C)=(V,E,λV​,λE​)2-th row of G(C)=(V,E,λV​,λE​)3,
G(C)=(V,E,λV​,λE​)4
GraphIC uses
G(C)=(V,E,λV​,λE​)5
G(C)=(V,E,λV​,λE​)6
so that
G(C)=(V,E,λV​,λE​)7
The joint log-likelihood, up to constants, is
G(C)=(V,E,λV​,λE​)8
To avoid non-uniqueness and reduce computation, GraphIC constrains G(C)=(V,E,λV​,λE​)9 to rank IGS(C,Cref​)=1−ΔIGS​0,
IGS(C,Cref​)=1−ΔIGS​1
which yields the optimization
IGS(C,Cref​)=1−ΔIGS​2
The closed-form solution is given by the top singular vectors of IGS(C,Cref​)=1−ΔIGS​3: if IGS(C,Cref​)=1−ΔIGS​4, then IGS(C,Cref​)=1−ΔIGS​5 and IGS(C,Cref​)=1−ΔIGS​6. For a candidate IGS(C,Cref​)=1−ΔIGS​7, the fitted parameters IGS(C,Cref​)=1−ΔIGS​8 are estimated from IGS(C,Cref​)=1−ΔIGS​9, and for a query G=(V,E,A)0, the Interaction Graph Semantic-Logical Score is
G=(V,E,A)1
The paper explicitly states that IGS is inherently asymmetric,
G=(V,E,A)2
because candidate parameters are applied to the query’s features and structure. This directionality is presented as important for retrieval, since the relevant question is whether a candidate’s thought pattern is useful for the query rather than whether the reverse holds (Fu et al., 2024).
3. Retrieval workflow and empirical profile in GraphIC
GraphIC uses an offline-online retrieval procedure. Offline, for each candidate example, the system generates an FRR with an LLM, parses it to G=(V,E,A)3, builds node embeddings G=(V,E,A)4, removes numeric-only leaves if present in math and logic tasks, computes G=(V,E,A)5 with the aggregation rule above, computes G=(V,E,A)6 from the top singular vectors of G=(V,E,A)7, and stores those parameters with candidate metadata. Online, for a query G=(V,E,A)8, the system generates an FRR, constructs G=(V,E,A)9, V={v1​,…,vn​}0, and V={v1​,…,vn​}1, then scores each candidate with
V={v1​,…,vn​}2
The paper notes an implementation shortcut: V={v1​,…,vn​}3
which avoids materializing V={v1​,…,vn​}4 (Fu et al., 2024).
The reported complexity is V={v1​,…,vn​}5 for aggregation with sparse adjacency, where V={v1​,…,vn​}6 is the number of nodes, V={v1​,…,vn​}7, V={v1​,…,vn​}8 is the embedding dimension, and V={v1​,…,vn​}9 is the propagation depth. Scoring one candidate for one query requires two matrix-vector multiplies and one dot product, with costs E⊆V×V0, E⊆V×V1, and E⊆V×V2, respectively. Memory usage is reduced by storing only E⊆V×V3 per candidate and E⊆V×V4 for the current query. For very large candidate pools, the paper suggests pre-filtering by a cheap similarity such as FRR-text BERT cosine, caching E⊆V×V5 and E⊆V×V6, and parallelizing candidate scoring.
In integration into in-context learning, the candidate bank is precomputed per dataset or task. At inference time, the system constructs E⊆V×V7, E⊆V×V8, and E⊆V×V9, computes A0 for all candidates, selects the top-A1, formats them into prompts with dataset-specific templates, and submits the prompt to the target LLM. The reported settings use BERT-base-uncased for math and logic, CodeBERT for code, A2, A3 chosen per dataset and LLM, typically A4, and temperature A5 in the reported experiments (Fu et al., 2024).
Empirically, across GSM8K, AQUA, MBPP, and ProofWriter with GPT-4o-mini and Llama-3.1-8B-Instruct, GraphIC’s IGS-based retrieval consistently outperforms 10 baseline methods. With GPT-4o-mini, the paper reports that GraphIC exceeds the best training-free baseline by A6 and the best training-based baseline by A7 on average; on AQUA it reaches A8 versus A9 for the best training-based system. With Llama-3.1-8B-Instruct, GraphIC ranks first on GSM8K, AQUA, and ProofWriter, improving over the best training-free baseline by xi​∈Rnf​0 and the best training-based baseline by xi​∈Rnf​1 on average. An additional GSM8K experiment with GPT-3.5-Turbo reports xi​∈Rnf​2 for GraphIC versus xi​∈Rnf​3 for the best baseline. Ablations link the gains to the graph construction, the PPR-style aggregation, and the BN likelihood: on GSM8K with Llama-3.1-8B-Instruct, text-only BERT embeddings yield xi​∈Rnf​4, FRR embeddings without graph yield xi​∈Rnf​5, graph-only aggregation yields xi​∈Rnf​6, and Graph + PPR + BN reaches xi​∈Rnf​7. The same section reports that adding PPR with xi​∈Rnf​8 yields consistent improvements, for example AQUA xi​∈Rnf​9, and that the full BN likelihood with rank-1 parameterization performs best across datasets. The asymmetry claim is also validated empirically by comparing GraphIC’s score matrices with a ground-truth usefulness matrix oi​0, which is itself asymmetric (Fu et al., 2024).
4. Quantum-circuit IGS: interaction graphs and discrepancy decomposition
In the quantum-circuit integrity framework, each circuit is represented pre-execution as a labeled directed acyclic graph
oi​1
where oi​2 is the set of quantum operations, oi​3 are dependency edges induced by shared-qubit usage and execution order, oi​4 assigns node attributes, and oi​5 may annotate edges with the qubit that induces the dependency (Ahmed et al., 29 Apr 2026). Node attributes include gate family or type oi​6, arity oi​7, qubit set oi​8, role or port map oi​9, topological layer index S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​00, unitary fingerprint S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​01, and measurement/reset flags S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​02, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​03.
Edges are built with a linear-time shared-qubit strategy. For each qubit S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​04, one defines the ordered list
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​05
of nodes acting on S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​06 in textual or compiled order, and adds edges S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​07 for S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​08. The union of these per-qubit chains yields S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​09 and guarantees acyclicity. The paper also makes explicit the matrices S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​10 for adjacency, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​11 for node-qubit incidence, undirected two-qubit interaction counts S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​12, directed control-target interaction counts S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​13, per-qubit usage vector S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​14, and the ordering bigram multiset S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​15 formed from adjacent gate-family pairs along each S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​16. The stated semantic-logical content includes gate semantics via S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​17, arity, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​18, and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​19; logical dependencies via S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​20, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​21, and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​22; entanglement and interaction structure via S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​23 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​24; and classical effects via the measurement and reset flags (Ahmed et al., 29 Apr 2026).
The quantum-circuit IGS is defined as
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​25
with
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​26
subject to
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​27
The work initializes the weights as
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​28
thereby emphasizing node semantics.
The five discrepancy terms are normalized to S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​29. The topology discrepancy is a Jaccard distance on edge sets,
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​30
with S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​31 when both sets are empty. The node semantic discrepancy is a cosine distance between family-aggregated fingerprint vectors. For each S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​32, with S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​33,
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​34
and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​35 is formed by concatenating these family means. Then
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​36
with S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​37 if both vectors are zero.
The order discrepancy compares local gate-order patterns through multiset Jaccard distance on bigrams,
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​38
The interaction discrepancy combines undirected and directed two-qubit interaction differences: S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​39
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​40
with zero if both norms are zero, and
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​41
Finally, with normalized usage distributions S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​42 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​43,
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​44
By construction, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​45, hence S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​46 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​47. The paper states that S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​48 indicates exact agreement in all five components (Ahmed et al., 29 Apr 2026).
5. Role in circuit integrity evaluation and representative behaviors
The quantum-circuit framework places IGS between SIS and OIS. SIS is defined from normalized relative deviations of gate count, depth, two-qubit gate count, and DAG topology: S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​49
OIS is defined from the Jensen–Shannon distance between output distributions: S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​50
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​51
S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​52
Within this three-metric framework, SIS is described as fast and coarse, OIS as behaviorally definitive but execution-dependent, and IGS as the pre-execution metric intended to detect interaction-level anomalies that are invisible to global structure but often predictive of behavioral issues (Ahmed et al., 29 Apr 2026).
The paper gives several concrete case analyses. In a Bell-state preparation circuit with a control-target flip, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​53 versus S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​54, the per-qubit adjacency and ordering remain unchanged, so S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​55 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​56, and the undirected interaction matrix S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​57 is identical; however the directed interaction matrix S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​58 changes, so S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​59 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​60. With illustrative S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​61 and the default weights, the paper computes S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​62, while noting that SIS could be approximately S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​63. In a commutation-preserving reorder across disjoint qubits, such as S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​64 versus S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​65, the paper reports S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​66, hence S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​67. In an early measurement insertion example, moving S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​68 ahead of S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​69 changes S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​70 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​71, may change S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​72 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​73, and can alter S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​74, so the net effect is a substantial IGS drop. A qubit-permutation case is described as dependent on whether strict label matching or permutation-aware matching is used; the reported experiments use strict index matching (Ahmed et al., 29 Apr 2026).
The empirical role of IGS is clearest in structural blind-spots, defined as cases with S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​75. On a QASMBench-derived dataset with 133 circuits, eight anomaly types, and three severities S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​76, OIS detects anomalies in S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​77 of blind-spot instances, while IGS detects S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​78 over 569 cases. The detection rate of IGS increases with severity, from S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​79 to S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​80 to S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​81. The paper presents these figures as evidence that high structural similarity does not ensure behavioral equivalence and that IGS provides additional pre-execution sensitivity (Ahmed et al., 29 Apr 2026).
6. Assumptions, calibration, and limitations
The two formulations attach different operational assumptions to IGS. In GraphIC, performance depends on the quality of the FRR, on the graph parser, and on the rank-1 Bayesian Network parameterization. The paper states that the rank-1 constraint S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​82 may underfit more intricate patterns, and identifies higher-rank S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​83 or learned similarity functions as natural extensions. It also identifies FRR quality as a bottleneck: mis-parses or missing steps degrade graph fidelity, and improvements in FRR prompting, parsers, or light validation can mitigate the problem. For very large candidate pools, the paper recommends multi-stage retrieval with a cheap prefilter followed by IGS re-ranking (Fu et al., 2024).
In the quantum-circuit setting, IGS is explicitly pre-execution: semantics are derived statically from known gate unitaries, parameters, qubit usage, and order, without sampling quantum states or output distributions. The paper states that IGS is robust to backend differences so long as gate-family encodings and role semantics are preserved, but that aggressive re-synthesis, routing with SWAP insertion, and basis changes will shift S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​84, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​85, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​86, and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​87, thereby reducing IGS even when behavior is preserved. This is described as a deliberate design choice for interaction-level anomaly detection before execution. The paper also notes the converse limitation that subtle semantic errors not reflected in the aggregated fingerprints may escape detection (Ahmed et al., 29 Apr 2026).
Calibration is correspondingly task-specific. In the quantum-circuit study, anomaly detection in structural blind-spots uses a fixed threshold of S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​88, with scores below S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​89 counted as detections. The practical guidance keeps S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​90 relatively large, uses S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​91, S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​92–S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​93, and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​94, and suggests tightening thresholds for high-assurance settings or relaxing them for broader triage. In GraphIC, the recommended starting point is S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​95 and S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​96, with larger S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​97 favoring revisits to early premises and smaller S(Gq​,Gc​)=αc⊤​Xq⊤​Zq​βc​98 emphasizing local forward flow (Ahmed et al., 29 Apr 2026, Fu et al., 2024).
Taken together, the two reported uses of IGS show that the name denotes a family of graph-centered scoring ideas rather than a single canonical formula. In GraphIC, IGS is an asymmetric structure-first retrieval score for selecting in-context examples whose thought patterns explain a query’s multi-step trajectory. In quantum-circuit validation, IGS is a normalized interaction-level integrity score that complements structural and behavioral metrics by detecting ordering, role, and interaction anomalies before execution.
“Emergent Mind helps me see which AI papers have caught fire online.”
Philip
Creator, AI Explained on YouTube
Sign up for free to explore the frontiers of research
Discover trending papers, chat with arXiv, and track the latest research shaping the future of science and technology.Discover trending papers, chat with arXiv, and more.