Research

Semantic Search

Standard retrieval-augmented generation relies on localized spatial proximity in static embedding spaces. True semantic search requires reconstructing dynamic state trajectories across extended contexts—moving past point-wise similarity to capture causal and temporal invariants.

Retrieval-Augmented Generation (RAG) and entity-centric knowledge graphs have become the default architectures for external memory in language models. Yet both rest on a fragile premise: that semantic relevance is an isotropic, localized distance metric in a static vector space.

In practice, embedding similarity operates as an unconstrained bag-of-concepts matcher. It identifies topical resonance while remaining blind to the stateful transformations that govern real-world narratives, legal frameworks, and system histories.

The Structural Failures of Vector Proximity

Cosine similarity over dense embeddings collapses three fundamental dimensions of meaning:

  • Lack of Directionality: As established in our Alignment formalism, a symmetric distance metric (d(u,v)=d(v,u)d(\mathbf{u}, \mathbf{v}) = d(\mathbf{v}, \mathbf{u})) cannot encode asymmetric dependencies. Cause-and-effect, premise-and-conclusion, and state transitions are fundamentally directional operations that spatial proximity alone flattens.
  • Absence of Temporal Cohesion: Vector embeddings embed isolated chunks without an intrinsic time-evolution operator. They cannot track state updates across sequential chapters, commits, or lifecycle events.
  • Locality Blindness (The Horizon Problem): Standard embedding models compress fixed-window passages (kk tokens) in isolation. They fail when the salient semantic payload is non-local—distributed across subtle narrative shifts, discontinuous dialogue, and distant causal anchors.

Ask a standard embedding retriever: “How was the protagonist dressed after Jamie was killed?” The index will eagerly return scenes where Jamie dies and scenes mentioning clothing, but it possesses no causal calculus to isolate the clothing state strictly on the post-event manifold.

Beyond Vectors and Static Graphs: The Dynamic World Model

Standard semantic search fails because it forces unstructured narrative into rigid, lossy representations:

  • Dense Vector Spaces (RAG): Compress text into unconditioned topological points, losing sequence, hierarchy, and state mutations.
  • Static Knowledge Graphs (GraphRAG): Force meaning into discrete, timeless triples, breaking down under temporal qualification, implicit state drift, and probabilistic dependencies.

Instead of indexing static snapshots or timeless nodes, we formulate semantic search as querying a dynamically unrolled world model. Building on the architecture introduced in our Plot Identification research, we replace unstructured vector indices with a Transformer Perception Layer writing to an external Graph State Engine.

Document comprehension is modeled as a dynamic transition system where a neural policy continuously compiles sequential tokens into a differentiable, temporally aware causal graph.

The Three-Tier Search Architecture

  • The Perception Layer & Graph State Engine (πθ\pi_\theta): A state-space encoder that processes the document stream X1:T\mathcal{X}_{1:T} chunk-by-chunk. At each token horizon tt, the transformer emits explicit state-mutation commands to update a structured internal causal graph:
st(e)=πθ(st1(e),xt,ht1)Fθ(e,Xt)\mathbf{s}_{t}(e) = \pi_\theta(\mathbf{s}_{t-1}(e), x_t, \mathbf{h}_{t-1}) \equiv \mathcal{F}_\theta(e, \mathcal{X}_{\le t})

where st={st(e1),st(e2),,st(ek)}\mathbf{s}_t = \{\mathbf{s}_t(e_1), \mathbf{s}_t(e_2), \dots, \mathbf{s}_t(e_k)\} tracks continuous latent configurations across all persistent entities (graph nodes) simultaneously.

  • Causal Horizon Grounder (Hψ\mathcal{H}_\psi): This is a direct search-time application of our salient-structure operator (Π\Pi). Given a relational query QQ, the grounder isolates the temporal anchor condition EE, target entity ee^*, and relational constraint RR. Rather than performing keyword or semantic matches, it directly infers the causal boundary index on the graph:
tE=Hψ(E,X)=argmaxt  P(Est,X)t_E = \mathcal{H}_\psi(E, \mathcal{X}) = \arg\max_t \; P(E \mid \mathbf{s}_t, \mathcal{X})
  • Trajectory Invariant Evaluator (Ψϕ\Psi_\phi): Retrieval is executed as direct state-space decoding on the post-boundary trajectory sub-manifold M>tE\mathcal{M}_{> t_E}. The evaluator parameterizes query projection q=Gϕ(Q)\mathbf{q} = \mathcal{G}_\phi(Q) and evaluates conditional support against the persistent graph state:
y=argmaxst(e),t>tE  Ψϕ(q,st(e)E)=argmaxt>tE  Simcausal(Gϕ(Q),st(e)E)\mathbf{y}^* = \arg\max_{\mathbf{s}_t(e^*), t > t_E} \; \Psi_\phi\big(\mathbf{q}, \mathbf{s}_t(e^*) \mid E\big) = \arg\max_{t > t_E} \; \text{Sim}_{\text{causal}}\big(\mathcal{G}_\phi(Q), \, \mathbf{s}_t(e^*) \mid E\big)

Mathematical Formulation: Causal State Retrieval

Formally, let an extended context be a sequential trajectory X=(x1,x2,,xT)\mathcal{X} = (x_1, x_2, \dots, x_T). We parameterize the unrolled policy πθ\pi_\theta as the state-trajectory operator Fθ\mathcal{F}_\theta, generating the continuous entity trajectory st(e)=Fθ(e,Xt)MstateRd\mathbf{s}_t(e) = \mathcal{F}_\theta(e, \mathcal{X}_{\le t}) \in \mathcal{M}_{\text{state}} \subset \mathbb{R}^d.

1. Event Conditioning & Temporal Boundary Operator

A query targeting a conditional state specifies anchor event EE and temporal direction τ{,}\tau \in \{\prec, \succ\} (e.g., ‘after EE’). The causal boundary index tE=Hψ(E,X)t_E = \mathcal{H}_\psi(E, \mathcal{X}) defines the post-event causal support mask ΩE(t)\Omega_E(t):

ΩE(t)={1if t>tE(τ=)0if ttE\Omega_E(t) = \begin{cases} 1 & \text{if } t > t_E \quad (\tau = \succ) \\ 0 & \text{if } t \le t_E \end{cases}

2. Asymmetric Causal Similarity Metric

State-conditioned retrieval requires an asymmetric projection metric to satisfy the direction-sensitive requirement of our semantic distortion framework. This metric must heavily penalize pre-condition state leakage and directional causal violations.

Let q=Gϕ(Q)\mathbf{q} = \mathcal{G}_\phi(Q) be the query representation projected into Mstate\mathcal{M}_{\text{state}}. We define Simcausal\text{Sim}_{\text{causal}} as:

Simcausal(q,st(e)E)=qst(e)qst(e)ΩE(t)λmaxt0tE(st0(e)st(e)st0(e)st(e))\text{Sim}_{\text{causal}}(\mathbf{q}, \mathbf{s}_t(e) \mid E) = \frac{\mathbf{q}^\top \mathbf{s}_t(e)}{\|\mathbf{q}\| \|\mathbf{s}_t(e)\|} \cdot \Omega_E(t) - \lambda \max_{t_0 \le t_E} \left( \frac{\mathbf{s}_{t_0}(e)^\top \mathbf{s}_t(e)}{\|\mathbf{s}_{t_0}(e)\| \|\mathbf{s}_t(e)\|} \right)

The penalty term forces the retriever to isolate genuine state transitions occurring after the causal boundary in the graph, preventing it from blindly matching static background properties.

3. Contrastive State-Tracking Objective

To train the policy Fθ\mathcal{F}_\theta (via πθ\pi_\theta) and projection Gϕ\mathcal{G}_\phi jointly, we construct a time-aware contrastive objective across positive post-event states st+\mathbf{s}^+_t and hard negative pre-event states st0tE\mathbf{s}^-_{t_0 \le t_E} for the same entity:

Lcausal=ilogexp(Simcausal(qi,st,i+Ei)/τ)exp(Simcausal(qi,st,i+Ei)/τ)+jNpreexp(qisj/τ)+kNdistractorexp(qisk/τ)\mathcal{L}_{\text{causal}} = - \sum_{i} \log \frac{\exp\big(\text{Sim}_{\text{causal}}(\mathbf{q}_i, \mathbf{s}^+_{t, i} \mid E_i) / \tau\big)}{\exp\big(\text{Sim}_{\text{causal}}(\mathbf{q}_i, \mathbf{s}^+_{t, i} \mid E_i) / \tau\big) + \sum_{j \in \mathcal{N}_{\text{pre}}} \exp(\mathbf{q}_i^\top \mathbf{s}^-_j / \tau) + \sum_{k \in \mathcal{N}_{\text{distractor}}} \exp(\mathbf{q}_i^\top \mathbf{s}_k / \tau)}

This objective forces the encoder to orthogonalize representations across critical causal boundaries, preventing the model from confusing past entity attributes with their current, mutated state.

Current Frontiers & Research Reality

We are currently developing custom transformer-based encoders to learn these state-tracking representations directly from long-form sequential text.

The results remain far from solved. Current attention mechanisms still exhibit strong recency and lexical biases, frequently leaking pre-event attribute states into post-event queries or degrading across high-entropy narrative shifts. Transforming transformer representations from associative memory into faithful, queryable state-space decoders is an active, open research front at Robo Data Lab.