  In lung radiotherapy, infrared cameras can record the location of reflective
objects on the chest to infer the position of the tumor moving due to
breathing, but treatment system latencies hinder radiation beam precision.
Real-time recurrent learning (RTRL), is a potential solution as it can learn
patterns within non-stationary respiratory data but has high complexity. This
study assesses the capabilities of resource-efficient online RNN algorithms,
namely unbiased online recurrent optimization (UORO), sparse-1 step
approximation (SnAp-1), and decoupled neural interfaces (DNI) to forecast
respiratory motion during radiotherapy treatment accurately. We use time series
containing the 3D position of external markers on the chest of healthy
subjects. We propose efficient implementations for SnAp-1 and DNI based on
compression of the influence and immediate Jacobian matrices and an accurate
update of the linear coefficients used in credit assignment estimation,
respectively. The original sampling frequency was 10Hz; we performed resampling
at 3.33Hz and 30Hz. We use UORO, SnAp-1, and DNI to forecast each marker's 3D
position with horizons (the time interval in advance for which the prediction
is made) h<=2.1s and compare them with RTRL, least mean squares, and linear
regression. RNNs trained online achieved similar or better accuracy than most
previous works using larger training databases and deep learning, even though
we used only the first minute of each sequence to predict motion within that
exact sequence. SnAp-1 had the lowest normalized root mean square errors
(nRMSE) averaged over the horizon values considered, equal to 0.335 and 0.157,
at 3.33Hz and 10.0Hz, respectively. Similarly, UORO had the highest accuracy at
30Hz, with an nRMSE of 0.0897. DNI's inference time, equal to 6.8ms per time
step at 30Hz (Intel Core i7-13700 CPU), was the lowest among the RNN methods
examined.
