---
title: History-Conditioned Local Projector
url: https://www.emergentmind.com/topics/history-conditioned-local-projector
type: topic
---

# History-Conditioned Local Projector

A history-conditioned local projector is a data-driven operator on observed discrete-time Markov trajectories, which infers fine-grained transition statistics between observed (coarse-grained) states while accounting for the memory effects induced by hidden or unobservable degrees of freedom. Originally introduced in the context of Markov-state holography, this analysis allows one to empirically assess local deviations from the Markov property, detect evidence of hidden-state topology, and quantify the timescale of memory due to hidden-path decorrelations from projected high-dimensional dynamics [2503.11636].

## 1. Definitions and Notational Framework

Let the full (microscopic) state space be $S_\mathrm{full} = S_\mathrm{obs} \times S_\mathrm{hidden}$, where $S_\mathrm{obs} = \{1,2,\dots,n\}$ is the space of directly observed (“lumped”) states, and $S_\mathrm{hidden}(i)$ denotes the set of microstates projected onto observed state $i$: $S_\mathrm{hidden}(i)=\{\alpha : \pi_\mathrm{obs}(\alpha)=i\}$.

A length-$k$ observation history at time $t$ is $h_k = (s_{t-k+1}, \dots, s_t) \in S_\mathrm{obs}^k$. For each observed transition $j \to i$ at times $t \to t+1$, and immediately preceding history $h_k$, define
- $N_{i\leftarrow j}(h_k)$: number of observed $j\to i$ transitions with history $h_k$,
- $N_j(h_k)=\sum_{i\in S_\mathrm{obs}} N_{i\leftarrow j}(h_k)$,
- Empirical history-conditioned transition probability:
  $$
  P_{i \leftarrow j|h_k} = \frac{N_{i \leftarrow j}(h_k)}{N_j(h_k)}.
  $$
These transition probabilities form the entries of the history-conditioned local projector.

## 2. Mathematical Construction

For each ordered transition $j\to i$ and history $h_k$, the local projector-matrix entry is defined as
$$
\Pi^{(k)}_{i\leftarrow j}(h_k) \equiv P(i|j, h_k) = \frac{\#\{\,(s_{t-k+1},\dots,s_t=j,s_{t+1}=i)\text{ with }h_k\,\}}{\#\{\,(s_{t-k+1},\dots,s_t=j)\text{ with }h_k\,\}}
$$
Alternatively, in model-based terms (where $\alpha_{t+1} \in S_\mathrm{hidden}(j)$ are microstates reached upon entering $j$):
$$
P(i|j,h_k) = \frac{\sum_{\alpha_{t+1}\in S_\mathrm{hidden}(j)} P(\alpha_{t+1}|h_k)\, P(i|\alpha_{t+1})}{\sum_{\alpha_{t+1}\in S_\mathrm{hidden}(j)} P(\alpha_{t+1}|h_k)}.
$$
Here $P(\alpha_{t+1}|h_k)$ is a path-sum over hidden trajectories compatible with $h_k$.

Given the microscopic splitting-probability matrix $\Phi_{\alpha\beta}$ and the sub-block $Q$ (within $j$), the probability for the first exit from $j$ is:
$$
\Omega_{\alpha' \leftarrow \alpha} = P(\alpha'|\alpha,\, \text{exit }j \to \text{next observed state}) = [R(\mathbf{I} - Q)^{-1}]_{\alpha'\alpha}
$$
and the history-projected transition probability becomes:
$$
P(i|j,h_k) = \sum_{\alpha' \in S_\mathrm{hidden}(j)} P(\alpha'|j,h_k) \sum_{\beta \in S_\mathrm{hidden}(i)} \Omega_{\beta \leftarrow \alpha'}.
$$
Fixing $j$, the matrix $\Pi^{(k)}(j)$ with entries $P_{i\leftarrow j|h_k}$ can be analyzed spectrally. The eigenvalues satisfy $1=\lambda_0^{(k)} > |\lambda_1^{(k)}|\ge\dots\ge|\lambda_{m-1}^{(k)}|$, $m=\dim(\Pi)$.

## 3. Data-Driven Estimation and Algorithm

Empirical construction proceeds by traversing a time series $s[1..T] \in S_\mathrm{obs}$:

```pseudo
Input: trajectory s[1..T], max history K_max
Initialize: N[j][h_k][i] = 0 for all j, h_k, i
Loop:
  for t = K_max..T-1:
    for k=0..K_max:
      h_k = (s[t-k+1], ..., s[t])
      j = s[t]
      i = s[t+1]
      N[j][h_k][i] += 1
      N_j[j][h_k] += 1
Compute probabilities:
  for each j, h_k:
    if N_j[j][h_k]>0:
      for each i:
        P_{i←j|h_k} = N[j][h_k][i] / N_j[j][h_k]
```

Normalize each slice so that $\sum_i P_{i\leftarrow j|h_k} = 1$. The maximal $k$ is increased until transition histograms converge, measured by the total-variation distance
$$
\mathrm{TVD}_j(k) = \tfrac{1}{2} \sum_{i\in S_\mathrm{obs}} \sum_{h_k} \lvert P_{i\leftarrow j|h_k}^{(k)} - P_{i\leftarrow j|h_k}^{(k-1)} \rvert,
$$
declaring convergence when $\mathrm{TVD}_j(k) < \epsilon$ (e.g., $\epsilon = 10^{-4}$).

## 4. Memory Quantification and Spectral Analysis

The subleading eigenvalue $\lambda_1^{(k)}$ of $\Pi^{(k)}$ determines the local memory timescale:
$$
\tau^{(k)} = -1/\ln|\lambda_1^{(k)}|.
$$
As $k$ increases, $\lambda_1^{(k)} \to \lambda_1^{(\infty)}$ and $\tau^{(k)} \to \tau^{(\infty)}$, characterizing the number of steps over which hidden-path correlations decay. Large $|\lambda_1^{(k)}|$ (i.e., long $\tau$) indicates slow decay and persistent hidden-path memory, signifying insufficient Markovianity at the observed level.

## 5. Canonical Example: Three-State System with Hidden Path

Consider observed states $A$, $B$, $C$, where $B$ is actually two hidden microstates $B_1,B_2$. The transition scheme is
$A \leftrightarrow B_1$, $A \leftrightarrow B_2$, $B_1 \rightarrow C$, $B_2 \rightarrow C$, $C \rightarrow A$. The microscopic splitting probabilities are $\Phi_{B_1\rightarrow C} = p_1$, $\Phi_{B_2\rightarrow C} = p_2$, $A$ to $B_1,B_2$ each with $1/2$, $C \rightarrow A=1$.

For $k=0$ (no history), $P(C|B) = \frac{1}{2}(p_1 + p_2)$. For $k=1$ (history of one step), there are two histories, $h_1=a$ (from $A$) and $h_1=c$ (from $C$):
$$
P(C|B, h_1=a) = p_a = p_1 w_{1a} + p_2 w_{2a}, \\
P(C|B, h_1=c) = p_c = p_1 w_{1c} + p_2 w_{2c},
$$
where $w_{1a}, w_{2a}, w_{1c}, w_{2c}$ are arrival fractions at $B_1,B_2$ from $A$ or $C$. Thus, $\Pi^{(1)}_{C \leftarrow B}$ is a diagonal matrix with $p_a, p_c$, and eigenvalues $1$, $|p_a-p_c|$. The timescale is then $\tau^{(1)} = -1/\ln|p_a - p_c|$.

As $k\to\infty$, path weights $w_1, w_2$ approach their stationary distribution, $\lambda_1^{(k)} \to |p_1 - p_2|$, and $\tau^{(\infty)} = -1/\ln|p_1 - p_2|$.

## 6. Testing Markov Property and Inferring Hidden Structure

The local history-conditioned projector provides a direct test for hidden memory. If, for state $j$, $\Pi^{(k)}_{\cdot \leftarrow j}$ becomes independent of $k$ for all $k\ge n$, then $j \to \cdot$ is Markov of order $n$ locally; any persistent $k$-dependence reflects hidden-path memory or missing microstates.

If $\Pi^{(0)}_{i \leftarrow j}$ shows multiple bars or more than one significant eigenvalue, one proposes splitting $j$ into $j_1, j_2$, assigning rates so that $(p_1,p_2)$ match these bars. Recomputing $\Pi^{(k)}$ with the relump validates the split if Markovianity improves.

## 7. Practical Considerations and Limitations

Building all histograms up to maximal history $K$ has computational complexity $\mathcal{O}(T K)$ and storage cost $\mathcal{O}(|S_\mathrm{obs}|^K |S_\mathrm{obs}|^2)$ in the worst case. Reliable estimation of $P(i\leftarrow j|h_k)$ generally requires $N_j(h_k)\gtrsim 100$ per history; since history classes grow as $|S_\mathrm{obs}|^k$, $K$ must be kept modest or histories coarsened by binning. Severe undersampling arises exponentially with $k$. Convergence proofs require at least one observable Markov state; application to continuous observables depends on bin width $\delta$ choices.

---

For detailed derivations and further implementation guidance, see [2503.11636].

Source: https://www.emergentmind.com/topics/history-conditioned-local-projector