K-prop: Efficient Online Learning via Backpropagation of Temporal Kernels

K-prop drastically reduces RTRL's computational and memory costs for online RNN training by propagating temporal kernel gains, matching BPTT performance.
K-prop is a new online RNN training method addressing RTRL's excessive computational and memory overhead. Its core innovation replaces full Jacobian matrix propagation with temporal kernel gain propagation, greatly reducing per-step cost. K-prop introduces only one structured approximation, with systematic analysis of its impact on gradient quality and conditions for accuracy. On sequence learning, classification, and reinforcement learning tasks, K-prop outperforms existing RTRL approximations and matches BPTT. This offers a new paradigm balancing efficiency and performance for online training of leaky integration neural networks, suitable for streaming data and real-time control.
Online training of recurrent neural networks (RNNs) has long faced computational and memory bottlenecks—real-time recurrent learning (RTRL) supports online updates but at a high cost. A recent paper proposes K-prop, which dramatically reduces RTRL's overhead by backpropagating temporal kernels, achieving performance comparable to BPTT on sequence learning, classification, and reinforcement learning tasks.

Why Is Online RNN Learning So Hard?
Self-recurrence is a key mechanism for neural networks to process temporal information, emerging naturally in both biological and artificial systems as "leaky integration." However, due to the complex dependence of gradients on time steps, efficient and effective online training methods have been lacking.
Standard backpropagation through time (BPTT) requires unrolling the entire sequence and cannot update online; while real-time recurrent learning (RTRL) can update step by step, its computational and memory costs grow sharply with network size. Various RTRL approximation methods have been proposed, but they often compromise performance.
BPTT (backpropagation through time) is the standard method for training RNNs. It unrolls the network across time steps into a deep feedforward network and then backpropagates gradients along the time axis. Its core limitation is that it must wait for the entire sequence to be processed before computing gradients and updating parameters, making it unsuitable for streaming data or online scenarios. In addition, the length of the unrolled computation graph equals the sequence length, and long sequences bring serious memory usage and vanishing/exploding gradient problems.
RTRL (real-time recurrent learning) approaches gradient computation from another direction: it maintains a "sensitivity matrix" (i.e., partial derivatives of the loss with respect to parameters) at each time step, updating it recursively step by step. Theoretically, RTRL enables online learning without unrolling sequences, but its sensitivity matrix has size equal to the number of parameters times the hidden state dimension, with computational complexity of roughly O(n^4) (n being the number of hidden units) and memory complexity of O(n^3), expanding sharply with network size. Therefore, it has long been applicable only to very small-scale RNNs.
K-prop's Core Idea: Propagating Kernel Gains
K-prop's key innovation is to replace the full Jacobian matrix propagation in RTRL with the propagation of "kernel gains." Specifically, it propagates only the gains of temporal kernels, significantly reducing computational and memory overhead.
The paper states that K-prop "substantially reduces the computational and memory costs of real-time recurrent learning (RTRL) by propagating kernel gains." Compared with existing RTRL approximation methods, K-prop performs better and achieves performance comparable to BPTT on sequence learning, classification, and reinforcement learning tasks.
The Cost and Boundaries of a Single Approximation
K-prop introduces only one approximation: simplifying certain terms when propagating kernel gains. The paper further analyzes how this approximation affects gradient quality and identifies the conditions under which K-prop remains accurate and effective. This means practitioners can judge whether K-prop is applicable based on task characteristics, rather than trusting it blindly.
Temporal kernels in RNN gradient analysis describe the dependence of hidden states on historical inputs. Specifically, the Jacobian matrix of the RNN's hidden state at time step t with respect to the input at time step k can be decomposed into a product of a series of temporal kernels. RTRL requires explicitly propagating the full Jacobian matrix (i.e., the partial derivatives of all parameters with respect to hidden states), whereas K-prop observes that what really matters in gradient computation is the "gain" information of these temporal kernels—the scaling factors of the kernels along the time direction. By propagating only these gains (rather than the full matrix), K-prop reduces the per-step computational and memory overhead from a magnitude quadratic in the number of parameters to one linear in the number of parameters. This idea draws on forward-mode automatic differentiation, but avoids its high cost through a structured approximation.
K-prop's approximation essentially ignores certain higher-order cross terms when propagating kernel gains. In the exact RNN gradient, the influence of parameters on hidden states propagates through multiple temporal paths, and the cross terms of these paths must be explicitly summed in the full computation. K-prop simplifies these cross terms into independent gain propagation, thereby avoiding matrix-level combinatorial explosion. This approximation has small error when network activation functions are less saturated and temporal dependence scales are short; when sequence dependence spans are extremely long or the network operates in highly nonlinear regimes, approximation error accumulates. The paper provides theoretical analysis of error bounds and applicability conditions, helping practitioners determine whether K-prop can replace BPTT in specific tasks.
Experimental Performance: Benchmarking Against BPTT
The paper evaluates K-prop on three types of tasks: sequence learning, classification, and reinforcement learning. Results show that K-prop not only outperforms existing RTRL approximation methods but also achieves performance comparable to BPTT on these tasks. This is critical for scenarios requiring online learning, such as real-time control and streaming prediction.
Comparison with Existing Methods
Traditional RTRL computes gradients exactly but at prohibitive cost; approximation methods such as truncated RTRL or stochastic approximations sacrifice gradient quality. K-prop finds a balance between the two: by propagating kernel gains, it retains sufficient gradient information while reducing cost to an acceptable range.
Truncated RTRL reduces RTRL cost by retaining sensitivity information only for the most recent several time steps, but historical dependencies beyond the truncation window are completely discarded, causing gradient bias to worsen as dependency spans increase. Stochastic approximation methods (such as sampling-based Jacobian estimation) reduce computation in an unbiased but high-variance manner, requiring additional variance reduction techniques. K-prop's essential difference from these methods is that it does not reduce cost by discarding or sampling information, but rather by analytically identifying redundant structure in gradient computation (inefficient information in the full Jacobian matrix) and propagating only the necessary gain components. Therefore, K-prop outperforms truncation-based methods in preserving gradient quality and outperforms stochastic methods in computational determinism, forming a unique compromise position.
Implications for Online Learning Practice
K-prop offers a promising direction for online training of leaky integration neural networks. It does not require unrolling entire sequences, making it suitable for streaming data and real-time applications. The paper's systematic analysis of approximation effects also provides a theoretical foundation for future research.
However, K-prop is still in the research stage, and its performance on large-scale real-world tasks and compatibility with different network architectures require further validation. Nevertheless, it demonstrates a new paradigm for online learning through backpropagation of temporal kernels.
One-line Summary
K-prop dramatically reduces the computational and memory costs of RTRL for online RNN training by propagating temporal kernel gains, with performance comparable to BPTT.
Paragraph Summary
K-prop is a new online RNN training method aimed at solving the excessive computational and memory overhead of real-time recurrent learning (RTRL). Its core innovation is replacing the full Jacobian matrix propagation in RTRL with propagation of temporal kernel gains, greatly reducing per-step overhead. K-prop introduces only one structured approximation, and the paper systematically analyzes its impact on gradient quality and provides conditions for maintaining accuracy and effectiveness. On sequence learning, classification, and reinforcement learning tasks, K-prop outperforms existing RTRL approximation methods and achieves performance comparable to BPTT. This provides a new paradigm balancing efficiency and performance for online training of leaky integration neural networks, suitable for streaming data processing and real-time control scenarios.
Related articles

From 0 to 1: Vibe Coding an AI Knowledge Base — A Practical Retrospective and Tech Stack Breakdown
A retrospective on building the AI knowledge base OilBook from scratch with Vibe Coding: Next.js+Neon stack, Oil Dev Skill workflow, Stripe paywall security, interview-style writing, AI-flavor control, and Vercel deployment.

GLM-5.4 Hands-On: Native Vision Meets a New Vibe Coding Workflow
Hands-on with Zhipu GLM-5.4: native vision tested across a 3D product demo, pure-code video generation, and remote-control Vibe Coding, compared with GPT-6.2 and Gemini Neon.

AI and Humans Claim to Prove the Riemann Hypothesis: Machine-Verified, Yet Nobody Can Understand It
Anthropic mathematician and AI Claude claim to prove the Riemann Hypothesis with 17 million lines of Lean code, machine-verified but unreadable by humans. This article analyzes the event, the zero proportion record from 41.6% to 67.2%, and the gap between machine verification and human understanding.