Skip to content

COGANT Literature Review

This file is an annotated bibliography for COGANT (Codebase-to-GNN Translation Engine). It documents key papers across fourteen research areas that inform COGANT's design, its theoretical foundations, and its relationship to adjacent lines of work. Sections 1–10 cover the core areas identified during scoping; sections 11–14 were added in an extended search pass focused on the round-trip guarantee and its categorical semantics, and use a distinct format that records the original search terms alongside the references.

Entries in sections 1–10 follow a [SHORT_KEY] Author (Year) — "Title" header with three labelled fields (Relevance, Key contribution, Connection). Entries in sections 11–14 use a bold-author block with an indented citation-and-annotation bullet list. Both formats are preserved verbatim.

Entries marked with "(details need verification)" have authors and approximate years that are reliable, but specific venues, page numbers, or DOIs should be checked before formal citation.


1. Program Graph Extraction and Static Analysis

Scope: How source code is turned into typed, structured graph representations suitable for downstream analysis. This is the foundation of COGANT's cogant.static and cogant.graph modules.

[allamanis2018learning] Allamanis, Brockschmidt, Khademi et al. (2018) — "Learning to Represent Programs with Graphs"

Relevance: The canonical reference for treating source code as a typed graph with syntactic (AST), data-flow, and control-flow edges. COGANT's 14 node kinds and 11 edge kinds are in the same tradition, although COGANT uses the graph for symbolic translation rather than as input to a learned model. Key contribution: Demonstrates that multi-edge program graphs — AST child edges, next-token edges, last-lexical-use edges, computed-from edges, guarded-by edges — dramatically improve code understanding performance over pure AST or token baselines. Connection: COGANT adopts the "typed program graph" abstraction wholesale but replaces the GNN-as-neural-network downstream with a fixpoint rule engine. The node and edge kinds in cogant/schemas/graph.py are a superset of the Allamanis et al. taxonomy, extended with ActInf-specific roles (STATE, OBSERVATION, ACTION).

[cummins2021programl] Cummins, Fisches, Ben-Nun, Hoefler, O'Boyle, Leather (2021) — "ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler Optimizations"

Relevance: ProGraML is an LLVM-IR level program graph that unifies AST, data-flow, and control-flow into a single representation. It is the closest published analogue to what COGANT produces at the normalize+graph stage. Key contribution: A concrete graph schema (node types, edge types, position encodings) for representing whole programs at IR granularity, plus a demonstration that GNNs over ProGraML match or beat classical compiler heuristics on reachability, dominance, and data-flow tasks. Connection: COGANT works at the source level (Python AST) rather than IR level, and emits a symbolic GNN specification rather than ingesting one into a neural GNN. ProGraML is cited in specs/schema.md as the design reference for COGANT's unified edge labeling.

[yamaguchi2014modeling] Yamaguchi, Golde, Arp, Rieck (2014) — "Modeling and Discovering Vulnerabilities with Code Property Graphs"

Relevance: Introduces the Code Property Graph (CPG), a merged representation that overlays AST, CFG, and PDG edges on a shared node set. Joern, the widely used static analysis tool, implements this representation. Key contribution: A graph-database-backed schema in which vulnerability patterns can be expressed as graph traversals, demonstrating that a single typed graph can support diverse static analyses. Connection: COGANT's internal graph is conceptually a CPG restricted to the subset of edge kinds relevant for active-inference state-space extraction. COGANT does not (yet) expose a query language over the graph; adopting a CPG-style traversal DSL is identified as future work in R&D_LOG.md.

[nielson2005principles] Nielson, Nielson, Hankin (2005, 2nd printing) — "Principles of Program Analysis"

Relevance: The standard textbook reference for data-flow analysis, abstract interpretation, and type-and-effect systems. COGANT's translate stage is a worklist fixpoint computation that owes its correctness arguments to the framework laid out in this book. Key contribution: A unified treatment of four main analysis styles (data-flow, control-flow, abstract interpretation, type-and-effect), including the lattice-theoretic framework that guarantees termination and soundness of fixpoint iterations. Connection: The 22-rule fixpoint engine in cogant.translate.engine is a direct instance of the monotone framework; its conflict-resolution ordering and confidence-tier promotion reuse the priority-queue worklist pattern described in Chapter 2.

[BRAVENBOER_2009] Bravenboer, Smaragdakis (2009) — "Strictly Declarative Specification of Sophisticated Points-to Analyses"

Relevance: Introduces the Doop framework, which encodes points-to analysis as Datalog rules over a relational representation of Java bytecode. Demonstrates that even complex interprocedural analyses can be expressed declaratively. Key contribution: A purely declarative Datalog specification of context-sensitive pointer analysis that is both concise and competitive in performance with hand-tuned imperative implementations. Connection: COGANT's fixpoint rule engine is spiritually Datalog-like: each rule fires when its antecedents match graph structure. Doop validates the principle that declarative rule systems can handle sophisticated whole-program analyses at scale.

[HEJDERUP_2018] Hejderup, van Deursen, Gousios (2018) — "Software Ecosystem Call Graph for Dependency Management"

Proceedings of the International Conference on Software Analysis, Evolution and Reengineering (SANER) Relevance: Constructs cross-package call graphs for the npm ecosystem, showing how dependency-level analysis complements intra-project call graphs. Key contribution: A scalable technique for building ecosystem-level call graphs that capture actual usage relationships between packages, enabling downstream analyses like vulnerability propagation and dead-code detection. Connection: COGANT currently operates at the single-repository level. Hejderup et al.'s ecosystem call graph is the natural extension for COGANT's inter-module edge extraction when analyzing codebases with external dependencies.

[NGUYEN_2009] Nguyen, Nguyen, Pham, Al-Kofahi, Nguyen (2009) — "Graph-based Mining of Multiple Object Usage Patterns"

Proceedings of the European Software Engineering Conference / ACM SIGSOFT Symposium on Foundations of Software Engineering (ESEC/FSE) Relevance: Uses graph-based representations to mine object usage patterns from large codebases, identifying recurring interaction idioms between objects. Key contribution: A frequent-subgraph mining approach over object usage graphs that discovers common API usage protocols without requiring formal specifications. Connection: COGANT's role assignment identifies state/observation/action patterns that are effectively "usage roles." Nguyen et al.'s mining approach could provide empirical validation of COGANT's rule-based assignments by comparing against statistically frequent patterns.

[BABII_2021] Babii, Janes, Robbes (2021) — "Modeling Vocabulary for Big Code Machine Learning"

arXiv: 2104.02803 (details need verification) Relevance: Addresses the open-vocabulary problem in code ML: how to tokenize identifiers, keywords, and operators into a vocabulary suitable for neural models. Key contribution: A systematic study of subword tokenization strategies (BPE, SentencePiece) applied to source code, showing that code-specific vocabulary handling significantly affects downstream task performance. Connection: While COGANT operates symbolically rather than via learned embeddings, the vocabulary problem reappears in COGANT's node-label normalization: how to canonicalize identifiers for consistent role assignment across codebases with different naming conventions.

[LATTNER_2004] Lattner, Adve (2004) — "LLVM: A Compilation Framework for Lifelong Program Analysis and Transformation"

Proceedings of the International Symposium on Code Generation and Optimization (CGO) Relevance: Introduces the LLVM compiler infrastructure whose SSA-form intermediate representation has become the standard substrate for program analysis. ProGraML uses LLVM IR as its extraction substrate. Key contribution: A modular compiler framework with a typed, SSA-based IR that supports lifelong analysis and optimization across compile-time, link-time, and run-time boundaries. Connection: COGANT operates on Python AST rather than LLVM IR, but the design principle — a single typed IR as the pivot for all downstream analyses — is the same. LLVM's SSA form is the gold standard for def-use chain extraction, which COGANT approximates at the AST level.

[SHIBOLETH_2022] Shiboleth, Feitelson (2022) — "Unifying Source Code from Multiple Projects" (details need verification)

Relevance: Addresses the challenge of normalizing and unifying code representations across different projects for cross-project analysis. Key contribution: Techniques for syntactic and semantic normalization that make code from different projects comparable, including identifier canonicalization and structural alignment. Connection: Relevant to COGANT's normalization stage (cogant.normalize), which must produce consistent graph representations regardless of project-specific coding conventions. Cross-project consistency is essential for any future multi-repository COGANT deployment.

[BATTAGLIA_2018] Battaglia, Hamrick, Bapst, Sanchez-Gonzalez, et al. (2018) — "Relational Inductive Biases, Deep Learning, and Graph Networks"

arXiv: 1806.01261 Relevance: A position paper introducing the Graph Network (GN) block as a unified framework for graph-to-graph neural computations, subsuming GCNs, attention networks, and message-passing networks as special cases. Key contribution: A single architectural primitive — the GN block with per-node, per-edge, and global update functions — that factors any graph transformation into composable, relational operations. Provides the broadest theoretical umbrella for understanding GNN design choices. Connection: COGANT's fixpoint rule engine is a symbolic instance of a GN block where update functions are deterministic rules rather than learned MLPs. The GN framework's distinction between edge, node, and global attributes maps directly onto COGANT's edge-kind taxonomy, node-kind taxonomy, and GNN-level global assertions respectively. Provides vocabulary for formally characterising COGANT's translate stage.

[KIPF_2017] Kipf, Welling (2017) — "Semi-Supervised Classification with Graph Convolutional Networks"

ICLR 2017. arXiv: 1609.02907 Relevance: Introduces the Graph Convolutional Network (GCN), the simplest and most widely cited instantiation of spectral graph convolutions. Establishes the message-passing paradigm that almost all subsequent program-graph GNN work builds on. Key contribution: A first-order approximation of spectral convolution that reduces to a simple neighbourhood-aggregation rule: each node's new representation is a linear combination of its own features and its neighbours', normalised by degree. Connection: GCN is the implicit baseline for COGANT's graph-based design choices. COGANT processes program graphs symbolically rather than with learned GCN weights, but the neighbourhood-aggregation intuition — "a node's role is informed by its neighbours" — is exactly the principle behind COGANT's context-sensitive fixpoint rules. Understanding GCN limitations (lack of edge-type awareness) motivates COGANT's typed, multi-relational graph schema.

[XU_2019] Xu, Hu, Leskovec, Jegelka (2019) — "How Powerful are Graph Neural Networks?"

ICLR 2019. arXiv: 1810.00826 Relevance: Provides the first rigorous theoretical analysis of the expressive power of GNNs, proving that standard message-passing GNNs are at most as expressive as the Weisfeiler-Lehman (WL) graph isomorphism test, and introducing the Graph Isomorphism Network (GIN) that achieves this bound. Key contribution: A clean theoretical characterisation of when two graph nodes receive identical representations under any sum-aggregation GNN, with a constructive architecture (GIN with sum aggregation and MLP updates) that achieves maximum expressiveness within the WL hierarchy. Connection: COGANT's fixpoint rule engine must distinguish program graph nodes that a WL-bounded GNN would conflate — for example, two variables with identical local neighbourhoods but different data-flow paths. Understanding the WL expressiveness ceiling helps specify exactly which structural features COGANT's rules must exploit to go beyond what learned GNNs can capture, justifying the richer typed-edge representation.


2. Semantic Role Assignment in Static Analysis

Scope: Techniques for inferring the role a program element plays (state variable, observer, action, boundary), as opposed to merely its syntactic type. COGANT's translate rules classify nodes into ActInf roles; this section grounds that move in prior work.

[rabin2020semantic] Rabin, Alipour (approx. 2020) — "Semantic Role Labeling for Source Code" (details need verification)

Relevance: Early work on transferring semantic role labeling (SRL) from NLP to source code, treating function arguments and local variables as "roles" relative to a predicate (the function). Key contribution: Proposes that function parameters and local variables can be assigned thematic roles (agent, patient, instrument) in analogy with Propbank/FrameNet for natural language. Connection: COGANT's role taxonomy is narrower and more formal — it is dictated by the active-inference ontology (state/observation/action) rather than by linguistic frames — but the general move of "predict a role label for each node" is the same. COGANT uses deterministic rules; SRL-for-code uses learned classifiers.

[bielik2016phog] Bielik, Raychev, Vechev (2016) — "PHOG: Probabilistic Model for Code"

Relevance: Uses a probabilistic higher-order grammar to predict the role and identifier of each AST node from its context. Establishes that context-sensitive role prediction over program graphs is tractable at scale. Key contribution: A TCOND (tree-conditional) grammar that conditions each production rule on a learned context function, enabling predictions about variable usage, types, and naming conventions. Connection: COGANT's rule engine is the symbolic analogue of PHOG's learned grammar: each fixpoint rule is a context-sensitive conditional of the form "if a node has graph context C, assign role R with confidence T." The conflict-resolution logic in cogant.translate.engine plays the same role as PHOG's probability ranking.

[raychev2015predicting] Raychev, Vechev, Krause (2015) — "Predicting Program Properties from 'Big Code'"

Relevance: A foundational paper for learned role assignment in JavaScript, inferring types and variable names from a corpus of AST-annotated programs. Key contribution: Demonstrates that a conditional random field over program graphs can accurately predict semantic properties that are not explicit in the source text. Connection: COGANT currently eschews learned approaches in favor of rules for auditability, but the paper's framing of "semantic properties as a graph labeling problem" directly matches the COGANT translate stage, and R&D_LOG.md identifies hybrid rule+learned assignment as a v0.3 research direction.

[PENNINGTON_2014] Pennington, Socher, Manning (2014) — "GloVe: Global Vectors for Word Representation"

Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP) Relevance: Introduces GloVe embeddings, which learn dense vector representations from global word co-occurrence statistics. Widely adopted as pre-trained embeddings for code token representations in downstream code understanding tasks. Key contribution: A log-bilinear regression model that combines the advantages of global matrix factorization (LSA) with local context window methods (word2vec), producing embeddings that capture both syntactic and semantic regularities. Connection: GloVe-style embeddings for code tokens could complement COGANT's symbolic role assignment by providing a continuous similarity space over identifiers. The R&D_LOG.md hybrid approach (rules + learned features) could leverage pre-trained code embeddings as input features to a learned role classifier.

[HELLENDOORN_2019] Hellendoorn, Sutton, Singh, Maniatis, Bieber (2019) — "Global Relational Models of Source Code"

Proceedings of the International Conference on Learning Representations (ICLR) Relevance: Shows that incorporating relational structure (data-flow, type hierarchies) into neural code models improves code completion and bug detection tasks beyond what flat token sequences achieve. Key contribution: A relational graph attention mechanism over program graphs that augments a sequential code model, demonstrating the value of explicit structural edges for code understanding. Connection: Validates COGANT's core premise that graph structure carries essential semantic information beyond what token sequences contain. The relational edges used by Hellendoorn et al. overlap significantly with COGANT's edge taxonomy.

[TAI_2015] Tai, Socher, Manning (2015) — "Improved Semantic Representations from Tree-Structured Long Short-Term Memory Networks"

ACL 2015. arXiv: 1503.00075 Relevance: Introduces Tree-LSTM, an extension of LSTM to tree-structured inputs that can represent hierarchically composed meanings. Directly relevant because Python ASTs are trees, and Tree-LSTM is a natural learned baseline for any symbolic role assignment that operates top-down over an AST. Key contribution: Two variants (Child-Sum and N-ary Tree-LSTM) that process parse trees instead of linear sequences, with gating mechanisms sensitive to the subtree structure below each node. Demonstrates state-of-the-art on sentence similarity and sentiment analysis using syntactic trees. Connection: Tree-LSTM is the learned counterpart of COGANT's rule-based AST traversal: both propagate information bottom-up through the AST to assign a representation (learned embedding vs. symbolic role) to each node. The Tree-LSTM formulation makes explicit the inductive structure — "role of a node depends on roles of children" — that COGANT's downward and upward fixpoint passes implement deterministically.

[VELICKOVIC_2018] Veličković, Cucurull, Casanova, Romero, Liò, Bengio (2018) — "Graph Attention Networks"

ICLR 2018. arXiv: 1710.10903 Relevance: Introduces the Graph Attention Network (GAT), which replaces uniform neighbourhood aggregation with learned attention weights over neighbours. GAT is now the standard learned baseline for any node-classification task over program graphs, including role assignment. Key contribution: A multi-head self-attention mechanism over graph neighbourhoods that enables each node to differentially weight its neighbours during aggregation, achieving state-of-the-art on multiple node-classification benchmarks without requiring costly spectral methods. Connection: COGANT's confidence tier system (HIGH / MEDIUM / LOW) is a coarse, symbolic analogue of GAT's attention weights: both mechanisms express "how much does neighbour v's role influence node u's role assignment." A hybrid system where GAT attention weights guide COGANT's rule-firing priority is a natural direction identified in R&D_LOG.md.

[CHIRKOVA_2021] Chirkova, Troshin (2021) — "Empirical Study of Transformers for Source Code"

ESEC/FSE 2021. arXiv: 2010.07987 Relevance: A systematic empirical investigation of how Transformer models exploit syntactic structure when applied to code tasks (code completion, function naming, bug fixing), including syntax-aware variants that inject tree or graph information. Key contribution: Shows that vanilla Transformers can already capture meaningful syntactic patterns even without explicit AST injection, but that syntax-aware variants (those receiving tree positional encodings or tree-structured attention) consistently outperform purely sequential baselines. Connection: Provides the empirical baseline against which COGANT's symbolic role assignments should be benchmarked on downstream tasks. The paper's finding that syntax matters confirms COGANT's architectural bet; its finding that flat Transformers already capture some structure sets the bar COGANT must exceed to justify the additional symbolic machinery.

[ALON_2019] Alon, Zilberstein, Levy, Yahav (2019) — "code2vec: Learning Distributed Representations of Code"

Proceedings of the ACM on Programming Languages (POPL) Relevance: Learns fixed-length vector representations of code snippets by aggregating over AST paths, enabling semantic similarity computation over program fragments. Key contribution: An attention-based neural network that selects and aggregates path contexts (pairs of AST leaves connected via a root) to produce a distributed representation of a code snippet's meaning. Connection: code2vec's AST path decomposition is complementary to COGANT's whole-graph approach. Where code2vec samples paths for embedding, COGANT retains the full graph for symbolic analysis. A hybrid system could use code2vec embeddings as features for COGANT's role confidence scoring.

[ALLAMANIS_2018_SURVEY] Allamanis, Barr, Devanbu, Sutton (2018) — "A Survey of Machine Learning for Big Code and Naturalness"

ACM Computing Surveys, 51(4) Relevance: A comprehensive survey of ML techniques applied to source code, covering code completion, bug detection, program synthesis, and code summarization. Provides the landscape in which COGANT's symbolic approach must be positioned. Key contribution: Organizes the "Big Code" literature along three axes: the code representation used (tokens, AST, graphs), the ML technique (probabilistic models, neural networks), and the downstream task. Connection: COGANT occupies an unusual position in this landscape: it uses graph representations (like learned approaches) but applies symbolic rules (like traditional static analysis). The survey's taxonomy helps articulate COGANT's novelty as a "graph-based symbolic extractor."


3. Active Inference and the Free Energy Principle

Scope: The theoretical framework whose notation COGANT targets. These references establish what state spaces, observations, actions, Markov blankets, and VFE/EFE mean in the active-inference literature.

[friston2010free] Friston (2010) — "The Free-Energy Principle: A Unified Brain Theory?"

Relevance: The canonical statement of the Free Energy Principle (FEP), which postulates that any self-organizing system minimizes variational free energy as a bound on surprise. This is the theoretical substrate of the GNN notation that COGANT targets. Key contribution: Unifies perception (inference), action (control), and learning (parameter updates) as gradient descent on a single variational free energy functional. Connection: COGANT's claim that "a codebase implicitly defines a generative model" is a software-engineering instance of FEP: the program's control-flow graph plus data-flow constraints specifies a joint distribution over (hidden state, observation, action) trajectories. COGANT does not compute free energy; it only represents the generative model in GNN form.

[parr2022active] Parr, Pezzulo, Friston (2022) — "Active Inference: The Free Energy Principle in Mind, Brain, and Behavior"

Relevance: The current textbook reference for discrete-time active inference. Defines the A (likelihood), B (transitions), C (preferences), D (priors) matrix formalism that COGANT's cogant.statespace and cogant.process modules derive from program graphs. Key contribution: A self-contained presentation of POMDP-style active inference with explicit equations for VFE and EFE in the discrete case, plus worked examples in perception, planning, and decision-making. Connection: COGANT's pipeline stages statespace → process implement the A/B/C/D derivation described in the book's discrete-state chapters. Each derived matrix is a static abstraction of runtime behavior rather than a runtime object; the manuscript methods sections justify this static reading against the textbook's dynamic one.

[friston2006freeEnergy] Friston, Kilner, Harrison (2006) — "A Free Energy Principle for the Brain"

Relevance: The original paper introducing variational free energy as a cost function for Bayesian brain models. Establishes the VFE decomposition into accuracy and complexity terms that COGANT's scoring module mirrors. Key contribution: Derives the variational free energy bound F >= -log p(o) and identifies the complexity term as a KL divergence from prior to posterior. Connection: COGANT's confidence tier is morally an inverse-complexity term: a high-confidence assertion corresponds to a small KL between the extracted posterior (a dogmatic one-hot) and the prior (the default rule output). Making this correspondence formal is an open theoretical task.

[dacosta2020active] Da Costa, Parr, Sajid, Veselic, Neacsu, Friston (2020) — "Active Inference on Discrete State-Spaces: A Synthesis"

Relevance: A contemporary reference for the discrete-time active inference formalism, including explicit algorithms for policy evaluation via Expected Free Energy (EFE). Key contribution: Collects in one place the matrix-form equations and update rules for discrete POMDP active inference, with pseudocode that can be directly implemented. Connection: The EFE computation in cogant.process follows the formulation in this paper. The COGANT implementation is static (it computes the EFE expression symbolically from the extracted A/B/C/D matrices) rather than dynamic (running the agent), which is the novel contribution.

[FRISTON_2017] Friston, Lin, Frith, Pezzulo, Hobson, Ondobaka (2017) — "Active Inference, Curiosity and Insight"

Neural Computation, 29(10) Relevance: Extends active inference to include epistemic actions — actions taken to reduce uncertainty about hidden states rather than to achieve pragmatic goals. Formalizes curiosity as expected information gain within the EFE framework. Key contribution: Decomposes Expected Free Energy into pragmatic (goal-seeking) and epistemic (uncertainty-reducing) components, providing a principled account of exploration vs. exploitation. Connection: COGANT's EFE derivation in cogant.process includes the epistemic term. For codebases with incomplete type information or dynamic dispatch, the epistemic component captures the degree of residual uncertainty in the extracted state space.

[PARR_2019] Parr, Friston (2019) — "Generalised Free Energy and Active Inference"

Biological Cybernetics, 113(5-6) Relevance: Introduces generalised free energy (GFE) as a unification of variational and expected free energy, resolving technical issues with the original EFE formulation. Key contribution: A single objective function that subsumes VFE (for perception) and EFE (for planning) as special cases, with a clear derivation from first principles. Connection: GFE provides the theoretical foundation for a future COGANT extension where the extracted generative model is not only represented in GNN but also evaluated: the GFE score of a codebase's extracted model would quantify how well the code "fits" the active-inference interpretation.

[SAJID_2021] Sajid, Ball, Parr, Friston (2021) — "Active Inference: Demystified and Compared"

Neural Computation, 33(3) Relevance: A pedagogical comparison of active inference with reinforcement learning, optimal control, and Bayesian decision theory. Essential for positioning COGANT's theoretical claims to audiences familiar with RL but not FEP. Key contribution: Side-by-side derivations showing how active inference, KL control, and maximum entropy RL relate to each other, with explicit mappings between their objective functions. Connection: Helps justify COGANT's choice of the active-inference formalism over alternatives: the A/B/C/D matrix representation is more interpretable than a reward function for the purpose of codebase analysis, because each matrix has a direct structural interpretation (likelihood, transition, preference, prior).

[SMITH_2022] Smith, Friston, Whyte (2022) — "A Step-by-Step Tutorial on Active Inference and Its Application to Empirical Data"

Journal of Mathematical Psychology, 107 Relevance: A hands-on tutorial that walks through implementing discrete active inference from scratch, with code examples. The most accessible entry point for practitioners. Key contribution: Complete worked examples with pseudocode for state estimation, policy evaluation, and parameter learning in discrete POMDP active inference. Connection: COGANT's test fixtures for the cogant.process module were originally validated against the tutorial's worked examples. The A/B/C/D matrices in COGANT's test suite correspond to the tutorial's T-maze and epistemic foraging examples.

[KAPLAN_2018] Kaplan, Friston (2018) — "Planning and Navigation as Active Inference"

Biological Cybernetics, 112(4) Relevance: Applies active inference to spatial navigation, demonstrating that planning can be formulated as inference over future trajectories in a generative model with discrete states. Key contribution: A discrete state-space model for grid-world navigation where the agent's beliefs about its trajectory are updated via message passing, and action selection follows from EFE minimization. Connection: The navigation domain provides a clean analogy for COGANT's codebase-as-environment claim: navigating a call graph is structurally similar to navigating a grid, with function calls as "movements" and return values as "observations."

[DACOSTA_2022] Da Costa, Sajid, Bucley, Parr, Friston (2022) — "Active Inference on Discrete State-Spaces: A Synthesis" (2nd edition / extended version)

arXiv: 2001.07203v3 (details need verification) Relevance: An updated and expanded version of the 2020 synthesis paper, incorporating corrections and additional worked examples for the discrete active inference formalism. Key contribution: Refined pseudocode for the full active inference loop (perception, planning, learning) with explicit treatment of policy-dependent state transitions and hierarchical models. Connection: COGANT's cogant.process module tracks updates to this paper. The extended treatment of hierarchical models is relevant to COGANT's multi-granularity extraction (function/class/module levels).

[MILLIDGE_2020] Millidge, Tschantz, Seth, Buckley (2020) — "On the Relationship Between Active Inference and Control as Inference"

arXiv: 2006.12964 Relevance: Provides the most careful formal comparison between Active Inference and Control-as-Inference (a.k.a. KL control), tracing the precise differences to how value/preference enters the generative model. Essential for positioning COGANT against RL-oriented approaches. Key contribution: Demonstrates that the key divergence between the two frameworks is whether the preference distribution is inside the generative model (active inference) or appended as an external reward signal (control as inference), and that this design choice has downstream consequences for exploration behaviour. Connection: COGANT's A/B/C/D extraction treats the C matrix (preference prior) as an explicit, structurally derived component of the generative model, which is the active-inference design choice. This paper validates that choice: if COGANT used an RL framing, the C matrix would be conflated with the reward function, losing the structural interpretation that makes COGANT's extraction useful.

[TSCHANTZ_2020] Tschantz, Millidge, Seth, Buckley (2020) — "Reinforcement Learning through Active Inference"

arXiv: 2002.12636 Relevance: Demonstrates empirically that active inference agents with an explicit C matrix and EFE objective can match or outperform standard RL agents on sparse-reward benchmarks, establishing active inference as a practical decision-making framework rather than just a theoretical one. Key contribution: Introduces the "free energy of the expected future" objective and shows it induces balanced exploration-exploitation without requiring explicit entropy bonuses, because the epistemic term in EFE already rewards uncertainty reduction. Connection: Provides a computational validation for COGANT's claim that extracting a C matrix from code is meaningful: the C matrix is not merely descriptive but would, if used downstream, generate behaviour that the code's control-flow is "trying to" produce. Bridges the gap between COGANT's static extraction and the dynamic agent execution that a downstream pymdp consumer would perform.

[CHAMPION_2022] Champion, Da Costa, Bowman, Grześ (2022) — "Branching Time Active Inference: The Theory and Its Generality"

Neural Networks (accepted 2022). arXiv: 2111.11107 Relevance: Develops a tree-search formulation of active inference where planning is cast as inference over a branching tree of possible futures, unifying forward and backward planning under a single variational objective. Directly relevant to COGANT's v0.2 target of emitting branching-time GNN. Key contribution: Two complementary tree-search algorithms — one propagating EFE forward (optimistic planning) and one backward (pessimistic planning) — both derived from the same variational principle. Establishes connections to sophisticated inference and proves correctness of the branching-time formulation. Connection: This paper is the primary reference for COGANT's planned branching-time extension. The full theory here makes precise what a "branching GNN specification" is: each branch corresponds to a policy-conditioned unrolling of the B matrix, a structure that COGANT's reverse module would have to synthesise back into code.

[FRISTON_2024] Friston, Heins, Verbelen, Da Costa, Salvatori, et al. (2024) — "From Pixels to Planning: Scale-Free Active Inference"

arXiv: 2407.20292 Relevance: Introduces renormalising generative models (RGMs) — a hierarchical discrete active inference framework that uses renormalisation-group ideas to achieve scale invariance across spatial and temporal resolution levels. The most recent large-scale extension of the pymdp-style formalism. Key contribution: A general hierarchical POMDP architecture that applies the same variational update equations at each level of a spatial or temporal hierarchy, enabling single-model solutions to image classification, video generation, music generation, and Atari game play. Connection: Directly relevant to COGANT's multi-granularity (function / class / module) extraction: each granularity level corresponds to a level in an RGM. COGANT currently emits flat GNN; encoding the nesting relationship as an RGM-style hierarchy is the theoretical target for a v0.3 hierarchical extension described in R&D_LOG.md.


4. GNN Tooling and Notation (Generalized Notation Notation)

Scope: The Active Inference Institute's Generalized Notation Notation (GNN) standard, which is the output format of COGANT. GNN here is a human-readable scientific notation, not graph neural networks.

[smekal2023gnn] Smekal, Friedman et al. (2023) — "Generalized Notation Notation: A Text-Based Format for Active Inference Generative Models" (details need verification)

Relevance: The specification lineage for the GNN format. COGANT's optional upstream check uses the generalized-notation-notation reference implementation pinned to its v5.1.0 release (import package gnn); COGANT's own header value GNN v2.0.0 is COGANT's schema identifier, not the upstream release. Every COGANT output is a GNN bundle validated against this required-section surface plus COGANT's own package invariants. Key contribution: A Markdown-structured, section-based syntax for declaring state variables, observations, actions, matrices (A/B/C/D), time horizons, and Markov blankets in a form that is both human-readable and machine-parseable. Connection: COGANT emits GNN bundles whose upstream header is checked against the pinned upstream validator, with COGANT extension sections below it. The GNNValidator in py/cogant/gnn/validator.py checks the upstream section order, the COGANT package sidecars, matrix consistency, and, when explicitly enabled, upstream gnn.validate_gnn_syntax results through the bridge; GNN_VALIDATION_REPORT.md tracks the current compliance boundary.

[activeInferenceInstitute2022gnn] Active Inference Institute (2022–2026) — "Generalized Notation Notation Reference Implementation and Examples"

Relevance: The reference Python implementation and example gallery for GNN, which defines the de-facto conformance tests for any tool claiming to emit GNN. Key contribution: A living library of example GNN specifications (Rabbit-Hunting, Tmaze, Navigation, etc.) and the reference parser/validator, against which COGANT's output is diffed. Connection: COGANT's integration tests include a "reference corpus" of GNN examples that must round-trip through cogant.gnn.parse → cogant.gnn.format unchanged. Deviations from upstream examples are tracked in R&D_LOG.md.

[champion2022branching] Champion, Grzes, Bowman (approx. 2022) — "Branching Time Active Inference" (details need verification)

Relevance: Demonstrates GNN-style specifications for hierarchical, branching-time active inference models, showing that the notation scales to non-trivial agent architectures. Key contribution: Extends GNN with a branching-time semantics where each "branch" corresponds to a policy rollout. Connection: COGANT currently emits flat (non-branching) GNN. Branching-time extraction is identified in the scoping report as a v0.2 feature; this paper is the target formalism.

[FRIEDMAN_2024] Friedman, Smekal et al. (2024) — "Active Inference Institute GNN Ontology and Tooling" (details need verification)

Relevance: Ongoing work at the Active Inference Institute on formalizing the GNN ontology and building tooling for GNN validation, visualization, and interoperability. Key contribution: A structured ontology for GNN elements (state factors, observation modalities, control states) with machine-readable definitions that enable automated validation. Connection: COGANT's GNNValidator aligns with this evolving ontology. As the ontology matures, COGANT's validation rules will be updated to match the canonical definitions.

[CHAMPION_2021] Champion, Bowman, Grzes (2021) — "Realising Active Inference in Variational Message Passing: A Step-by-Step Tutorial" (details need verification)

Relevance: Demonstrates how GNN-specified models can be implemented via variational message passing, providing a concrete execution semantics for the notation COGANT produces. Key contribution: A step-by-step implementation of active inference using message passing on factor graphs, with worked examples that correspond to GNN specifications. Connection: Provides the "downstream consumer" perspective for COGANT outputs: a GNN bundle produced by COGANT can be fed into a message-passing engine following this tutorial's approach.

[HEINS_2022] Heins, Millidge, Da Costa, et al. (2022) — "pymdp: A Python library for active inference in discrete state spaces"

Journal of Open Source Software Relevance: The reference Python implementation for discrete active inference, which consumes models specified in the A/B/C/D matrix format that COGANT's GNN output encodes. Key contribution: A modular Python library implementing perception, planning, and learning for discrete POMDP active inference, with an API organized around the A/B/C/D matrix convention. Connection: pymdp is COGANT's primary downstream consumer: a GNN bundle produced by COGANT can be converted to pymdp's matrix format and executed. Integration tests in COGANT verify that extracted A/B/C/D matrices are valid pymdp inputs.

[FRISTON_2024_ECOSYSTEMS] Friston, Ramstead, Kiefer, Tschantz, Buckley, et al. (2022/2024) — "Designing Ecosystems of Intelligence from First Principles"

Collective Intelligence, 3(1), 2024. arXiv: 2212.01354 Relevance: Proposes a vision for cyber-physical multi-agent ecosystems where each agent carries an active-inference generative model, and agents share beliefs via a common "hyper-spatial modelling language." The paper directly addresses the question of how multiple GNN-specified agents should interoperate. Key contribution: A formal account of how shared generative models can scale from individual agents to collectives, using variational message passing on a distributed factor graph where agents are nodes and shared observations are edges. Connection: COGANT currently extracts a single-agent GNN per repository module. This paper provides the theoretical target for COGANT's multi-module mode: each module emits a GNN bundle that, once linked via shared observation modalities, forms the multi-agent factor graph described here. The "hyper-spatial modelling language" motivation aligns with GNN's role as a portable agent specification format.


5. Formal Models of Software (Type Theory and Program Logic)

Scope: The formal-methods tradition that treats programs as mathematical objects with denotational meaning. COGANT's translation rules need soundness guarantees that ultimately ground out in type theory and Hoare-style reasoning.

[pierce2002types] Pierce (2002) — "Types and Programming Languages"

Relevance: The standard textbook for type systems as static approximations of runtime behavior. COGANT's role assignment is a non-standard type-inference pass whose correctness arguments reuse subject-reduction and progress in modified form. Key contribution: A unified, constructive presentation of simple types, subtyping, polymorphism, dependent types, and subtype checking, with the key soundness theorems proved. Connection: COGANT's 14 node kinds form a simple type system over AST nodes; the translate rules are a bidirectional type-checking pass. The correctness statement COGANT aspires to — "every extracted GNN section is witnessed by a derivation in the rule engine" — is analogous to the subject-reduction theorem.

[hoare1969axiomatic] Hoare (1969) — "An Axiomatic Basis for Computer Programming"

Relevance: The foundational paper for program logic. Hoare triples {P} C {Q} are the prototype for "assertion about program behavior grounded in syntax," which is what COGANT's extracted GNN specifications are. Key contribution: An inference system for proving partial correctness of imperative programs by induction on program structure. Connection: COGANT's translate rules can be read as Hoare-style inference rules whose conclusions are GNN assertions rather than pre/postconditions. Making this reading formal would turn the translate engine into a certified program logic; identified as a long-term research direction.

[cousot1977abstract] Cousot, Cousot (1977) — "Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints"

Relevance: Defines abstract interpretation, the framework in which sound approximations of program semantics are constructed as Galois connections between concrete and abstract domains. COGANT's confidence tiers are an informal instance of this. Key contribution: A complete lattice-theoretic framework for sound static analyses with explicit widening and narrowing operators. Connection: COGANT's confidence tiers (HIGH/MEDIUM/LOW) are an abstraction lattice; promoting an assertion from LOW to MEDIUM via corroborating rules is a widening step. Formalizing the tier promotion as a Galois connection is identified as an open theoretical task in ACTIVE_INFERENCE_MAPPING.md.

[DIJKSTRA_1975] Dijkstra (1975) — "Guarded Commands, Nondeterminacy and Formal Derivation of Programs"

Communications of the ACM, 18(8) Relevance: Introduces weakest precondition semantics and the guarded command language, establishing the discipline of deriving programs from specifications rather than verifying them post-hoc. Key contribution: A calculus of weakest preconditions (wp(S, Q)) that computes, for any statement S and postcondition Q, the weakest precondition under which S is guaranteed to establish Q. Connection: COGANT's reverse module (GNN-to-code synthesis) is conceptually a weakest-precondition computation: given the "postcondition" (a GNN specification), find the weakest program that satisfies it. Dijkstra's framework provides the formal semantics for this reading.

[REYNOLDS_2002] Reynolds (2002) — "Separation Logic: A Logic for Shared Mutable Data Structures"

Proceedings of the Annual IEEE Symposium on Logic in Computer Science (LICS) Relevance: Introduces separation logic, which extends Hoare logic with spatial connectives for reasoning about heap-manipulating programs. Enables modular reasoning about pointer-rich code. Key contribution: The separating conjunction P * Q that asserts two heap regions are disjoint, enabling frame rules for local reasoning about mutation. Connection: COGANT's Markov blanket extraction over program graphs is analogous to separation logic's frame rule: the blanket defines a "frame" that separates internal from external state, enabling modular analysis of program components.

[MILNER_1978] Milner (1978) — "A Theory of Type Polymorphism in Programming"

Journal of Computer and System Sciences, 17(3) Relevance: Introduces the Hindley-Milner type system with Algorithm W for principal type inference. The foundational work on automated type inference that COGANT's role assignment extends to ActInf roles. Key contribution: A decidable type inference algorithm that computes the most general (principal) type for every expression in a polymorphic lambda calculus, without requiring any type annotations. Connection: COGANT's rule engine computes a "principal role assignment" analogous to a principal type: the most general ActInf role consistent with the graph context. The fixpoint computation mirrors Algorithm W's unification-based approach.

[LEROY_2009] Leroy (2009) — "Formal Verification of a Realistic Compiler"

Communications of the ACM, 52(7) Relevance: Describes CompCert, a formally verified optimizing C compiler, demonstrating that end-to-end correctness proofs for program transformations are feasible. Key contribution: A machine-checked proof (in Coq) that every compilation pass preserves program semantics, from C source to PowerPC assembly. Connection: CompCert sets the gold standard for verified program transformation. COGANT's forward+reverse pipeline aspires to similar guarantees: the round-trip property (extract then reverse preserves semantics) is a weaker but analogous correctness statement.


6. LLM + Graph Approaches to Code Understanding

Scope: Recent work combining large language models with graph-structured code representations. COGANT is not an LLM tool, but it lives in the same problem space and must be positioned against learned alternatives.

[guo2021graphcodebert] Guo, Ren, Lu, Feng et al. (2021) — "GraphCodeBERT: Pre-training Code Representations with Data Flow"

Relevance: A transformer model for code that incorporates data-flow edges as auxiliary attention masks. Establishes that graph structure improves learned code representations. Key contribution: Demonstrates that injecting data-flow structure into a BERT-style pretraining objective yields measurable gains on clone detection, code search, and translation tasks. Connection: COGANT's data-flow edge kinds are structurally identical to those used by GraphCodeBERT, but COGANT exposes them symbolically rather than as attention biases. A hybrid system that uses COGANT's graph as structured input to a transformer is sketched in R&D_LOG.md.

[feng2020codebert] Feng, Guo, Tang, Duan et al. (2020) — "CodeBERT: A Pre-Trained Model for Programming and Natural Languages"

Relevance: The first widely used pretrained encoder for source code, providing baseline embeddings against which symbolic extractors can be compared on semantic similarity tasks. Key contribution: A bimodal pretraining setup (code + natural language comments) yielding a single model that handles code search and summarization. Connection: COGANT does not use learned embeddings, but the dataset/ produced by COGANT (graph-structured code with role labels) is intended as training data for models in the CodeBERT/GraphCodeBERT family.

[li2023starcoder] Li, Allal, Zi, Muennighoff et al. (2023) — "StarCoder: May the Source Be With You"

Relevance: A large open-source code LLM whose training data and capabilities define the current state of "LLM for code" against which any symbolic tool must justify its existence. Key contribution: A 15B-parameter code model trained on The Stack (permissively licensed source), with multi-query attention and 8K context, demonstrating that LLMs can generate non-trivial programs from natural-language specs. Connection: COGANT's positioning is explicitly complementary: where LLMs are probabilistic and opaque, COGANT is deterministic and auditable. The manuscript introduction argues that for active-inference research applications, an auditable symbolic extractor is required even if an LLM could generate a similar artifact.

[GUO_2022] Guo, Lu, Duan, Wang, Yin, Ren (2022) — "UniXcoder: Unified Cross-Modal Pre-training for Code Representation"

Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL) Relevance: Unifies code understanding (encoder) and generation (decoder) into a single model via cross-modal pre-training on AST, code, and comments. Key contribution: A prefix-based architecture that handles both understanding and generation tasks, with AST structure incorporated through a flattened tree traversal during pre-training. Connection: UniXcoder's unified encoder-decoder architecture is the learned analogue of COGANT's forward+reverse pipeline. COGANT could serve as a structured pre-training signal for UniXcoder-style models by providing explicit graph annotations.

[WANG_2021] Wang, Shin, Liu, Polozov, Richardson (2021) — "CodeT5: Identifier-Aware Unified Pre-trained Encoder-Decoder Model for Code Understanding and Generation"

Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP) Relevance: A T5-based model specifically designed for code, with identifier-aware pre-training objectives that capture the semantic role of variable names. Key contribution: A "bimodal dual generation" pre-training task and identifier tagging that teaches the model to distinguish between identifiers and keywords, improving performance on code summarization, generation, and translation. Connection: CodeT5's identifier awareness parallels COGANT's node-kind classification. The identifier tags used by CodeT5 (variable, function, class) are a subset of COGANT's 14 node kinds, suggesting that COGANT's richer taxonomy could improve pre-training objectives.

[NIJKAMP_2023] Nijkamp, Pang, Hayashi, Tu, Wang, Zhou, Savarese, Xiong (2023) — "CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis"

Proceedings of the International Conference on Learning Representations (ICLR) Relevance: Demonstrates multi-turn program synthesis where the LLM iteratively refines code based on natural-language feedback, establishing a new paradigm for interactive code generation. Key contribution: A family of autoregressive code models (up to 16B parameters) trained with a multi-turn conversation objective, enabling iterative specification refinement. Connection: COGANT's reverse module could be enhanced with an LLM-based "hole filler" that uses CodeGen-style multi-turn synthesis to complete the sketch holes left by the symbolic reverse pass.

[ROZIERE_2023] Roziere, Gehring, Gloeckle, Sootla, Gat, Tan, Adi, Liu, Remez, Rapin et al. (2023) — "Code Llama: Open Foundation Models for Code"

arXiv: 2308.12950 Relevance: An open-weight code LLM based on Llama 2, with specialized variants for code infilling (completing code with holes) and instruction following. Key contribution: Demonstrates that continued pre-training of a general LLM on code, combined with infilling and long-context fine-tuning, produces a code model competitive with purpose-built alternatives. Connection: Code Llama's infilling capability is directly relevant to COGANT's reverse module: the GNN-to-code sketch could be completed using Code Llama's fill-in-the-middle mode, with COGANT providing the structural constraints that guide the infilling.

[DINELLA_2020] Dinella, Dai, Li, Naik, Song, Wang (2020) — "Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs"

Proceedings of the International Conference on Learning Representations (ICLR) Relevance: Uses graph neural networks to learn bug-fixing transformations directly over program graphs, demonstrating that GNN-based program transformations can be practical. Key contribution: A graph-to-graph transformation model that predicts a sequence of edit operations (insert, delete, replace) to fix bugs in JavaScript programs. Connection: Hoppity's graph transformation approach is structurally similar to COGANT's translate stage: both apply learned/rule-based transformations to a program graph. COGANT's rules are deterministic where Hoppity's are learned, but the graph-transformation formalism is shared.

[GEORGIEV_2022] Georgiev, Brockschmidt, Allamanis (2022) — "HEAT: Hyperedge Attention Networks"

Transactions on Machine Learning Research (TMLR). arXiv: 2201.12113 Relevance: Extends graph attention to hypergraphs where a single hyperedge can relate more than two nodes, demonstrating this on a novel program representation where control-flow, data-flow, and type-constraint edges are unified into a single typed hypergraph. The paper achieves state-of-the-art on bug detection and repair tasks. Key contribution: A typed hyperedge representation for programs where each hyperedge specifies "how participating nodes contribute" via explicit positional roles, combined with multi-head attention over hyperedge neighbourhoods. Subsumes standard GCN and Transformer architectures as special cases. Connection: HEAT's typed hyperedge representation is a strict generalization of COGANT's typed edge schema: some of COGANT's 11 edge kinds (e.g., computed-from edges relating multiple data sources to one target) are naturally hyperedges. HEAT suggests that future COGANT versions could emit a hypergraph GNN specification rather than a binary-edge one, with richer downstream modelling capability.

[WANG_2020_FA_AST] Wang, Li, Ma, Xia, Jin (2020) — "Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree"

SANER 2020. arXiv: 2002.08653 Relevance: Proposes the Flow-Augmented AST (FA-AST), which enriches a standard Python/Java AST with explicit control-flow and data-flow edges, then applies GNNs for code clone detection. Reported as the first GNN-based approach to code clone detection. Key contribution: A concrete augmentation recipe — "add CFG back-edges and PDG def-use edges to the raw AST" — plus an empirical demonstration that this augmentation substantially improves clone detection F1 on BigCloneBench and Google Code Jam. Connection: The FA-AST augmentation recipe is almost identical to what COGANT's cogant.static module produces during the graph construction phase. The paper validates COGANT's edge selection empirically: the same CFG and PDG edges that improve clone detection also provide the structural signal COGANT's rules need to distinguish state from observation nodes.

[SCHLICHTKRULL_2018] Schlichtkrull, Kipf, Bloem, van den Berg, Titov, Welling (2018) — "Modeling Relational Data with Graph Convolutional Networks"

ESWC 2018. arXiv: 1703.06103 Relevance: Introduces Relational Graph Convolutional Networks (R-GCN), which handle multi-relational graphs by maintaining separate weight matrices per relation type. Solves the "all edges look the same" limitation of basic GCN for knowledge graph completion and entity classification. Key contribution: Basis decomposition and block-diagonal decomposition strategies that keep parameter count tractable as the number of relation types grows, demonstrated on Freebase entity classification and link prediction. Connection: COGANT's program graphs are multi-relational by design (11 distinct edge kinds), so any GNN trained on COGANT outputs must handle multiple relation types. R-GCN is the foundational reference for this setting. The basis-decomposition strategy is particularly relevant because COGANT's edge kinds are not independent — they share substructure (e.g., both data-flow and computed-from edges represent value dependency) — making a shared basis appropriate.


7. Program Synthesis and Reverse Engineering

Scope: Techniques for constructing programs that satisfy a formal specification. COGANT's cogant.reverse module is a program synthesizer whose specification is a GNN bundle.

[alur2013sygus] Alur, Bodik, Juniwal, Martin, Raghothaman, Seshia, Singh, Solar-Lezama, Torlak, Udupa (2013) — "Syntax-Guided Synthesis"

Relevance: Defines the SyGuS framework: synthesis from a formal specification and a grammar that constrains the output. COGANT's reverse step is a specialization with Python's AST as the grammar and the GNN bundle as the spec. Key contribution: A uniform problem format and benchmark suite for program synthesis problems, enabling comparison across enumerative, constraint-based, and learning-based synthesizers. Connection: The reverse synthesizer in py/cogant/reverse/synthesizer.py is not a general SyGuS solver — it exploits the fact that the "grammar" (Python AST) and the "spec" (GNN) have a known deterministic forward map — but the correctness criterion is the SyGuS correctness criterion specialized to that setting.

[solarLezama2008sketching] Solar-Lezama (2008) — "Program Synthesis by Sketching"

Relevance: The "sketching" paradigm: a partial program with holes is completed by a solver that finds hole values satisfying a spec. COGANT's reverse output is a sketch whose holes correspond to behaviors the GNN specification leaves underspecified. Key contribution: Introduces bounded model checking as a back-end for sketch completion and demonstrates it on non-trivial bit-manipulation benchmarks. Connection: COGANT reverse emits a code skeleton, not a fully executable program; the unfilled portions are "sketch holes." COGANT does not currently fill these holes via SMT, but the architecture leaves room for a sketch-completion back-end.

[gulwani2011flashfill] Gulwani (2011) — "Automating String Processing in Spreadsheets Using Input-Output Examples"

Relevance: The FlashFill system, which popularized program synthesis from input-output examples. Demonstrates that tight specifications (many examples) enable tractable inductive synthesis. Key contribution: A version-space algebra over a restricted DSL, enabling efficient enumeration of programs consistent with examples. Connection: COGANT's forward extraction provides a natural source of (input, output) pairs — (code fragment, GNN section) — that could drive an inductive synthesis back-end. This is identified as future work in R&D_LOG.md.

[seshia2015combining] Seshia (2015) — "Combining Induction, Deduction, and Structure for Verification and Synthesis"

Relevance: Positions modern program synthesis at the intersection of inductive (example-driven) and deductive (proof-driven) techniques, arguing that structural priors (grammars) are essential for tractability. Key contribution: A conceptual framework (CEGIS, sketch, oracle-guided synthesis) that unifies the major synthesis paradigms. Connection: COGANT's reverse is best described in Seshia's terms as "structure-guided deductive synthesis": the structure is the GNN spec, the deduction is the inversion of the extract rules, and no induction from examples is (yet) involved.

[POLOZOV_2015] Polozov, Gulwani (2015) — "FlashMeta: A Framework for Inductive Program Synthesis"

Proceedings of the ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) Relevance: Generalizes FlashFill into a framework for building domain-specific program synthesizers from declarative specifications of the target DSL. Key contribution: A generic synthesis algorithm based on witness functions that decompose the synthesis problem along the DSL's grammar, enabling modular and reusable synthesizer components. Connection: COGANT's reverse module could be refactored using FlashMeta's witness-function approach: each GNN section type would define a witness function that constrains the corresponding Python AST fragment.

[CHEN_2021] Chen, Tworek, Jun, Yuan, Pinto de Oliveira, Kaplan et al. (2021) — "Evaluating Large Language Models Trained on Code"

arXiv: 2107.03374 Relevance: Introduces Codex and the HumanEval benchmark for evaluating code generation from docstrings. Establishes the standard evaluation methodology for program synthesis from natural-language specifications. Key contribution: Demonstrates that scaling language models on code produces emergent program synthesis capability, with pass@k metrics becoming the standard evaluation measure. Connection: COGANT's reverse module targets a more constrained synthesis problem (GNN spec to code, not natural language to code), but the evaluation methodology (functional correctness via test execution) applies directly. COGANT's round-trip tests are analogous to HumanEval's functional correctness checks.

[JHA_2010] Jha, Gulwani, Seshia, Tiwari (2010) — "Oracle-Guided Component-Based Program Synthesis"

Proceedings of the International Conference on Software Engineering (ICSE) Relevance: Introduces oracle-guided synthesis where a correctness oracle (test suite, formal verifier) guides the search through the space of component compositions. Key contribution: A CEGIS (counterexample-guided inductive synthesis) loop where the oracle provides counterexamples that prune the search space. Connection: COGANT's forward extraction serves as a natural oracle for the reverse synthesis: a candidate program is correct if and only if extract(candidate) matches the target GNN specification. This oracle-guided formulation is identified in R&D_LOG.md as the path to a verified reverse module.

[GULWANI_2017] Gulwani, Polozov, Singh (2017) — "Program Synthesis"

Foundations and Trends in Programming Languages, 4(1-2) Relevance: A comprehensive survey of program synthesis covering enumerative, constraint-based, and learning-based approaches. The definitive reference for positioning any synthesis system. Key contribution: A unified taxonomy of synthesis techniques organized by the form of specification (examples, natural language, formal spec) and the search strategy (enumeration, deduction, statistical). Connection: Locates COGANT's reverse module in the synthesis landscape: it is a deductive synthesizer from a formal specification (GNN), using the forward extraction as a correctness oracle. The survey's taxonomy helps articulate what makes COGANT's synthesis problem tractable (the spec has a known forward semantics).


8. Markov Blankets in Biological and Computational Systems

Scope: The concept of a Markov blanket — a set of variables that statistically insulates "internal" from "external" — and its generalizations beyond Bayesian networks to biological, cognitive, and computational systems.

[pearl1988probabilistic] Pearl (1988) — "Probabilistic Reasoning in Intelligent Systems"

Relevance: The book that introduced Markov blankets for Bayesian networks: the minimal set of nodes that d-separates a target node from the rest of the graph. Key contribution: Defines the Markov blanket as parents + children + co-parents in a directed graphical model, and proves the conditional-independence property that makes it the natural "boundary." Connection: COGANT's Markov blanket extraction (cogant.markov) computes a blanket in exactly Pearl's sense over the extracted program graph treated as a DAG of state/observation nodes. The five seed strategies documented in the scoping report correspond to five different choices of "internal set" for which a blanket is then derived.

[kirchhoff2018markov] Kirchhoff, Parr, Palacios, Friston, Kiverstein (2018) — "The Markov Blankets of Life: Autonomy, Active Inference and the Free Energy Principle"

Relevance: Argues that Markov blankets are the formal signature of biological autonomy and hence the natural boundary between an active-inference agent and its environment. Key contribution: Lifts Markov blankets from graphical models to dynamical systems, defining them in terms of conditional independence between the time courses of internal and external variables. Connection: COGANT's "software Markov blanket" claim — that a codebase's module boundary behaves as an agent boundary — is the software analogue of Kirchhoff et al.'s biological claim. The manuscript formal-foundations discussion cites this paper as the definitional reference.

[bruineberg2022emperor] Bruineberg, Dolega, Dewhurst, Baltieri (2022) — "The Emperor's New Markov Blankets"

Relevance: A critical examination of how Markov blankets are used (and misused) in the FEP literature. Required reading for any work claiming to extract blankets from a new substrate (software). Key contribution: Distinguishes "Pearl blankets" (purely statistical, defined relative to a joint distribution) from "Friston blankets" (dynamical, defined relative to a system's sparse coupling structure), and argues that conflating them has led to overstated claims. Connection: COGANT's extracted blankets are Pearl blankets over the program graph. The manuscript formal-foundations discussion explicitly adopts the Pearl reading to avoid the over-claiming critique made in this paper; the scoping report also flags this distinction as a review-risk to address.

[palacios2020emergence] Palacios, Razi, Parr, Kirchhoff, Friston (2020) — "On Markov Blankets and Hierarchical Self-Organisation"

Relevance: Demonstrates that Markov blankets can be nested, giving rise to hierarchical self-organizing systems. Relevant to COGANT's multi-scale extraction of blankets at the function, class, and module levels. Key contribution: Shows analytically that nested Markov blankets in a sparsely coupled linear system emerge from the system's Jacobian structure. Connection: COGANT emits blankets at three granularities (function, class, module) but does not currently enforce a nesting relation between them. Palacios et al.'s analytical criterion is a target for a future cogant.markov upgrade.

[FRISTON_2013] Friston (2013) — "Life as We Know It"

Journal of the Royal Society Interface, 10(86) Relevance: Applies the Markov blanket formalism to define "life" as any system that maintains a Markov blanket separating its internal states from the environment. A key paper for the philosophical extension of blankets beyond statistics. Key contribution: Shows that a system with a Markov blanket necessarily appears to minimize free energy, providing a formal criterion for distinguishing self-organizing systems from their environment. Connection: COGANT's extraction of software Markov blankets can be read through this lens: a software module that maintains a stable API boundary "appears to" minimize surprise about its internal state. The manuscript keeps this as an instrumental reading rather than an ontological claim about programs.

[CLARK_2020] Clark, Friston (2020) — "What Is the Free-Energy Principle? A Precis" (details need verification)

Relevance: A philosophical precis of the FEP that clarifies the role of Markov blankets in the principle's formulation, distinguishing instrumental from ontological readings. Key contribution: Articulates the "Markov blanket trick": how identifying a blanket in a system's dynamics licenses an interpretation of the system as performing inference. Connection: Provides philosophical grounding for COGANT's central interpretive move: identifying a Markov blanket in a program graph and interpreting the bounded subsystem as an active inference agent. Clark's careful distinction between instrumental and ontological readings informs COGANT's epistemically cautious framing.

[RAMSTEAD_2018] Ramstead, Badcock, Friston (2018) — "Answering Schrodinger's Question: A Free-Energy Formulation"

Physics of Life Reviews, 24 Relevance: Extends the Markov blanket framework to multi-scale biological systems, arguing that nested blankets at different spatial and temporal scales give rise to hierarchical self-organization. Key contribution: A multi-scale free-energy formulation where each level of organization (cell, organ, organism) has its own Markov blanket and performs inference at its own scale. Connection: Directly relevant to COGANT's hierarchical blanket extraction: function-level blankets nest within class-level blankets, which nest within module-level blankets, mirroring Ramstead et al.'s multi-scale biological hierarchy.

[BIEHL_2021] Biehl, Pollock, Kanai (2021) — "A Technical Critique of Some Parts of the Free Energy Principle"

Entropy, 23(3) (details need verification) Relevance: A rigorous technical critique of the mathematical claims underlying the FEP, particularly around the existence and uniqueness of Markov blankets in continuous-time systems. Key contribution: Identifies conditions under which the FEP's claims about Markov blankets hold rigorously and conditions under which they break down, providing important caveats for any application of the formalism. Connection: COGANT operates over discrete program graphs where Pearl blankets are well-defined, sidestepping many of Biehl et al.'s concerns about continuous dynamics. However, the critique informs COGANT's cautious framing: the manuscript avoids claiming that programs "are" active inference agents and instead claims only that programs "can be represented as" generative models.


9. Category Theory for Software (Functors, Adjunctions, Galois Connections)

Scope: Categorical frameworks that formalize structure-preserving translations between software artifacts. COGANT's extract and reverse form a functor pair; this section locates that pair in the relevant categorical literature.

[awodey2010category] Awodey (2010) — "Category Theory"

Relevance: The standard graduate textbook for category theory, providing definitions of functor, natural transformation, adjunction, and limit that any categorical account of COGANT must reference. Key contribution: A careful, example-driven presentation of category theory with a balance between concrete examples (Set, Top, Grp) and abstract machinery. Connection: COGANT's informal claim that extract left-adjoint reverse (extract is left adjoint to reverse) would require formal definitions from this textbook — specifically, the unit and counit of the adjunction and the triangle identities.

[fong2019seven] Fong, Spivak (2019) — "Seven Sketches in Compositionality: An Invitation to Applied Category Theory"

Relevance: The most accessible reference for applied category theory, covering Galois connections, databases as functors, and operads for compositional systems — all directly relevant to COGANT's categorical semantics. Key contribution: Seven self-contained chapters introducing poset adjunctions, databases-as-functors, profunctors, operads, topoi, and signal-flow graphs in a way accessible to non-specialists. Connection: Chapter 1 on Galois connections is the immediate mathematical home for COGANT's confidence tiers: the tier lattice and the rule-promotion order form a Galois connection with the set of extracted assertions. Chapter 3 on databases-as-functors is the template for reading COGANT's graph schema as a category.

Note: Spivak's Poly framework (Spivak 2020, 2022; Niu & Spivak 2023) is the deepest categorical setting for COGANT's functor pair and is catalogued later in this bibliography; it is not duplicated here.

Relevance: Connects the lens framework of Foster et al. to the categorical machinery of optics, showing that lenses are morphisms in a particular cofree-comonoid category. Key contribution: Places lenses inside the broader optics hierarchy, clarifying which categorical structures (comonoids, dialgebras) are needed for which lens variant. Connection: COGANT's lens reading inherits from this line of work. Making the extract/reverse pair a formal optic rather than an ad-hoc functor pair is a direction scoped for "COGANT-Theory" in R&D_LOG.md.

[BAEZ_2010] Baez, Stay (2010) — "Physics, Topology, Logic and Computation: A Rosetta Stone"

New Structures for Physics, Lecture Notes in Physics, vol 813, Springer Relevance: Maps correspondences between physics, topology, logic, and computation through the unifying language of symmetric monoidal categories. Demonstrates that categorical structures recur across domains. Key contribution: A systematic dictionary showing how types correspond to propositions, programs to proofs, categories to physical systems, and how these correspondences compose via monoidal structure. Connection: Provides the broadest framing for COGANT's categorical claims: the translation from code (computation) to GNN (a formal model that could be given physical interpretation) is an instance of the Rosetta Stone correspondences. The monoidal structure of program composition maps to the monoidal structure of state-space composition.

[GIBBONS_2018] Gibbons (2018) — "Coding with Asymmetric Numeral Systems"

Mathematics of Program Construction (MPC) (details need verification) Relevance: While primarily about coding theory, this paper exemplifies the "algebra of programming" tradition that uses category-theoretic reasoning (folds, unfolds, hylomorphisms) to derive correct-by-construction programs. Key contribution: Derives an efficient coding algorithm through systematic application of program calculation laws (fold fusion, tupling, deforestation). Connection: The "algebra of programming" methodology is the template for COGANT's aspiration to derive the translate rules by calculation rather than by ad-hoc design. Each translate rule should ideally be derivable as a fold over the program graph, with correctness following from fusion laws.

[MYERS_2024] Myers, Spivak (2024) — "Double Categories for Systems Theory" (details need verification)

arXiv: 2305.08768 Relevance: Uses double categories to model systems with both "static" (structural) and "dynamic" (behavioral) aspects, providing a formal framework for relating a system's architecture to its execution. Key contribution: A double-categorical framework where objects are system interfaces, horizontal morphisms are system architectures, vertical morphisms are behavioral specifications, and 2-cells are implementations. Connection: COGANT's pipeline has exactly this double-categorical structure: the static program graph is a horizontal morphism (architecture), the GNN specification is a vertical morphism (behavioral spec), and the extraction process is a 2-cell witnessing that the architecture implements the specification.


10. Interpretability and Explainability for Code Models

Scope: Techniques for understanding, explaining, and interpreting the decisions of ML models and analysis tools applied to source code. Relevant to COGANT because the translate engine's role assignments must be explainable and auditable.

[RIBEIRO_2016] Ribeiro, Singh, Guestrin (2016) — "Why Should I Trust You? Explaining the Predictions of Any Classifier"

Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD) Relevance: Introduces LIME (Local Interpretable Model-agnostic Explanations), a technique for explaining individual predictions of any black-box classifier by fitting a local interpretable model. Key contribution: A perturbation-based approach that generates explanations by sampling around an instance and fitting a sparse linear model to the black-box predictions in the neighborhood. Connection: Although COGANT's rule engine is already interpretable (each role assignment has a derivation trace), LIME-style explanations could be applied to any future hybrid system that combines COGANT's symbolic rules with learned classifiers. The "local explanation" framing also informs how COGANT presents its derivation traces to users.

[RIBEIRO_2018] Ribeiro, Singh, Guestrin (2018) — "Anchors: High-Precision Model-Agnostic Explanations"

Proceedings of the AAAI Conference on Artificial Intelligence Relevance: Extends LIME with "anchors" — if-then rules that are sufficient conditions for a prediction, providing high-precision explanations that hold across perturbations. Key contribution: An algorithm that discovers minimal sets of features (anchors) such that changing any other feature does not change the prediction, providing a stronger guarantee than LIME's local approximation. Connection: COGANT's translate rules are themselves anchors: each rule specifies a sufficient graph-context condition for a role assignment. Anchors provides the formal framework for verifying that COGANT's rules are indeed sufficient conditions, not merely correlated features.

[GILPIN_2018] Gilpin, Bau, Yuan, Bajwa, Specter, Kagal (2018) — "Explaining Explanations: An Overview of Interpretability of Machine Learning"

Proceedings of the IEEE International Conference on Data Science and Advanced Analytics (DSAA) Relevance: A taxonomy of interpretability methods organized by whether they explain the model (global) or individual predictions (local), and whether they are model-specific or model-agnostic. Key contribution: A structured survey that distinguishes between processing (how the model transforms input), representation (what the model learns internally), and explanation (what is communicated to the user). Connection: COGANT's interpretability story maps onto Gilpin et al.'s taxonomy: the rule engine provides global interpretability (the rules are the model), the derivation trace provides local interpretability (why this specific node got this role), and the GNN output provides the explanation artifact (what is communicated to the researcher).

[DOSHI_VELEZ_2017] Doshi-Velez, Kim (2017) — "Towards a Rigorous Science of Interpretable Machine Learning"

arXiv: 1702.08608 Relevance: Proposes a taxonomy of interpretability evaluation: application-grounded (real users, real tasks), human-grounded (real users, simplified tasks), and functionally-grounded (no humans, proxy metrics). Key contribution: A framework for evaluating interpretability claims that distinguishes between the different levels of rigor possible, from user studies to formal proxy metrics. Connection: COGANT's interpretability claims should be evaluated at the functionally-grounded level (the derivation trace is a formal object) and eventually at the human-grounded level (do researchers find the GNN output useful?). Doshi-Velez and Kim's framework provides the evaluation methodology.

[LIPTON_2018] Lipton (2018) — "The Mythos of Model Interpretability"

Communications of the ACM, 61(10) (originally Queue, 16(3)) Relevance: A critical examination of what "interpretability" means, arguing that the term is used inconsistently and that different desiderata (trust, transferability, informativeness) may conflict. Key contribution: Distinguishes between transparency (understanding the model mechanism) and post-hoc explanations (generating justifications after the fact), arguing that these serve different purposes. Connection: COGANT is transparent by design (the rules are the mechanism), avoiding the post-hoc explanation problem entirely. Lipton's distinction validates COGANT's design choice of deterministic rules over learned classifiers: rule-based systems achieve transparency without needing post-hoc explanation techniques.

[HOHMAN_2018] Hohman, Kahng, Pienta, Chau (2018) — "Visual Analytics in Deep Learning: An Interrogative Survey"

IEEE Transactions on Visualization and Computer Graphics, 26(1) Relevance: Surveys visual analytics tools for understanding deep learning models, organized by what users need to understand (architecture, training, predictions) and how visualizations support this. Key contribution: A design space for deep learning visualization tools organized along four axes: why (motivation), what (target), how (technique), and who (audience). Connection: COGANT's GNN output is itself a visual/structured artifact designed for human consumption. Hohman et al.'s design space informs the design of COGANT's output formatting: the GNN bundle should support the "what" (model structure) and "why" (role assignment rationale) axes identified in the survey.

[BREHMER_2013] Brehmer, Munzner (2013) — "A Multi-Level Typology of Abstract Visualization Tasks"

IEEE Transactions on Visualization and Computer Graphics, 19(12) Relevance: Provides a vocabulary for describing visualization tasks by why the viewer acts, how they act, and what inputs/outputs are involved. Key contribution: Moves beyond chart-type labels to task contracts such as discover, lookup, compare, summarize, encode, select, and derive. Connection: COGANT's dashboard and manuscript figures should be evaluated by task: the program-graph figure supports lookup and comparison of extracted entities; rule traces support explanation and review; batch dashboards support summarize and compare across targets.

[SEDLMAIR_2012] Sedlmair, Meyer, Munzner (2012) — "Design Study Methodology: Reflections from the Trenches and the Stacks"

IEEE Transactions on Visualization and Computer Graphics, 18(12) Relevance: Establishes methodology for visualization systems built with domain collaborators and evaluated through real tasks rather than only rendering quality. Key contribution: Describes design-study phases and pitfalls, including learn, winnow, cast, discover, design, implement, deploy, reflect, and write. Connection: COGANT currently has functionally grounded checks (sidecars, browser QA, manifest completeness). A user study with researchers inspecting generated GNN bundles is the next step if the manuscript claims human interpretability rather than merely auditability.

[STOREY_2005] Storey (2005) — "Theories, Methods and Tools in Program Comprehension: Past, Present and Future"

International Workshop on Program Comprehension Relevance: Reviews program-comprehension theories and tools, connecting source-code views to developer tasks and cognitive support. Key contribution: Frames comprehension tools around navigation, orientation, and task support rather than raw representation fidelity alone. Connection: COGANT's visual workbench is a program-comprehension interface for generated model artifacts: source facts, role evidence, matrices, and roundtrip status must help a reviewer orient and decide what to inspect next.

[SAMEK_2021] Samek, Montavon, Lapuschkin, Anders, Muller (2021) — "Explaining Deep Neural Networks and Beyond: A Review of Methods and Critical Appraisal"

Proceedings of the IEEE, 109(3) Relevance: A comprehensive review of explanation methods (attribution, concept-based, example-based) with critical analysis of their reliability and limitations. Key contribution: Identifies failure modes of popular explanation methods (adversarial fragility, confirmation bias) and proposes axiom-based evaluation criteria (sensitivity, implementation invariance, completeness). Connection: Samek et al.'s axiom-based evaluation criteria apply to COGANT's derivation traces: a good trace should satisfy sensitivity (changing a relevant graph edge changes the trace), implementation invariance (equivalent code produces equivalent traces), and completeness (the trace accounts for all evidence used in the assignment).


11. Bidirectional Transformations and Lenses

Search terms used: "bidirectional transformations lenses Foster 2007 Boomerang", "symmetric lenses category theory bidirectional programming", "bx bidirectional model transformation"

Relevance to COGANT: COGANT's forward+reverse functor pair constitutes a lens in the sense of Foster et al.: the source code is the "concrete" structure, the GNN specification is the "abstract" view, and cogant.extract / cogant.reverse are the get and put functions. Positioning COGANT in this literature grounds the round-trip guarantee in a well-studied algebraic framework.

[foster2007lenses] Foster, Greenwald, Moore, Pierce, Schmitt (2007) — "Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View-Update Problem"

Relevance: The foundational paper defining the lens framework: a lens is a pair of functions get : S → A and put : A → S → S satisfying round-trip laws. The Boomerang language instantiates this for tree-structured data. Key contribution: Combinators for building lenses over trees with compositional round-trip guarantees (PutGet, GetPut, PutPut). Connection: COGANT's functor pair satisfies the same laws with S = source AST graph and A = GNN specification bundle. - Citation: ACM TOPLAS, 29(3), Article 17. DOI: 10.1145/1232420.1232424

[hofmann2011edit] Hofmann, Pierce, Wagner (2011) — "Edit Lenses"

Relevance: Extends the basic lens framework to handle insertions and deletions (edit actions) rather than just value replacement. Key contribution: A compositional algebra of edit operations with forward and backward edit propagation. Connection: Directly relevant to COGANT's incremental update mode, where only changed AST nodes need to propagate through the translation pipeline. - Citation: POPL 2011, pp. 495–508. DOI: 10.1145/1926385.1926392

[diskin2011symmetric] Diskin, Xiong, Czarnecki, Ehrig, Hermann, Orejas (2011) — "From State- to Delta-Based Bidirectional Model Transformations: The Symmetric Case"

Relevance: Generalizes lenses to the symmetric case where both source and target can be modified and changes must be synchronized. Key contribution: Delta-based formulation with explicit synchronization morphisms. Connection: Directly applicable to COGANT scenarios where both code and GNN specification evolve and must be kept consistent. - Citation: ICMT 2011, LNCS 6707, pp. 61–76. DOI: 10.1007/978-3-642-21732-6_5


12. Round-Trip Synthesis / Bidirectional Program Transformation

Search terms used: "round-trip program transformation synthesis", "program synthesis from specifications executable", "bidirectional program transformation verified"

Relevance to COGANT: cogant.reverse is a program synthesizer: given a GNN specification, it must produce a Python skeleton that satisfies it. This places COGANT's reverse module in the program synthesis literature, specifically in the inductive/deductive synthesis tradition where correctness is defined relative to a formal specification.

Primary synthesis references in this bibliography include Alur 2013, Solar-Lezama 2008, Gulwani 2011, and Seshia 2015; they are not duplicated in this roundtrip-specific cluster.


13. World Models from Code / Program Semantics as Generative Models

Search terms used: "world model neural network code program semantics", "program semantics as generative model probability", "operational semantics stochastic"

Relevance to COGANT: The central theoretical claim of COGANT is that source code implicitly defines a generative model of the system's behavior. This section grounds that claim in existing work on probabilistic operational semantics and world models.

[hafner2023dreamerv3] Hafner, Pasukonis, Ba, Lillicrap (2023) — "Mastering Diverse Domains through World Models"

Relevance: DreamerV3: a general RL algorithm that learns a latent world model from observations and uses it to plan. The architecture (encoder -> latent dynamics model -> decoder) is structurally analogous to COGANT's pipeline (AST parser -> program graph IR -> GNN specification). Key contribution: A single hyperparameter set that achieves state-of-the-art on 150+ domains, demonstrating that world-model learning generalizes. Connection: The world model here is learned; in COGANT it is extracted symbolically. The comparison is productive: COGANT produces an explicit, interpretable world model rather than a learned latent one. - arXiv: 2301.04104

[kaddar2023stochastic] Kaddar, Staton (2023) — "Stochastic Memoization in Probabilistic Programming"

Relevance: Develops categorical semantics for probabilistic programs via monads on presheaf categories. Key contribution: A compositional semantics for stochastic memoization operators, ensuring that repeated samples of the same random variable are consistent. Connection: If program execution is modeled as a stochastic process, the semantics of a program is a probability distribution over traces — precisely the kind of generative model that active inference agents consume. - arXiv: 2309.09467

[mak2020densities] Mak, Ong, Paquet, Wagner (2020) — "Densities of Almost-Surely Terminating Probabilistic Programs are Differentiable"

Relevance: Proves that higher-order probabilistic programs with sampling-style operational semantics have almost-everywhere differentiable density functions. Key contribution: A formal guarantee that programs-as-densities admit variational inference without ad-hoc smoothing. Connection: Provides theoretical scaffolding for treating COGANT's extracted state-space as a differentiable generative model amenable to variational inference — a direction identified as future work in COGANT's confidence model. - arXiv: 2004.03924


14. Polynomial Functors and Wiring Diagrams

Search terms used: "polynomial functors Spivak categorical systems theory", "wiring diagrams monoidal categories composition", "David Spivak polynomial dynamics systems"

Relevance to COGANT: Spivak's polynomial functor framework provides the strongest categorical foundation for COGANT's functor pair. A polynomial functor p = Sigma_{i in p(1)} y^{p[i]} captures a system with positions (states) and directions (transitions), and the composition of two polynomial functors corresponds exactly to composing COGANT's extract and reverse functors.

[spivak2020poly] Spivak (2020) — "Poly: An Abundant Categorical Setting for Mode-Dependent Dynamics"

Relevance: Introduces the category Poly of polynomial endofunctors on Set as a natural home for dynamical systems with time-varying inputs. Key contribution: The four interacting monoidal structures on Poly give COGANT's functor pair four distinct compositional interpretations (sequential, parallel, dependent, Cartesian). Coalgebras in Poly are identified with deterministic automata, matching COGANT's finite-state-machine view of program behavior. Connection: COGANT's extract/reverse pair are morphisms in Poly; the round-trip composition is a morphism in the comonoid of Poly. - arXiv: 2005.01894

[niu2023polynomial] Niu, Spivak (2023) — "Polynomial Functors: A Mathematical Theory of Interaction"

Relevance: A 372-page monograph treating polynomial endofunctors on Set as a unified framework for interaction, dynamical systems, and database schemas. Key contribution: Chapter 4 on wiring diagrams directly applies to COGANT: the wiring diagram for cogant.extract compose cogant.reverse is precisely the round-trip composition whose correctness properties mirror the lens laws. Connection: Provides the reference mathematical language for the COGANT-Theory follow-on paper. - arXiv: 2312.00990

[spivak2022reference] Spivak (2022) — "A Reference for Categorical Structures on Poly"

Relevance: A reference compendium of adjunctions, coclosures, and monoidal structures on Poly. Key contribution: Catalogs the closed and monoidal structures on Poly with explicit formulas. Connection: Useful for formally specifying the type of COGANT's functor pair: cogant.extract : Code -> GNN and cogant.reverse : GNN -> Code form a section-retraction pair in a suitable monoidal closed structure on Poly, which is the categorical statement of the round-trip guarantee. - arXiv: 2202.00534


15. Organizational State Spaces and Economic World Models

Search terms used: "economic world model portfolio optimization recursive self improvement", "organization state space model capital allocation", "channel histories economic world model"

Relevance to COGANT: This small cluster records adjacent work for the provisional organization-state-space track. These sources should not be read as validation of COGANT's current code-derived GNN bundles; they are conceptual anchors for future socio-technical surrogate models with explicit evidence histories.

[westenhaver2026recursiveSelfImprovementPortfolio] Westenhaver, Branscomb, Grant (2026) — "Recursive Self-Improvement is a Portfolio Optimization Problem"

Relevance: Industry white paper framing recursive self-improvement as auditable capital allocation over an Economic World Model, channel histories, and a portfolio optimizer. Key contribution: Makes the improvement loop explicitly economic: actions, costs, outcomes, and reinvestment need to be recorded before a controller can compare heterogeneous improvement channels. Connection: Useful for COGANT's future typed-organization work because it names the evidence discipline a socio-technical optimizer would need. It is not peer-reviewed evidence for COGANT, and its t-RSI statistic is not implemented in COGANT. - URL: https://www.alphafund.com/whitepaper - PDF: https://www.alphafund.com/whitepaper/whitepaper.pdf


Summary Statistics

  • Sections: 15 (10 core topic areas + 5 extended-search areas)
  • Entries: 101 (72 core sections 1-10 + 29 extended sections 11-15)
  • New entries added (2026-04-11): 17 — Sections 1 (3), 2 (3), 3 (4), 4 (1), 6 (4)
  • New entries added (2026-06-12): 1 — Section 15 (1)
  • Entries with full DOI/arXiv: 32
  • Entries flagged "details need verification": 9
  • Last updated: 2026-06-12