Online Fine-Tuning of Pretrained Controllers for Autonomous Driving via Real-Time Recurrent RL Julian Lemmel, Felix Resch, Mónika Farsang, Ramin Hasani, Daniela Rus, Radu Grosu Abstract Deploying pretrained policies in real-world applications presents substantial challenges that fundamentally limit the practical applicability of learning-based control systems. When autonomous systems encounter environmental changes in system dynamics, sensor drift, or task objectives, fixed policies rapidly degrade in performance. We show that employing Real-Time Recurrent Reinforcement Learning (RTRRL), a biologically plausible algorithm for online adaptation, can effectively fine-tune a pretrained policy to improve autonomous agents’ performance on driving tasks. We further show that RTRRL synergizes with a recent biologically inspired recurrent network model, the Liquid-Resistance Liquid-Capacitance RNN. We demonstrate the effectiveness of this closed-loop approach in a simulated CarRacing environment and in a real-world line-following task with a RoboRacer car equipped with an event camera. 1 Introduction Learning-based control policies often struggle when deployed outside their training environments. Subtle differences in system dynamics, or sensor characteristics – referred to as distribution shifts – can cause pretrained policies to perform poorly or even fail entirely ( Cobbe et al. 2018 ; Witty et al. 2021 ; Korkmaz 2024 ) . This vulnerability limits the practical use of autonomous agents in real-world settings – particularly in robotics and autonomous driving – where environmental conditions are constantly evolving, and mission objectives may change over time ( Tobin et al. 2017 ; Voogd et al. 2023 ; Li & Okhrin 2024 ) . The traditional offline learning paradigm – in which policies are trained once and deployed without further adaptation – proves fundamentally inadequate for handling such non-stationary environments ( Levine et al. 2020 ) . In such scenarios, online fine-tuning is required: the ability of deployed policies to continuously adapt to changing conditions by updating their parameters in real-time (ideally at each time step), without requiring retraining from scratch or access to large offline datasets. Figure 1 : Overview of our proposed method and experiments. After collecting human control data in the environment, a policy is pretrained using behavioral cloning. The policy is then fine-tuned online using RTRRL. The gradients needed for optimization are computed with RTRL or RFLO for diagonalized or fully connected RNN models respectively. Real-Time Recurrent Reinforcement Learning (RTRRL) ( Lemmel & Grosu 2025 ) offers a solution to this deployment challenge. RTRRL was initially introduced to enable online parameter updates in recurrent neural network policies, supporting both Continuous-Time Recurrent Neural Networks (CT-RNNs) ( Funahashi & Nakamura 1993 ) and Linear Recurrent Units (LRUs) ( Orvieto et al. 2023 ) . The framework naturally extends to Liquid-Resistance Liquid-Capacitance networks (LRCs) ( Farsang et al. 2024b ) , a class of bio-inspired continuous-time neural network models that possess desirable stability and expressivity properties for control tasks. Critically, RTRRL leverages the computation of gradients in an online manner using biologically plausible updates. This gradient computation method avoids the memory-intensive backward passes required by backpropagation through time (BPTT). In this work, we combine offline behavioral cloning with online RTRRL fine-tuning to create adaptive policies capable of maintaining performance under distribution shift. Our experimental results demonstrate that RTRRL-based online fine-tuning naturally adjusts policy behavior to maintain task performance in the face of distribution shift, whereas fixed policies deteriorate. We demonstrate our approach in the CarRacing simulation environment and on a 1:10-scale real-world line-following application. While both demonstrations fall within the domain of autonomous driving, the CarRacing environment uses conventional RGB-based observations, whereas our real-world demonstration uses an event camera. Our work highlights a well-rounded, bio-inspired approach that combines bio-inspired sensors and bio-inspired RNNs, together with a biologically plausible online fine-tuning algorithm. In addition – to the best of our knowledge – this is the first high-frequency closed-loop application of a machine learning algorithm with an event camera on standard (non-spiking) hardware. Our contributions are the following: • Extending the Real-Time Recurrent Reinforcement Learning (RTRRL) framework with a novel bio-inspired non-linear state-space model (LrcSSM). • Proposing a hybrid learning pipeline that combines offline behavioral cloning with online real-time RTRRL-based fine-tuning, allowing deployed policies to adapt continuously (at each time step) to non-stationary environments without retraining from scratch. • Validating the proposed approach both in simulation and on a real-world 1:10-scale autonomous driving platform, highlighting the feasibility of real-time online learning on embedded robotic systems. • To the best of our knowledge, we present the first high-frequency non-spiking machine learning application using event camera observations in a closed-loop control setting. • Showcasing the synergy between bio-inspired sensors, bio-inspired recurrent neural networks, and biologically plausible learning rules. 2 Related Work Interactive Imitation Learning Behavioral cloning can lead to unsatisfactory performance when deploying the novice due to overfitting on the training set. The DAgger algorithm ( Ross & Bagnell 2010 ) provides a solution to this problem that relies on interactively extending the initial dataset by allowing the pretrained novice to act at times during task execution, with the expert providing action labels for the resulting observations. This leads to the inclusion of trajectories where the expert is forced to recover from suboptimal states. DAgger approaches still rely on offline supervised learning when updating policy parameters. Existing Approaches to Online Adaptation Existing approaches to online adaptation in deployed policies span several paradigms that differ fundamentally from our real-time recurrent approach. Meta-learning trains policies to rapidly adapt to new tasks or dynamics via few-shot gradient updates or context inference ( Finn et al. 2017 ) , but requires task-specific training data and often suffers from meta-overfitting in continuous control settings ( Zhu et al. 2025 ) . Test-time adaptation techniques enable parameter updates during inference using self-supervised objectives or reward shaping ( Xiao & Snoek 2024 ; Liu et al. 2026 ) , with recent work in robotics applying test-time RL to vision-language action models for on-the-fly policy refinement in unseen environments ( Liu et al. 2026 ; Xu et al. 2025 ) . Online label shift adaptation from supervised learning dynamically reweights training examples to match evolving test-time label distributions ( Wu et al. 2021 ) , more general approaches like balanced offline-online replay address full state-action shift ( Lee et al. 2021 ) . Online Reinforcement Learning Methods Online reinforcement learning approaches used for fine-tuning policies typically perform rollouts of full episodes with the current policy, store the collected transitions in a replay buffer, and then update the policy by sampling mini-batches from this buffer at discrete training intervals ( Chen et al. 2026 ) . This paradigm introduces an intrinsic latency between interaction and learning, since gradient updates occur only after sufficient experience has been accumulated. Alternatively, the distribution shift problem can be addressed by fine-tuning on offline datasets, maintaining separate replay buffers for offline and online data and carefully balancing the sampling ratio between them during policy updates ( Lee et al. 2021 ) . Compared to these approaches, Real-Time Recurrent Reinforcement Learning (RTRRL) ( Lemmel & Grosu 2025 ) performs parameter updates at every time-step in a fully online manner, directly propagating temporal-difference errors through a recurrent backbone via real-time automatic differentiation. This design eliminates the need to wait for episodes to complete or to form mini-batches, thereby reducing update latency and enabling strictly causal, fine-grained adaptation in partially observable environments. Online Gradient Computation A central challenge for fully online learning in recurrent networks is how to compute or approximate gradients in a causal, memory-efficient way. Real-Time Recurrent Learning (RTRL) ( Williams & Zipser 1989 ) computes the exact gradient of the loss with respect to all recurrent weights in a strictly forward manner but at the cost of O(n^{4}) memory complexity in the number of units n , which makes it impractical for large networks ( Williams & Zipser 1989 ; Catfolis 1993 ) . To address this, e-prop ( Bellec et al. 2020 ) decomposes the gradient into products of neuron-specific eligibility traces and top-down learning signals, providing an online, local learning rule for spiking and rate-based recurrent networks that approaches the performance of BPTT while being far more suitable for neuromorphic hardware ( Bellec et al. 2020 ; Rostami et al. 2022 ) . Similarly, Random Feedback Local Online Learning (RFLO) ( Murray 2019a ) derives an approximate gradient rule for RNNs that is local in space and time, and replaces exact backpropagated errors with fixed random feedback weights, yielding a biologically plausible, online update rule of O(n^{2}) that performs competitively with BPTT on short horizon tasks ( Murray 2019a ; Catfolis 1993 ; Marschall et al. 2020 ) . Most importantly, RTRL becomes equally efficient with models of diagonal connectivity, as demonstrated in ( Zucchet et al. 2023 ) . RTRRL builds on this RTRL-style, step-wise gradient propagation to update policy parameters at every time-step directly from the incoming reward signal, thereby inheriting the strict online character of RTRL while tailoring the update rule to temporal-difference RL rather than supervised sequence prediction ( Lemmel & Grosu 2025 ) . Event-Based Vision in Machine Learning Event-based vision leverages neuromorphic sensors for high-speed, low-latency processing in robotics and control, building on early DVS hardware and algorithms for optic flow and tracking ( Gallego et al. 2022 ; Maqueda et al. 2018 ) . Deep learning advancements, including transformers like GET ( Peng et al. 2023 ) and comprehensive benchmarks, have enabled tasks such as object detection and deblurring from sparse event streams ( Zheng et al. 2023 ) . Its applications in autonomous vehicles ( Chen et al. 2020 ) often use dedicated neuromorphic chips running spiking neural networks ( Vitale et al. 2021 ; Aspragkathos et al. 2023 ; Paredes-Vallés et al. 2024 ) . In contrast, in this work we target classical hardware and employ efficient recurrent models, demonstrating that they can also operate on DVS data. 3 Background In this section, we briefly describe the methods used in our experiments. We begin with behavioral cloning for offline training, followed by online learning approaches for improved adaptation, including the recurrent models integrated into our setup. 3.1 Behavioral Cloning Imitation Learning deals with learning a controller for a given task from expert demonstrations. A novice policy is trained to predict the expert action from a sequence of observations from the environment. Behavioral cloning is a simple strategy for Imitation Learning where a dataset of expert demonstrations is collected, and then used to train a policy offline – via supervised learning. The policy can be either deterministic or stochastic , which determines the loss function used for training. While a deterministic policy predicts actions directly – without any notion of confidence, stochastic policies output probability distributions such as a Gaussian consisting of mean and standard deviation for each action component. 3.2 Online Learning via RTRRL Real-Time Recurrent Reinforcement Learning (RTRRL) ( Lemmel & Grosu 2025 ) is a biologically plausible online learning framework using recurrent neural networks. RTRRL combines online temporal-difference learning with eligibility traces (TD( \lambda )) with efficient online gradient computation via RTRL or RFLO. The framework performs all learning and weight updates in a single forward pass without separate backward phases, making it computationally and biologically more realistic than backpropagation through time (BPTT). In the next subsections, we provide brief summaries for the individual building blocks of RTRRL and present the algorithm in Appendix 1 . For further algorithmic details, we refer the reader to ( Lemmel & Grosu 2025 ) . 3.2.1 RTRRL RNN Architecture RTRRL employs a RNN backbone with linear output heads for actor \pi and critic \hat{v} functions. At each timestep, the RNN receives observation o_{t} as input, together with the approximate Jacobian \hat{J}_{t-1} computing a latent state representation h_{t} and updated Jacobian \hat{J}_{t} : h_{t},\hat{J}_{t}=\mathrm{RNN}_{\theta_{R}}(o_{t},h_{t-1},\hat{J}_{t-1}) from which the actor outputs an action distribution \pi_{\theta_{A}}(a|h) and the critic outputs a value estimate \hat{v}_{\theta_{C}}(h) . 3.2.2 Temporal-Difference Learning with Eligibility Traces RTRRL uses temporal-difference learning ( Sutton & Barto 2018 ) combined with eligibility traces (ETs) to enable online, sample-efficient updates that handle delayed rewards. After each action, the reward r_{t} , and past and current states h_{t} and h_{t+1} are used to compute the TD-error \delta_{t} : \delta_{t}=r_{t}+\gamma\hat{v}_{\theta_{C},t}(h_{t+1})-\hat{v}_{\theta_{C},t}(h_{t}) (1) While standard TD(0) fails with delayed rewards, RTRRL addresses this through TD( \lambda ), which maintains decaying traces of each parameter’s gradient history. The trace e_{\theta} decays with factor \gamma\lambda where \gamma is the discount factor. The eligibility trace for the critic \hat{v} is computed as: e_{\theta_{C},t}=\gamma\lambda_{C}\ e_{\theta_{C},t-1}+\nabla_{\theta_{C}}\hat{v}_{t}(h_{t}) (2) RTRRL uses a linear value-function \hat{v}_{\theta_{C}}(h_{t})\,{=}\,w^{\top}h_{t} with parameters w , like in the original TD( \lambda ), the gradient of the loss with respect to w is simply \nabla_{w}\hat{v}_{\theta_{C}}\,{=}\,h_{t} . The eligibility trace for the actor \pi is computed by taking a small step in the direction of the log of the action probability: \displaystyle\pi_{t} \displaystyle=\pi_{\theta_{A},t}(h_{t}) (3) \displaystyle a_{t} \displaystyle\sim\pi_{t} \displaystyle e_{\theta_{A},t} \displaystyle=\gamma\lambda_{A}\ e_{\theta_{A},t-1}+\nabla_{\theta_{A}}\mathrm{log}\ \pi_{t}[a_{t}] The eligibility trace for the RNN part is more sophisticated as it incorporates Jacobian approximations \hat{J} : e_{\theta_{R},t}=\gamma\lambda_{R}\ e_{\theta_{R},t-1}+\hat{J}_{t}B\varepsilon_{t} (4) Once, the eligibility traces and the TD-error \delta_{t} are computed, the parameters of \theta_{C},\theta_{A} and \theta_{R} are updated via: {\theta_{t+1}}\leftarrow{\theta_{t}}+\eta\ \delta_{t}\ e_{\theta,t} (5) with their corresponding \eta step size and e_{\theta} trace. 3.2.3 Online Gradient Computation RTRRL’s key innovation is computing RNN gradients online without BPTT. This can be achieved by RTRL or RFLO. Real-Time Recurrent Learning (RTRL) maintains an approximate Jacobian trace updated during forward computation: \hat{J}_{t+1}=\hat{J}_{t}\left(\mathbb{I}+\nabla_{h_{t}}f(x_{t},h_{t})\right)+\bar{J}_{t} (6) allowing gradient updates at each step. However, RTRL has O(n^{4}) complexity in neuron count n , making it impractical for large networks. Random Feedback Local Online (RFLO) learning approximates RTRL for CT-RNNs with O(n^{2}) complexity by enforcing biological plausibility: it avoids weight transport by using fixed random feedback matrices B (feedback alignment) instead of weight-transport gradients, and enforces locality by dropping non-local gradient terms: \hat{J}_{t+1}^{W}\approx(1-\tau^{-1})\ \hat{J}_{t}^{W}+\tau^{-1}\varphi^{\prime}(W\xi_{t})^{\top}\xi_{t} (7) The update is \Delta W(t)=\hat{J}_{t}^{W}B\varepsilon_{t} using a fixed random matrix B . Prior work shows that this simplified formulation remains effective for learning ( Murray 2019b ; Marschall et al. 2020 ) . 3.3 Recurrent Models Here, we provide a brief overview of the models integrated into the RTRRL framework. CT-RNN Introduced by Funahashi & Nakamura 1993 , continuous-time recurrent neural networks (CT-RNNs) can be interpreted as electrical equivalent circuits modeling electrical synapses ( Gerstner et al. 2014 ; Farsang et al. 2024a ) . Their dynamics are described by the following ordinary differential equation: \dot{h}(t)=\frac{1}{\tau}(-h(t)+\varphi(W\xi(t))) (8) where h\in\mathbb{R}^{N} denotes the hidden state, \varphi(\cdot) is a nonlinear activation function, and \tau\in\mathbb{R}^{N} is a vector of neuron-specific time constants. The augmented input \xi\in\mathbb{R}^{I+N+1} concatenates the external input x(t)\in\mathbb{R}^{I} , the current hidden state at time step t , and a constant bias term. The weight matrix W\in\mathbb{R}^{N\times(I+N+1)} jointly parameterizes input, recurrent, and bias connections. The network output is obtained via a linear readout, y(t)=W_{out}h(t) . LRU Linear Recurrent Units (LRUs) – introduced by Orvieto et al. 2023 – describe its latent dynamics through a linear system, enabling highly efficient state updates. They define the following state-space model (SSM) equations: \dot{h}(t)=Ah(t)+Bx(t) (9) where A\in\mathbb{C}^{N\times N} is a diagonal matrix, and B\in\mathbb{C}^{N\times I} , C\in\mathbb{C}^{O\times N} , and D\in\mathbb{R}^{O\times I} are learnable parameter matrices. The hidden state h_{t}\in\mathbb{C}^{N} is complex-valued. The output y(t)=\Re\left[Ch(t)\right]+Dx(t) is obtained by combining the real part of the latent state with the input x(t) at time t . LRC Liquid-Resistance Liquid-Capacitance models (LRCs) ( Farsang et al. 2024b ) and their diagonal variant, LrcSSMs ( Farsang et al. 2025 ) , have an intermediate position between CT-RNNs and LRUs. From a biological perspective, LRCs are bio-inspired models of chemical synapses, whereas CT-RNNs can be interpreted as models of electrical synapses. A key distinction between the two lies in their treatment of temporal dynamics: CT-RNNs employ fixed time constants, while LRCs introduce input- and state-dependent time constants, allowing each neuron to adapt its temporal behavior dynamically. From a state-space modeling viewpoint, both LRUs and LrcSSMs fall within the SSM framework. While LRUs are characterized by purely linear recurrence, LrcSSMs extend this formulation by introducing nonlinear state dynamics. Despite this increased expressiveness, LrcSSMs retain computational efficiency due to their diagonal structure, which enables decoupled and parallelizable state updates. The dynamics of LRCs can be expressed as \dot{h}(t)=A_{h,x}(t)\,h(t)+b_{h,x}(t) (10) where A_{h,x}(t)\in\mathbb{R}^{N\times N} is a diagonal matrix and b_{h,x}(t)\in\mathbb{R}^{N} is a vector-valued function, capturing biologically interpretable, state- and input-dependent dynamics. 4 Experimental Setup 4.1 Integrating LRC into online fine-tuning framework The biological plausibility of RTRRL stems form the fact that BPTT is avoided when computing gradients for the recurrent neural network. As mentioned above, gradients for recurrent models with diagonal connectivity can be computed exactly – and without a loss in performance – using RTRL (Eq. 6 ). The diagonalized version of LRC (LrcSSMs) can be used as a drop-in replacement of LRU in the original RTRRL algorithm. The resulting algorithm retains the benefits of cheap computation of exact gradients, while also regaining the biological interpretation that the LRU model lacks. 4.2 Model Architecture Figure 2 shows the model structure used for our experiments. Core components are the convolutional encoder and the recurrent policy, which are pretrained first using supervised learning, and later fine-tuned using reinforcement learning. The convolutional decoder and the recurrent critic are used only during pretraining and fine-tuning respectively. Figure 2 : Model architecture. A: For pretraining, a CNN autoencoder is used to encode the image observation o_{t} ; the encoded vector x_{t} serves as input to the RNN policy predicting action distribution \mathcal{N}(\hat{\mu}_{t},\hat{\sigma}_{t}) . B: The RNN policy is fine-tuned; to this end, a RNN value function is used that predicts the value estimate \hat{v}_{t} from encoded vector x_{t} . During pretraining, the convolutional encoder is part of an autoencoder that is trained to minimize the image reconstruction loss \mathcal{L}_{rec}=||o_{t}-\hat{o}_{t}|| . The actor is modeled as single-layer recurrent neural network and receives the encoded observation x_{t} as input. It’s output is transformed by a fully connected layer that maps to a number of outputs equal to double the number of action dimension. The outputs correspond to the mean and standard deviation of a Gaussian distribution that is transformed by a hyperbolic tangent bijector, and scaled to the maximum action magnitude afterwards. This setup ensures that the policy can only predict admissible actions. Training of the policy is facilitated through maximizing the log-probability of the action in the dataset under the predicted distribution \mathcal{L}_{act}=-\log P(a_{t}|x_{t}) . The combined loss for pretraining is the sum of the action prediction loss and the weighted reconstruction loss. \mathcal{L}=\mathcal{L}_{act}+\eta_{rec}\mathcal{L}_{rec} For fine-tuning via RTRRL, a recurrent value function is randomly initialized and used alongside the CNN encoder and the RNN policy. The RNN Critic receives the same encoded vector x_{t} as input and it’s output is mapped by an all-to-one fully connected layer. The Critic’s output corresponds to a deterministic prediction of the expected cumulative state-value with discounting. Note that – contrary to Lemmel & Grosu 2025 , who used a shared RNN encoder followed by linear policy and value functions – we use a separate RNN for each function. 4.3 Parameter Change Penalty When fine-tuning a policy on a single environment with an effective batch-size of 1 , overfitting is likely to appear. To combat this issue, we add an additional penalty to the policy loss that penalizes the L_{2} norm of the difference between the pretrained and the current policy parameters, similar to Lemmel et al. 2025 . L_{\theta}=\beta\ ||\theta_{pre}-\theta_{t}||_{2} (11) 4.4 Simulation Environment For our simulation experiments, we introduce a modified version of the CarRacing environment from OpenAI Gym: we augment the environment with an additional penalty term that penalizes deviations of the vehicle’s wheels from the track center. Specifically, each segment of the track is defined by a keypoint representing its center of mass. We compute the Euclidean distance of the car’s center to all keypoints of the track and take the minimum of these distances. This deviation measure is scaled and subtracted as a penalty term from the original environment reward. The modified reward encourages agents to maintain a trajectory that keeps the vehicle’s wheels close to the track center, effectively shaping the policy toward safer and more comfortable driving behavior. We first collected human demonstration data by letting an average human player complete three laps in the environment. Each trajectory consists of a sequence of 1000 image observations paired with the corresponding (discrete) control actions. This dataset serves as the source of supervised pretraining for the agent. For each model type, we initialize parameters with five different random seeds and pre-train each on the recorded human trajectories. These pretrained models are subsequently used as initializations for the fine-tuning phase, where the agents continue training within the modified environment. 4.5 Real-world deployment In our real-world deployment, we used a RoboRacer car – an autonomous platform based on a 1:10-scale racecar with an Asus-NUC-based compute platform – equipped with a Sony/Prophesee IMX636 Dynamic Vision Sensor (DVS). The compute platform is connected to a motor and steering controller (see Fig. 3 ). Figure 3 : RoboRacer car equipped with Sony/Prophesee IMX636 sensor for the real-world deployment of the proposed algorithm. Unlike an RGB optical sensor, the DVS captures changes in pixel intensity and generates a stream of intensity change events, triggered when the intensity exceeds a predefined threshold. We use aggregated events to generate frame-based representations for use with conventional (non-spiking) neural networks. The representation we use, event frames , retains only the polarity of each event per pixel and discards all sub-frame timing information. Figure 4 shows this representation with the corresponding RGB frame. (a) RGB image. (b) Event frame. Figure 4 : RGB frame and the corresponding DVS event frame representation. Typically, filtering is applied to each representation to remove noise from the event stream, and some representations also flatten event polarities. Gallego et al. 2022 describe the different representations in more detail and typical algorithms for event data. In the LineTracking experiment, we use the dataset collected by ( Resch et al. 2025 ) from real-world driving sessions conducted by non-expert drivers. The dataset consists of 500772 event frames, generated at 100 Hz, each consisting of event data representations of size 128 × 64 × 2 paired with the corresponding control actions \in\mathbb{R}^{3} . Similar to the CarRacing setup, this dataset is used for supervised pretraining of each model across multiple random seeds before fine-tuning within the simulation environment. 4.5.1 Fine-Tuning For fine-tuning, we use a reward function based on the agent’s distance to the reference line, the heading difference, and the rate of change of the steering angle. To allow for slight deviations, each reward modality uses a slack value that indicates whether the task is achieved and is scaled with a weight for each reward modality. To determine the car’s pose, we first map the experimental area with slam_toolbox 1 1 1 https://github.com/SteveMacenski/slam_toolbox and record key points along the marked line. Using the mapped environment, we estimate the agent’s pose via a Monte Carlo-based approach inspired by ( Walsh & Karaman 2017 ) . 5 Results The aim of this paper was to show that models that were pretrained on limited data can be fine-tuned using RTRRL. Our results show that this holds true for both our experiments. In this section, we first discuss pretraining and fine-tuning results for the CarRacing simulation, followed by our results for the real-world LineTracking application. 5.1 CarRacing Pretraining results Figure 11 in the Appendix shows the validation loss curves for pretraining the CarRacing policies, aggregated by model type. Figure 5 left shows the aggregated evaluation reward for the pretrained models when employed in the environment without any tuning. At this point, all pretrained models performed similarly. Fine-Tuning After pretraining, we fine-tuned the models using RTRRL by updating the policy and value functions after each step in the environment. Since RTRRL – the algorithm we use for fine-tuning – is sensible to hyperparameter choices, we conducted a number of hyperparameter sweeps to find a good configuration. We first did two rough grid searches over learning rates for the actor and critic followed by a grid search over entropy regularization strengths. Finally, we did a large-scale Bayesian hyperparameter tuning run that encompassed the learning rates and decay schedules for them, as well as the strength for the parameter change penalty introduced above. We found that a learning rate around 10^{-6} for the actor is best. The critic learning rate appeared to be of less importance with values in the range of 10^{-3} to 10^{-5} being acceptable. Entropy regularization did show negligible impact overall and we decided to move forward without any. Finally, the best choice for the parameter change penalty coefficient resulted to be 10^{-5} . Table 1 shows the final hyperparameter configuration for RTRRL that was used for the remainder of the experiments. Hyperparameter Value Discount factor \gamma 0.99 Eligibility trace decay factor \lambda 0.95 Actor learning rate \alpha_{A} 10^{-6} Critic learning rate \alpha_{C} 10^{-5} Entropy rate \eta_{H} 0 Parameter change penalty rate \eta_{P} 10^{-5} Table 1 : RTRRL hyperparameter configuration for fine-tuning. Figure 6 shows the median cumulative lap reward over 10 laps of fine-tuning for 5 random seeds per model type. A clear upwards trend is visible for all the model types, with LRCs improving the most. Figure 5 right shows the aggregated evaluation reward for the pretrained models after 10 laps of fine-tuning. Note, that during evaluation, the mode of the predicted action policy is executed, as opposed to sampling from it during fine-tuning. All models have improved significantly over the initial reward before fine-tuning. Moreover, LRC results improved the most and showed very consistent results across all models and seeds. To illustrate the effect of fine-tuning in the CarRacing environment, we picked one LrcSSm policy for plotting lap trajectories shown in figure 7 . While the policy was not able to successfully complete the track at first, it quickly adjusted for it within five laps. Figure 5 : Boxplots of evaluation reward on three different tracks for five different pretrained models, aggregated per type. Left shows rewards before fine-tuning – right after. Figure 6 : Lineplot of median evaluation reward on three different tracks for all pretrained models, aggregated per type. Shaded regions depict the standard deviation. Figure 7 : Shown are trajectories of five laps of finetuning a suboptimal policy. Initially, the car goes off the road (red) – but it improves each lap, eventually completing the track (blue). 5.2 Real-world deployment Figure 8 : Boxplots of cumulative rewards for the LineTracking experiment of five different pretrained models, aggregated per type. Left shows rewards before fine-tuning – right after. For the LineTracking task, the agent is placed on a pre-determined starting point on a line marked on the floor with clearly distinguishable tape. The goal of this task is to follow the line as closely as possible, while avoiding rapid steering inputs. For evaluation purposes, we chose an arbitrary point on the line as the start/finish line for this task, to segment the trajectories of the agent into laps. In this instance, we picked the middle of a short straight, as most policies successfully completed this part of the circuit. Pretraining results Figure 12 shows the validation loss curves that were recorded during pretraining of the LineTracking dataset. While LrcSSMs and CT-RNNs achieved comparable results after 2000 epochs, LRUs appeared to be significantly worse. This shortcoming of LRUs became evident when deploying the pretrained models to the real-world car, as none of theses models were able to complete a lap without a large number of human interventions. A boxplot of the number of human interventions is shown in figure 16 in the Appendix. We suspect that the linear state-space model semantics of the LRU model are not expressive enough to satisfactorily capture the steering behavior when used as a single-layer RNN. Due to the poor performance of LRUs, we omitted them from the fine-tuning altogether. Figure 8 left shows the cumulative rewards of the pretrained models over three laps without any fine-tuning. Fine-Tuning Figure 9 : Median cumulative rewards per lap for the LineTracking experiment. Shaded regions show the standard deviation. Figure 10 : Trajectories of five laps of fine-tuning of an LrcSSM policy on the real-world application. Please note that the trajectories have been smoothed slightly to account for noise introduced by the state estimation. For the real-world fine-tuning experiment, we selected the three best pretrained models for LrcSSMs and CT-RNNs and deployed them on the autonomous vehicle. A human operator monitored the car during the experiment and intervened as soon as a significant deviation from the track was observed, maneuvering the car back to a point where the camera has last had clear visibility of the line. Figure 8 right shows the cumulative rewards achieve by the models after fine-tuning and figure 9 shows the cumulative rewards over 10 laps aggregated per model. Surprisingly, we witnessed an immediate improvement in the first lap, hinting at an instantaneous effect of the fine-tuning. From there, the models’ performance seemed to stagnate at first, followed by a significant reduction in standard deviation over the course of the fine-tuning. As an example of the effectiveness of RTRRL on the real-world task, figure 10 shows the trajectories of one of the LrcSSM policies. While the policy initially fails to follow the line (in the lower left of the figure), it eventually follows it in successive laps. Further laps also show reduced oscillations around the target line. 6 Discussion In this paper, we asked the question whether online fine-tuning of a pretrained policy can be done by using RTRRL – a biologically plausible forward-only reinforcement learning algorithm. To this end, we created a static dataset of human control inputs, and employed behavioral cloning to pretrain a combined convolutional and recurrent policy that predicts actions from pixels. We then fine-tune the policy online using RTRRL – updating parameters after each step – to improve the policy on the fly. Our experimental results show substantial improvements in the simulated CarRacing environment that carry over to our real-world LineTracking example. Appendix A RTRRL Algorithm Details Algorithm 1 below outlines the steps of RTRRL. Algorithm 1 Real-Time Recurrent Reinforcement Learning ( Lemmel & Grosu 2025 ) 0: Linear actor policy: \pi_{\theta_{A}}(a|h) , linear critic value-function: \hat{v}_{\theta_{C}}(h) , and recurrent layer: RNN {}_{\theta_{R}}([o,a,r],h,\hat{J}) 1: \theta_{A},\theta_{C},\theta_{R}\leftarrow initialize network parameters 2: B_{A},B_{C}\leftarrow initialize feedback matrices 3: h,e_{A},e_{C},e_{R}\leftarrow\mathbf{0} 4: o\leftarrow reset environment 5: h,\hat{J}\leftarrow RNN {}_{\theta_{R}}([o,\mathbf{0},0],h,\mathbf{0}) 6: v\leftarrow\hat{v}_{\theta_{C}}(h) 7: while not done do 8: \pi\leftarrow\pi_{\theta_{A}}(h) 9: a\leftarrow sample( \pi ) 10: o,r\leftarrow take action a 11: h^{\prime},\hat{J}^{\prime}\leftarrow RNN {}_{\theta_{R}}([o,a,r],h,\hat{J}) 12: e_{C}\leftarrow\gamma\lambda_{C}e_{C}+\nabla_{\theta_{C}}\hat{v} 13: e_{A}\leftarrow\gamma\lambda_{A}e_{A}+\nabla_{\theta_{A}}\log\pi[a] 14: g_{C}\leftarrow B_{C}\mathbf{1} 15: g_{A}\leftarrow B_{A}\nabla_{\pi}\log\ \pi[a] 16: e_{R}\leftarrow\gamma\lambda_{R}e_{R}+\hat{J}(g_{C}+\eta_{A}g_{A}) 17: v^{\prime}\leftarrow\hat{v}_{\theta_{C}}(h^{\prime}) 18: \delta\leftarrow r+\gamma v^{\prime}-v 19: \theta_{C}\leftarrow\theta_{C}+\alpha_{C}\delta e_{C} 20: \theta_{A}\leftarrow\theta_{A}+\alpha_{A}\delta e_{A} 21: \theta_{R}\leftarrow\theta_{R}+\alpha_{R}\delta e_{R} 22: v\leftarrow v^{\prime},\quad h\leftarrow h^{\prime},\quad\hat{J}\leftarrow\hat{J}^{\prime} 23: end while Appendix B Additional Pre-training Results We show the validation loss curves from pre-training on the CarRacing and LineTracking dataset in Fig. 11 and 12 , respectively. Figure 11 : Mean validation loss during pretraining on the CarRacing dataset. Shown is the mean reward of five seeds per model type with standard deviation shown as shaded regions. Figure 12 : Mean validation loss during pretraining on the LineTracking dataset. Shown is the mean reward of five seeds per model type with standard deviation shown as shaded regions. CT-RNN Figure 13 : Left: Exemplary decoded images predicted by the CNN autoencoder after pretraining on the CarRacing dataset. Right: Actions predicted by the pretrained policy. Figure 14 : Left: Exemplary decoded images predicted by the CNN autoencoder after pretraining on the LineTracking dataset. Right: Actions predicted by the pretrained policy. Appendix C LineTracking Fine-tuning Progress C.1 Pre-trained Trajectories (a) CT-RNN. (b) LRU. (c) LRC. Figure 15 : Trajectories of policies without fine-tuning. Crosses indicate manual intervention, and circles indicate the resumption by the policy. Figure 16 : Number of interventions per lap of the pre-trained LineTracking models. C.2 Policies During Fine-tuning (a) CT-RNN. (b) LRC. Figure 17 : Trajectories of policies with fine-tuning. Laps that required manual intervention were terminated upon intervention.