Manuscript Offprint
arXiv:2610.36412Persistence, Exposure, and Credit Routing in Linear Temporal Predictive Coding
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Temporal Predictive Coding (tPC) networks offer a layer-local alternative to backpropagation. For linear tPC, we show, by applying tools from cellular sheaf theory, that temporal credit assignment is a tug-of-war between spatial displacement and temporal errors, whose ratios are modulated by persistence and exposure operators P and Q. Spatial inference therefore gives us the effective recurrent transition , whilst future credit is filtered by . This creates a persistence–error tradeoff in spatial modes: under non-amplifying invariant recurrence, modes that preserve influence over long delays simultaneously fail to expose that influence strongly as temporal error. Recurrence can circumvent this via routing between persistent and exposed modes.
Keywords: Predictive Coding, Cellular Sheaves, Temporal Credit Assignment, Recurrent Neural Networks
1. Introduction
Predictive coding networks are a layer-local alternative to backpropagation for training hierarchical neural networks (Rao and Ballard, 1999; Whittington and Bogacz, 2017; Salvatori et al., 2026). In temporal predictive coding, we learn sequential data by adding recurrent connections between corresponding layers (Millidge et al., 2024; Ng-Kee-Kwong et al., 2026). We focus on linear tPC for autoregressive sequence modelling of observations , processed sequentially through time. At time , the current observation is fixed at the bottom layer, , whilst the remaining activities are inferred using both the current observation and temporal predictions from the previously inferred slice; the resulting state is then used to predict time . Formally, we have activities indexed across layers and time . Within each time slice, maps higher-layer activity to a prediction of , whilst across time maps to a prediction of . The maps and are shared across time. These maps define receiver-side spatial and temporal edge discrepancies and .
Training proceeds sequentially through time. At each time , during inference, the weights and the previously inferred state are kept fixed, the current observation is clamped, and only the remaining activities are updated to minimise
© 2026 A. Tanase, J. Gould & J. Seely.
Figure 1: Linear temporal predictive coding architecture. Spatial maps predict down each time slice, whilst temporal maps predict forward across time. At time t, the observation is fixed and inference updates the hidden activities in the shaded slice.
the current slice energy. This energy aggregates within-slice spatial residuals with the incoming temporal residuals from the transition . The resulting inferred state is denoted by and is used to generate temporal predictions for time (Millidge et al., 2024). After the full trajectory has been inferred, during learning, the inferred activities are held fixed and the same shared maps are updated using the residuals and incident activities accumulated across time: each from the spatial residuals in each slice, and each from the temporal residuals on the incoming transitions.
Training is a tug-of-war between spatial and temporal predictions. By constructing a directed network sheaf over the tPC computational graph (Section 2), we realise tPC as directed sheaf diffusion (Section 3). We then show in Section 4 that exact inference finds a compromise between the spatial prediction and temporal proposal, modulated by operators P and Q, giving the effective recurrent map . In Section 5, we analyse this P, Q split along individual eigenmodes of the spatial sheaf Laplacian, finding that low-penalty modes are preferentially retained whilst high-penalty modes are preferentially exposed as temporal error. In Section 6, we show that the future temporal credit omitted by standard tPC learning is filtered by , whilst Section 7 shows how recurrence can route influence between persistent and exposed modes over long time horizons. Finally, in Section 8, we validate mode routing on a single-hidden-layer network.
Definition 1 (Directed network sheaf) Given a directed graph , a directed network sheaf assigns vector spaces and , called vertex and edge stalks, to each vertex and edge , respectively, and, for every directed edge , linear source and target maps
Vertex assignments form the 0-cochain space , whilst edge assignments form the 1-cochain space . Writing and for the source and target vertices, respectively, the coboundary gives the induced edge discrepancies,
3. Temporal Predictive Coding as Directed Sheaf Diffusion
Seely (2025) recasts linear predictive coding networks in terms of cellular sheaves. We extend this framework to tPC networks by constructing a directed network sheaf over the network's computational graph.
We assign vertex and edge stalks , where vertices and edges are denoted by and , respectively, and choose source and target maps so that recovers the spatial and temporal edge residuals.
In non-temporal PC, spatial residuals act on both incident activities. Temporal PC is instead causal: a temporal residual on may update its receiving state at , but cannot modify the already inferred state at . We encode this with a response operator . Spatial edges respond reciprocally, whereas temporal edges are receiver-only:
Thus determines the residual, whilst determines where that residual acts. Writing for the spatial coboundary and for the temporal operators, one obtains the directed sheaf Laplacian
Here and are symmetric block-diagonal precision operators. Making temporal responses reciprocal by setting recovers ordinary weighted sheaf diffusion.
4. Spatial Inference Filters Temporal Recurrence
We now consider inference at a fixed time step . Clamping the bottom-layer activity to the current observation and collecting the free activations into
- Throughout, adjoints are taken with respect to the standard inner products on the stalks, with precision operators written explicitly.
we can write the stacked spatial residual in affine form as
where denotes the spatial edge space at time , and denotes the spatial coboundary restricted to the free vertices, with the clamped observation absorbed into . On these coordinates, define the temporal map and its incoming proposal by
Accordingly, inference at time t minimises the slice energy
Writing for the spatial sheaf Laplacian, let
where denotes the Moore–Penrose pseudoinverse.
In this clamped setting, directed sheaf diffusion restricts to the free activities, and yields the corresponding relative flow
Since , this flow has a unique inference equilibrium. Define
The inference equilibrium is
We call P the persistence operator and Q the exposure operator. Equation (1) shows that inference mediates between the temporal proposal and spatial optimum, retaining one component in the state and exposing the complementary component as temporal error. Furthermore, the irreducible tension between spatial and temporal error is captured by the frustration . A sheaf-theoretic derivation of the inference equilibrium and inference maps, as well as a cohomological interpretation of the frustration is provided in Appendix D.
Writing , we obtain
Finally, substituting and holding the current observation fixed gives
The learned recurrent map is A, whilst one-step state influence propagates through the inference-corrected transition .
5. Spatial Modes Balance Competing Predictions
In this section, we suppose the temporal precision is isotropic: , where . We recall that the spatial sheaf Laplacian is self-adjoint and positive semidefinite. It thus admits an orthonormal eigendecomposition
where is the orthogonal projection onto the eigenspace of . The inference operators become
Notably, P and Q preserve the eigenspaces of L.
Proposition 2 (Mode law) Let be a simultaneous eigenvalue of , and , with corresponding eigenvalues . Let . Then
Suppose we perturb the free hidden activities in the current slice by . Since
its eigenvalue measures the spatial penalty induced by the cross-layer perturbation, whilst compares this penalty to the temporal one. Accordingly, low- modes are preferentially retained by inference, whereas high- modes are preferentially exposed as temporal error.
Since , inference resolves the spatial-temporal disagreement modewise: gives the fraction by which the inferred state moves from the spatial solution towards the temporal proposal, whilst gives the fraction left as temporal error. When recurrence places a proposal component in mode , is its persistence gain and its exposure gain. Although this modal discussion assumes , the following identity holds for arbitrary .
Theorem 3 (One-slice persistence-error identity) For any ,
In particular, for the inference mismatch ,
The final term appears since and are not generally -orthogonal. Here, is the displacement away from the spatial optimum accepted by the temporal proposal, and therefore is the additional spatial residual induced by moving away from that optimum. Thus, the identity accounts for the mismatch through state displacement, proposal-side temporal error, and the additional spatial residual induced by that displacement. For a pure mode , the corresponding shares are , , and , with maximal spatial interference at .
6. What Local Temporal Learning Omits
We now turn our attention to learning. The standard tPC temporal update is temporally local: it cannot determine whether a locally favourable change will impair or improve predictions several steps later (Ng-Kee-Kwong et al., 2026). Since the inferred state at time t causally predicts states at future time steps, we can quantify this omitted dependence by seeing how a perturbation of the current state affects future scalar objectives, such as later slice energies or a downstream task loss.
Let denote the reduced current-slice energy. With parameters held fixed, let denote any future scalar objective whose dependence on the proposal is through the inferred state and subsequent states, and write for its sensitivity to the current inferred state. Future sensitivity is transported backward through the adjoints of the inference-corrected transition . The current temporal proposal affects this future objective through , whilst provides the local temporal signal. Combining these contributions gives the exact proposal-level credit.
Theorem 4 (Temporal credit split)
Since , this proposal-level decomposition induces the corresponding temporal-weight updates by the chain rule; the explicit layerwise gradients are given in Appendix B.4. The standard tPC temporal update retains only the first term, updating the temporal weights from the temporal error available at the current slice. The contribution lost is modulated by the adjoint of . In the modal case considered in the previous section, is self-adjoint: is the exposure gain on the local temporal-error signal, whilst is the persistence gain on returned future credit.
7. Long-Term Persistence and Mode Routing
We now discuss how perturbations propagate through the network over long time horizons. We begin with a perturbation to the inferred state at time , whilst keeping the input sequence fixed. At time , recurrence gives a proposal perturbation . Since the input sequence is fixed, the spatial optimum remains unchanged, and the inference split gives
Here is the part of the perturbation carried into the next inferred state, whilst is its proposal-side exposure at that slice. At each transition, mixes the current state across spatial modes; inference then retains the -weighted component in the next state and exposes the -weighted component as temporal error. These transitions are between exact slice equilibria, rather than inference iterations within a slice. Iterating the state response, a perturbation contributes after further steps
(a) Full temporal credit (BPTT)

(b) Standard tPC

Figure 2: Full temporal credit learns to retain the cue in C and expose it in E at the response, whereas standard tPC does not.
7.1. A Single-Mode Obstruction
We now return to the isotropic case and consider what occurs when the perturbation remains in a single spatial mode. Consider the special single invariant-mode case where is additionally a fixed point of the temporal operator , and is a perturbation in the spatial mode . The perturbation is retained in the next state with gain , whilst its induced temporal error is scaled by . Therefore, after time steps,
Thus measures persistence of the earlier influence in the state, whereas measures its temporal-error report after time steps. Using and , the delayed exposure gain is
For , this is maximised at
Therefore, even in the optimal case, the single-mode delayed exposure gain decays as . In particular, a perturbation in a single invariant mode cannot both persist strongly through inference steps and produce a strong delayed temporal-error report.
7.2. Mode Routing
The preceding section assumes that perturbations persist in a single mode. In general, however, this is untrue. Although A is shared across time, its input state evolves under PA; temporal position can therefore be encoded in the state trajectory itself, so the same recurrence can produce weak intermediate temporal errors and a strong later report. Writing
the block maps perturbations between eigenspaces and of the spatial Laplacian . For a perturbation and delay , its temporal-error contribution at time is . If there are spatial modes, expanding this propagation operator gives
Thus each route contributes a product of temporal mode transitions , weighted by the persistence gains of the intermediate modes and the exposure gain of the final mode. The temporal map therefore determines how perturbations move between spatial modes, whilst inference determines how they persist or appear as temporal errors. As the expansion is a sum, different routes may reinforce or cancel.
Recurrence can thus evade the single-mode obstruction. A perturbation may travel through low- modes, for which over the intermediate slices, and then be routed into a high- mode, for which at the final time step, yielding an inference gain .
8. Learning Mode Routing in Delayed Recall
We consider whether the mode-routing mechanism described in Section 7 can be learned in a real tPC network. We construct a one-hidden-layer linear tPC network with a fixed spatial Laplacian
where is drawn independently and fixed for each seed. With this choice of , the first modes form a carrier subspace with persistence , with the final mode forming an exposure subspace with exposure . We fix a corresponding , and only is learned. At time 0, we inject a scalar cue along the observation direction for , followed by four Gaussian distractor slices at times using directions . At response time , we clamp a bottom-layer response target chosen to drive the hidden state towards , encouraging exposure of the cue. During inference, we sequentially clamp the cue, Gaussian distractors, and the response target while minimising the slice energy at each step. During learning, we use the same inference procedure and slice energies, but update A two ways. In the standard tPC setting (b), we update A using each slice's temporal error. By contrast, in the full credit setup (a) we update A by differentiating the full predictive coding energy through the entire inferred trajectory. A single optimisation step consists of inferring the entire trajectory for every sequence in a minibatch and taking one Adam update of A. During testing, we draw a new cue and distractors, and infer sequentially. At t = R, we set the response observation to zero, infer the final state from the temporal proposal, and read the predicted cue from the exposed component of the final temporal error.
Results are shown in Figure 2. Across all 15 seeds, full temporal credit learned to retain-then-expose the cue, with median test MSE falling to 0.00548, compared with the unit-error no-information baseline. By contrast, standard tPC failed to do so, with median test MSE remaining near baseline at 0.97057 and cue-dependent carrier energy collapsing during training. This highlights an important limitation of standard tPC learning: while mode routing can overcome the single-mode obstruction, its temporally local update lacks the long-range credit required to learn this route in our experiment. Further details are provided in Appendix E. On overlapping 30-digit copy, full credit learns the same route (median test MSE 0.011 versus 0.999 for local tPC; Appendix F).
9. Discussion
Temporal predictive coding networks, while attractive for their layer-local, temporally local learning rules, can struggle to learn long-range dependencies (Potter and Rhodes, 2026; Ng-Kee-Kwong et al., 2026). This work introduces the persistence and exposure operators P and Q, which offer a new interpretable framework for understanding how interactions between spatial and temporal errors shape credit propagation over long horizons. We show that a linear tPC network’s recurrent map may contain dynamics capable of both preserving and routing information. However, standard local tPC omits the future-credit term captured by full temporal credit and may therefore fail to learn weights that realise this capacity.
More broadly, the P, Q framework makes the role of spatiotemporal tension explicit in temporal computation, highlighting its impact on state persistence, error exposure, effective recurrence, and future credit for linear networks. This opens up several avenues for future work, including nonlinear extensions and geometry-aware architectures for long-range learning in tPC.
References
Cristian Bodnar, Francesco Di Giovanni, Benjamin P. Chamberlain, Pietro Liò, and Michael Bronstein. Neural sheaf diffusion: A topological perspective on heterophily and oversmoothing in GNNs. In Advances in Neural Information Processing Systems, volume 35, pages 18527–18541, 2022. doi: 10.52202/068431-1346.
Justin Michael Curry. Sheaves, Cosheaves and Applications. PhD thesis, University of Pennsylvania, 2014. URL https://arxiv.org/abs/1303.3255.
Jakob Hansen and Robert Ghrist. Toward a spectral theory of cellular sheaves. Journal of Applied and Computational Topology, 3(4):315–358, 2019. doi: 10.1007/s41468-019-00038-7.
Jakob Hansen and Robert Ghrist. Opinion dynamics on discourse sheaves. SIAM Journal on Applied Mathematics, 81(5):2033–2060, 2021. doi: 10.1137/20M1341088.
Beren Millidge, Mufeng Tang, Mahyar Osanlouy, Nicol S. Harper, and Rafal Bogacz. Predictive coding networks for temporal prediction. PLOS Computational Biology, 20(4): e1011183, 2024. doi: 10.1371/journal.pcbi.1011183.
Julian Ng-Kee-Kwong, Mufeng Tang, Thomas Akam, and Rafal Bogacz. Learning complex temporal dependencies via local synaptic plasticity. bioRxiv, 2026. doi: 10.64898/2026.07.09.737423. Preprint.
Tom Potter and Oliver Rhodes. Learning long-range dependencies with Temporal Predictive Coding, 2026. URL https://arxiv.org/abs/2602.18131.
Rajesh P. N. Rao and Dana H. Ballard. Predictive coding in the visual cortex: A functional interpretation of some extra-classical receptive-field effects. Nature Neuroscience, 2(1): 79–87, 1999. doi: 10.1038/4580.
André Ribeiro, Ana Luiza Tenório, Juan Belieni, Amauri H. Souza, and Diego Mesquita. Cooperative sheaf neural networks. In The Fourteenth International Conference on Learning Representations, 2026. URL https://openreview.net/forum?id=AHpexliCTM.
Tommaso Salvatori, Ankur Mali, Christopher L. Buckley, Thomas Lukasiewicz, Rajesh P. N. Rao, Karl Friston, and Alexander Ororbia. A survey on neuro-mimetic deep learning via predictive coding. Neural Networks, 195:108161, 2026. doi: 10.1016/j.neunet.2025.108161.
Jeffrey Seely. Sheaf cohomology of linear predictive coding networks. In NeurIPS Workshop on Symmetry and Geometry in Neural Representations, 2025. URL https://nips.cc/virtual/2025/136819.
James C. R. Whittington and Rafal Bogacz. An approximation of the error backpropagation algorithm in a predictive coding network with local Hebbian synaptic plasticity. Neural Computation, 29(5):1229–1262, 2017. doi: 10.1162/NECO_a_00949.
Appendix A. Proofs for Spatial Inference
This appendix assumes finite-dimensional stalks and cochain spaces.
A.1. Directed Slice Dynamics
Spatial edges respond reciprocally, so . Their free-state contribution is . For a temporal residual entering slice , the target block of is the identity, giving
at the receiver. The source block of an outgoing temporal edge is zero, so that residual contributes no force to slice . Hence
which depends only on slice t and the incoming proposal .
A.2. Spatial Residual Decomposition
Let . Since
we have . Hence, for every ,
Because is self-adjoint, , so . It follows that , so satisfies the normal equations.
Differentiating the spatial least-squares term at gives
For , this normal equation implies
The cross term in
therefore vanishes, leaving as an additive constant and proving the reduced slice energy.
A.3. Inference Operators
Since and , is invertible. The equilibrium equation is equivalent to
which yields and
Consequently, for ,
For force balance,
so for every mismatch . This is the equality of the spatial force and the opposing temporal force .
Finally, with the current observation and weights fixed, , , , and are independent of . Differentiating
therefore gives .
A.4. Mode Law
Since , the spatial sheaf Laplacian satisfies
Thus the spectral theorem gives an orthogonal decomposition into eigenspaces of . Under the isotropic temporal precision , let and . Applying to yields
Likewise,
Therefore , , and , proving the mode law.
A.5. One-Slice Persistence–Error Identity
From , every satisfies . Expanding its squared -norm gives
The force-balance identity implies
Substitution proves
In the isotropic case, the identity can be read modewise. Let and . Dividing each term by the total mismatch energy gives the persistence, exposure, and spatial-interference shares
respectively. These shares sum to . The spatial-interference share has derivative
It therefore increases up to and decreases thereafter, attaining its maximum value when .
A.6. General Temporal Precision
The modal result extends to every after changing to the -metric. Define
This operator is self-adjoint and positive semidefinite. Since
the inference operators satisfy
Let be an orthonormal eigenvector of with eigenvalue , and put . Then
Applying the two similarity-transformed inference operators to and transforming back gives
Thus the persistence and exposure gains retain the same form for general temporal precision; only the diagonalising basis and inner product change.
Appendix B. Proofs for Temporal Credit
B.1. Multi-Step Influence and Backward Transport
Fix the observations and weights over the interval from to . For each , the inferred dynamics are
The second term is independent of , so the one-step Jacobian is
For n = 1, this gives the claimed expression directly. If the claim holds for n - 1, the chain rule gives
Induction therefore proves the multi-step influence formula for every .
Now let a scalar contribution depend on the current state only through , and write . For a perturbation ,
Hence
If the future objective is a sum of contributions at several times, its gradient at is the corresponding sum of these adjoint pullbacks.
B.2. Reduced Slice Energy and Proposal Sensitivity
Suppress the time index and let m = a - y. At equilibrium,
Using the spatial residual decomposition from Appendix A.2, the reduced slice energy is
The force-balance identity gives
Since , it follows that
Moreover,
which is self-adjoint because is self-adjoint and positive definite. Holding b fixed makes y and h independent of a, so . Differentiating the reduced energy therefore yields
The equilibrium state is affine in the proposal,
With the observation and weights fixed, P, Q, and y do not vary with a. Thus
B.3. Temporal Credit Split
Restore the time index and let . The chain rule and the proposal sensitivity above give, for every perturbation ,
Consequently,
Adding this derivative to the reduced current-slice derivative proves the temporal credit split:
B.4. Temporal-Weight Gradient and Modal Gains
Let
Since and , writing for the layer- component of gives the per-transition layerwise chain rule
Finally, in the isotropic case , both and are self-adjoint functions of . With and , projection onto spatial mode gives
Thus is the modewise exposure gain on the local temporal-error signal and is the modewise persistence gain on returned future credit. Their identity is a statement about these operator gains; the realised magnitudes can also depend on the distinct vectors and .
Appendix C. Proofs for Long-Term Persistence and Mode Routing
This appendix assumes finite-dimensional stalks and cochain spaces.
C.1. Single-Mode Delayed Exposure
Let and assume . The mode law gives and . Hence
If , then another recurrent and inference step gives
Induction proves the state formula for all , and the report at the final step is
Using the mode law, define the delayed exposure gain
For n > 1,
The derivative is positive below and negative above it, whilst and as . Therefore this critical point is the unique global maximiser, and
For , increases towards a supremum of one as , so there is no finite maximiser. Thus the finite-maximiser result applies only when .
C.2. Mode-Routing Path Expansion
Let index the eigenspaces of . Insert the spectral decompositions of and , together with , into . This product has factors of , intermediate factors of , and one final factor of . Expanding the products gives
For , the product of persistence gains is the empty product and is equal to one. Multiplying the operator identity by proves the path expansion for .
Appendix D. Sheaf-Theoretic Derivations
In this appendix, we present an alternative derivation of the essential structure of linear temporal predictive coding networks. While the derivation in the main body is primarily focused on dynamics, the present appendix will instead take an sheaf-theoretic and Hodge-theoretic angle, focused on the relative cohomology of a sub-sheaf of full tPC network (Seely, 2025; Curry, 2014).
D.1. The Time-Slice Sheaf
We first consider a sub-network of a tPC network.
Definition 5 The time-slice graph at time of a linear tPC network consists of the following data.
Remark 6 The time-slice graph contains all spatial edges at time-slice t, as well as the incoming temporal edges from time-slice t - 1. Consequently, all relevant information for the time t inference and learning steps are present.
From the time-slice graph, we derive the time-slice sheaf.
Figure 3: The time-slice sheaf associated to a linear tPC network. Temporal and spatial edge-stalks are shown in red and blue respectively. The left-most column represents the layers of the network at time , while the black vertex stalks in the right-most column represent the layers of the network at time .
Definition 7 The time-slice sheaf at time is the cellular sheaf consisting of the following data.
-
for each vertex , a vertex stalk , where is the activation space at layer of the tPC network. Each is endowed with an inner product, denoted by .
-
For each temporal edge , , an edge stalk , with source restriction map and target restriction map . Each temporal edge stalk is endowed with an inner product .
-
For each spatial edge , , an edge stalk , with source restriction map and target restriction map . Each spatial edge stalk is endowed with an inner product .
The time-slice sheaf is shown in Figure 3.
Remark 8 We make two remarks about the time-slice sheaf.
-
The superscripts on the stalks are purely decorative, and used to further disambiguate temporal edge stalks , spatial edge stalks , and time-slice vertex stalks . As a vector space, each stalk is simply the underlying .
-
The time-slice sheaf is not a directed cellular sheaf, but a classical one. In particular, all edges are symmetric broadcaster/receivers. Since the previous equilibria are all clamped during inference, there is no advantage to maintaining “causal” edges.
Definition 9 The cochain spaces associated to the time-slice sheaf are
Remark 10 The cochain spaces each come equipped with an inner product via the direct sum. The zero cochains inherit the direct sum of all inner products. We will always use to refer to any direct sum of these undecorated inner products. Letting
take to be the block-matrix
The inner product on is exactly .
Definition 11 The total coboundary is given by its image on each edge-stalk
Definition 12 A global section of is a zero cochain such that .
Remark 13 A global section represents a choice of activations at timeslices and such that there is no spatial or temporal error in the slice.
D.2. Relative Cohomology
Definition 14 We introduce the following convenient spaces.
Remark 15 The spaces and have canonically identified underlying vector spaces , whereas has underlying vector space . Each space carries its own direct-sum inner product. We denote the inner product on by an undecorated , and use for adjoints with respect to the underlying undecorated inner products. We denote the inner products on and by and respectively, with block-diagonal precision matrices
We write for the canonical identification and, when no confusion can arise, use it implicitly in expressions such as for .
Definition 16 Let be the time-slice sheaf at slice of a linear tPC network. The boundary sub-complex consist of the vertices , along with the single edge .
Remark 17 The boundary sub-complex is the full subcomplex of containing all data which is “clamped” during inference at time-slice t.
Definition 18 The relative cochain spaces associated to the time-slice sheaf are
Remark 19 For ease of reading, we will refer to these spaces of relative cochains through their identification with and .
Recall that denotes the spatial coboundary restricted to the free vertex stalks. Explicitly, for ,
Definition 20 The relative coboundary operator associated to the relative cochain complexes is the block operator
This relative coboundary induces the relative cochain complex
with relative cohomology groups
Remark 21 We will refer to the relative cohomology groups as slice-cohomology groups, and use the notation .
Proposition 22 The degree zero slice cohomology is zero; .
Proof Since the lower block of D is the identity map, .
Proposition 23 The degree one slice cohomology is isomorphic to the space of spatial edge stalks; .
Proof We construct an explicit isomorphism. Let denote the map
It is straightforward to check that and . Taking the quotient of the domain by yields an isomorphism
D.3. Spatiotemporal Frustration
Definition 24 Let be a fixed collection of temporal edge activations, and a fixed activation in layer zero. The boundary excitation associated to these data is
where is the block vector whose component is , and which is zero on all other spatial edge stalks.
Remark 25 We think of as the time input to the tPC network. Similarly, with under the canonical identification above, we think of as the equilibrated free activations of time slice pushed forward by the learned temporal map: . However, the following analysis holds for arbitrary data and of the indicated types.
Definition 26 Given a boundary excitation , the slice residual of a free activation is given by
Thus the two blocks of the slice residual are
Remark 27 Proposition 22 ( ) implies that for any boundary excitation , there is a unique free activation that minimizes the norm of the slice residual . On the other hand, Proposition 23 ( ) says that the obstructions to the existence of a free activation with zero slice residual can be put in one-to-one correspondence with . This latter observation motivates the following definition.
Definition 28 Let be a fixed boundary excitation. The spatiotemporal frustration of is the quantity
Remark 29 To interpret the spatiotemporal frustration, let be the map from the proof of Proposition 23. Notice that for any free activation , applying to the slice residual yields
This identity holds for all activations . In particular, it holds for , yielding . One recovers . Hence represents the slice cohomology class of in , and measures the obstruction to extending the boundary data with zero residual on every edge outside .
We formalize this remark with the following theorem.
Theorem 30 The following are equivalent for a timeslice sheaf with boundary excitation and spatiotemporal frustration .
-
-
-
there exists an activation with zero slice residual;
-
the boundary data inducing admit an extension with zero residual on every edge outside B;
-
the temporal proposal already satisfies the current spatial constraints .
D.4. Hodge Theory and Harmonic Extension
We now explore the relative Hodge theory of the timeslice sheaf. Recall that comes equipped with an inner product via the direct sum of the inner products and on and respectively. We denote this inner product by , with block-diagonal precision matrix
Definition 31 Let be a fixed boundary excitation for the timeslice sheaf . The slice energy of is the quantity
where is the norm induced by .
Definition 32 A free activation is harmonic if and only if it minimizes the slice energy .
Definition 33 The sheaf Laplacian of the time-slice sheaf is the operator
Remark 34 Suppose we order the summands of and as
Write U for the vertex and edge components not contained in B. This decomposition separates the components indexed by U from those indexed by B. With respect to these blocks, The sheaf Laplacian inherits a block structure
One may check that
where is the spatial Laplacian on .
Definition 35 Let
be a boundary condition. Set , and let be the induced boundary excitation. A harmonic extension of is a collection of free activations such that, for some ,
Proposition 36 Every choice of admits a unique harmonic extension.
Proof By definition, is a harmonic extension of if and only if
Equation (6) ensures that is invertible, guaranteeing the existence of a unique harmonic extension.
Definition 37 The diffusive operator and harmonic projector of the time-slice sheaf are given by
Proposition 38 Let be a boundary condition with corresponding boundary excitation . The following are equivalent.
-
is the harmonic extension of ;
-
minimizes the slice energy over ;
-
.
Proof
1 3: Following Equation (7), the unique harmonic extension can be written as
With respect to the same decompositions of the cochain spaces (Equation (4) and Equation (5)), write the total coboundary and precision matrix as
The lower-left block is zero because B is a sub-complex. The Laplacian component can therefore be written as
Moreover, one may straightforwardly check that is the relative coboundary, and that . It follows that
2 3: The slice energy (Equation (3)) of an activation is given by
Minimizing the slice energy over is therefore equivalent to finding the OLS solution to
with respect to the metric M. Since D is injective, the OLS solution is given by
Remark 39 This proposition clarifies the relationship between harmonic extension in the timeslice sheaf and tPC inference. As the unique global minimizer of the convex slice energy , the harmonic extension is the unique critical point of the dynamics
Therefore the harmonic extension is exactly the tPC inference equilibrium.
Definition 40 Let be a boundary condition with harmonic extension . The extension residual is the quantity
Remark 41 The extension residual measures the failure of to extend with zero residual on every edge outside . In particular, such a zero-residual extension exists if and only if .
Corollary 42 Let be a boundary condition with corresponding boundary excitation . The following are equivalent.
-
is the extension residual of ;
-
.
Remark 43 The extension residual can be written in terms of the spatiotemporal frustration . Letting , one may write
This observation strengthens the interpretation of as a measurement of irreducible error arising from spatiotemporal tension.
D.5. Harmonic-Diffusive Overlap and Learning
At the learning step, the size of the gradient is determined by the harmonic and diffusive operators. Holding equilibrated free activations and fixed, the following gradients of the slice energy are recovered for the structure maps:
In these equations, we adopt the convention that .
Hence learning requires both a non-vanishing residual and a non-zero activation. Writing and , where the subscript on the harmonic projector and diffusive operator indicates which time-slice they act on, one obtains
Hence learning occurs precisely on edges where both and are non-negligible.
D.6. Recovering the Persistence and Exposure Operators
We now show where the persistence and exposure operators and emerge naturally in the algebraic account of tPC inference. We begin by decomposing the diffusive operator as a block operator over the domain:
Remark 44 is exactly the block of the diffusive operator , which in turn is the Moore-Penrose pseudoinverse of .
This decomposition of gives a corresponding decomposition of the harmonic operator :
From the identity , one recovers Q in the lower right block of .
Remark 45 is exactly the block of the harmonic projector , which in turn is the orthogonal projection of onto the orthogonal complement image( ) under the inner product .
Appendix E. Delayed-Recall Experiment
Inputs and Inference For each seed, we randomly sample and fix an orthonormal eigenbasis of the spatial sheaf Laplacian satisfying
Define as the cue direction, as the four distractor directions, and as the exposed direction. The remaining carrier directions receive no distractor input.
We draw the cue and scale its observation by , so that inference gives . For , we scale independent Gaussian distractor observations by so that their post-inference contributions along are distributed as . We choose to introduce nontrivial interference without overwhelming the unit-variance cue. Finally, the training response has amplitude along the observation direction corresponding to , with zero input elsewhere. Starting from , exact inference at each slice gives
Here denotes the clamped observation at slice t.
Learning Comparison Both full temporal credit and standard tPC use the same inference procedure. Their learning gradients differ. Writing , standard tPC treats the inferred states as fixed and uses the gradient
to update A. By contrast, full temporal credit differentiates the summed slice energy through the entire inferred trajectory by backpropagation through time (BPTT). Thus, both rules see the full slice energy, but only full credit propagates its effect to earlier transitions.
We use minibatches of 64, Adam steps, and the constraint . Learning rates are tuned independently by grid search, giving for full credit and for standard tPC. We use 15 paired seeds. For each seed, we initialise with orthogonal , clip its initial singular values at 0.99, and enforce by clipping singular values at one after each Adam update.
Evaluation At test time, we set the response observation to zero and use the fixed readout
We measure test MSE over 2048 independently sampled sequences. To examine the effect of the cue, we compare paired runs with identical distractors and either a sampled cue or a zero cue. Define
The plotted transmission energies are
Here and project onto the carrier and exposure subspaces, and normalises by the initial cue-dependent energy. Thus, the two quantities measure recurrent transmission of the cue from into and , respectively. We also report the delay-averaged carrier energy .
Results After steps, we obtain
| Full temporal credit | Standard tPC | |
|---|---|---|
| Median test MSE | 0.00548 | 0.97057 |
| Median | 0.94012 | 0.00121 |
| Median | 0.89095 | |
| Median | ||
| Largest event occurs at response | 15/15 seeds | 0/15 seeds |
This empirical result shows that mode routing occurs in a full-credit setting but not in standard local tPC.
(a) Full temporal credit (BPTT)

(b) Standard tPC

Figure 4: As in delayed recall, full temporal credit retains the digit in the carrier and exposes it at the response, whereas standard local tPC does not.
Appendix F. Overlapping 30-digit Copy
Task. We encode 30 digits as scalars . Digit arrives at and is due at , so input and answer periods overlap.
Inputs and inference. As in the delayed mode-routing experiment, we use one observed and one hidden layer. Here both have 41 coordinates: is the input direction, is the carrier, and is the exposed response direction. We fix with and . Thus , while an observation contributes to its hidden coordinate when the temporal proposal is zero. During training we clamp
Starting from , we infer each using the same slice energy and equilibrium as in the delayed mode-routing experiment.
Learning comparison. Only is learned, using the same local-tPC and full-credit BPTT rules as in the delayed mode-routing experiment. For this task we use minibatches of 16, 300 Adam updates, , and learning rates 0.01 (full credit) and 0.0003 (local tPC), selected from 100-update pilots. We report five paired seeds with matched initial , training streams, and test digit lists.
Evaluation and routing. At test time, with fixed and , we set for and thereafter. At we read and compute MSE against the 30 original digits over 1,024 new lists per seed. For the routing diagnostic, we compare runs with and , setting all later observations to zero. Their hidden-state difference satisfies and . We plot the same and transmission energies as in the delayed mode-routing experiment, now with and . The delay-averaged carrier energy is .
Results After 300 updates, we obtain
| Full temporal credit | Standard tPC | |
|---|---|---|
| Median test MSE | 0.01141 | 0.99939 |
| Median | 0.95611 | 0.05997 |
| Median | 0.90630 | |
| Median | 0.00584 | |
| Largest event occurs at response | 5/5 seeds | 0/5 seeds |