Manuscript Offprint

arXiv:2609.04490

When Quantization Breaks Memory: Recurrent-State Write-Back in Low-Precision Temporal Inference

Ismail Erbas, Xavier Intes, Vikas Pandey

Ismail Erbas*

Department of Biomedical Engineering Center for Modeling, Simulation, and Imaging in Medicine Rensselaer Polytechnic Institute Troy, NY 12180 erbasi@rpi.edu

Xavier Intes

Department of Biomedical Engineering Center for Modeling, Simulation, and Imaging in Medicine Rensselaer Polytechnic Institute Troy, NY 12180

Vikas Pandey

Department of Biomedical Engineering Center for Modeling, Simulation, and Imaging in Medicine Rensselaer Polytechnic Institute Troy, NY 12180

Abstract

Quantization is widely used to reduce the computational and memory demands of neural-network inference. In recurrent networks, however, the quantized state is stored and returned to the network at the next time step, so the rule used to store that state can alter the subsequent chain of computations. Here, we introduce the term recurrent-state write-back to denote this rule and isolate its effect in a compact GRU encoder–decoder for fluorescence lifetime imaging, a molecular imaging modality with applications in quantitative biological imaging. A central task in this setting is estimating two lifetime parameters, the short-lived component τ1\tau_1 and the long-lived component τ2\tau_2, from high-noise time-resolved fluorescence signals. Holding the trained model fixed, replacing continuous state propagation with deterministic 4-bit state storage increases the estimation errors for τ1\tau_1 and τ2\tau_2 by approximately 70-fold and 300-fold, respectively. Failure occurs when repeated small updates remain below the write threshold, leaving the stored state nearly fixed while the network continues to propose change. Error feedback, residual memory, and direction memory carry information from these suppressed updates across time and recover accuracy without retraining. Precision sweeps show that increasing state precision can worsen a fixed recurrent solution, while matched training shows that compatibility with the state interface can be learned. To test whether this behavior extends beyond the GRU, we repeat the post-training intervention in an independently trained LSTM, where coarse write-back reproduces the failure, error feedback restores accuracy, and state-specific interventions reveal substantially greater sensitivity of the cell state than the hidden state. Our results establish recurrent-state write-back as a key determinant of low-precision recurrent dynamics and identify the state-storage interface as a central design consideration for quantized recurrent inference.

*Corresponding author. Preprint.

1 Introduction

Quantization has become a standard approach for reducing the memory, arithmetic, and data-movement costs of neural-network inference [1–3]. Its effect is especially consequential in recurrent networks, where an internal state is stored after each step and returned to the network to generate the next [4, 5]. The stored state therefore serves as both memory of the preceding sequence and input to future computation. Changing how this state is represented can consequently change the sequence of states that the network visits over time. For low-precision recurrent inference, the state-storage operation is therefore part of the temporal computation that is executed at deployment.

Recurrent networks can operate accurately at low precision when the constraint is present during training: weights, activations, gates, and recurrent states can all be learned at reduced bit widths [6, 7]. Because the numerical representation is fixed before learning begins, the network forms its dynamics around it, and quantization-aware training is therefore often treated as the remedy for low-precision degradation. Two observations show that the remedy is incomplete. First, deployment can reverse the order of constraint and learning: a trained network may be mapped to a coarser representation to satisfy computational or hardware constraints, without retraining [8, 9]. Every stored state is then written through a numerical interface the network never trained with, and a storage rule its learned dynamics do not expect can withhold the state updates they depend on. Second, even when the constraint is present throughout training, coarse state precision can leave an accuracy gap that further optimization does not close, and the mechanism behind the gap has not been identified. Both observations point to a single operation: the rule that stores the recurrent state between steps. The question is then direct: what does the state-storage rule do to the temporal behavior of a trained recurrent network, and can it produce failures that bit width alone does not explain?

We call the rule that determines this stored value recurrent-state write-back: the mapping from the state computed at recurrent step tt to the value stored and presented to step t+1t+1. Deterministic low-precision write-back rounds the computed state to the nearest representable level. Updates that remain within the corresponding write boundary leave the stored state unchanged and therefore do not enter the state observed by the next recurrent step. This becomes consequential when the network repeatedly proposes small changes in the same direction across successive steps. The computed recurrence can continue to propose movement while the stored trajectory remains unchanged. Recurrent-state write-back therefore determines when computed state changes become visible to future computation and how temporally distributed information is carried through a quantized recurrence.

We study this problem in fluorescence lifetime imaging (FLI), where quantitative molecular information is encoded in the temporal profile of fluorescence emission [10–13]. FLI provides sensitivity to molecular interactions and local microenvironmental changes, with demonstrated applications in tumor visualization, targeted drug delivery, and molecular target engagement [14–17, 13]. In biomedical imaging settings that require rapid feedback, including image-guided intervention, time-resolved fluorescence measurements must be converted efficiently into quantitative lifetime estimates, motivating compact models capable of low-latency inference. Each pixel provides a high-noise time-resolved fluorescence signal whose temporal structure reflects fluorescence decay kinetics, photon statistics, and the acquisition response. The inference targets are the short- and long-fluorescence lifetimes, τ1\tau_1 and τ2\tau_2; for sample ii, we denote the corresponding parameter vector by θi=(τ1,i,τ2,i)\boldsymbol{\theta}_i = (\tau_1, i, \tau_2, i).

The recurrent model used here is Seq2SeqLite, the compact student architecture derived from the Seq2Seq framework for time-resolved fluorescence reconstruction and lifetime estimation [18–20]. Seq2SeqLite uses a single-layer 32-unit GRU encoder-decoder with 6,627 trainable parameters and was selected in the associated compression and deployment studies for low-precision inference. Those studies document the second observation above: 8-bit precision was adopted as the operating point because 4-bit inference fell short of the required accuracy even when the constraint was present during training, and the mechanism behind the shortfall was not identified. Seq2SeqLite therefore provides a natural setting for the present question: its compact recurrent state and documented 4-bit shortfall allow the state-storage interface to be examined while retaining the same fluorescence-lifetime inference task. The encoder processes 135 temporal samples and compresses the measured signal into a recurrent state; the decoder reconstructs deconvolved temporal output sequences whose integrated shape yields the lifetime estimates θ^i=(τ^1,i,τ^2,i)\hat{\boldsymbol{\theta}}_i = (\hat{\tau}_{1,i}, \hat{\tau}_{2,i}). Because these parameter estimates depend on temporal structure accumulated across the sequence, FLI example provides a sensitive setting for examining how recurrent-state storage affects temporally distributed information.

This setting lets us test, under controlled conditions, whether the state-storage rule can alter a trained recurrent network by withholding proposed state changes from the state visible to future recurrent steps. To isolate storage from learning, we intervene on trained networks without retraining them: each checkpoint is reconstructed, verified to reproduce its native implementation, and re-evaluated with only the recurrent-state write-back rule replaced, while the trained weights, recurrent update, readout, inputs, and evaluation procedure remain fixed. If storage alone is responsible, this single change should break the network, the failing trajectory should show the predicted suppression of proposed state changes, and preserving the suppressed information should restore accuracy in the same fixed network; all three predictions are examined directly. We then separate state precision from state-interface compatibility, by changing precision after training and by training matched models around different recurrent-memory interfaces, and finally repeat the post-training intervention in an independently trained 32-unit LSTM to ask whether the mechanism extends beyond the GRU and whether its consequences depend on which recurrent variable stores the affected information.

This study establishes recurrent-state write-back as a distinct design variable in low-precision recurrent inference. By changing only the storage rule while holding the trained computation fixed, we isolate a direct causal link between state write-back and the trajectory a recurrent network executes, and we identify persistent suppression of proposed state changes as the temporal mechanism behind the resulting degradation. Two tools make the mechanism measurable and correctable. The recurrent write margin compares each proposed recurrent-state change with the half-step of the state quantizer and so indicates directly whether that change can enter the recurrence-visible trajectory under deterministic write-back. Direction memory, introduced here, retains the direction of persistent sub-threshold proposed changes in a compact auxiliary counter and converts accumulated same-direction evidence into a later state transition; together with error feedback and residual memory, it restores accurate inference in fixed networks without retraining. The central result is that write-back is part of the temporal computation a deployed network executes, not a passive encoding of a trajectory the network would produce anyway: precision sweeps and matched training show that the relevant property is not bit width alone but the compatibility between a learned recurrent solution and the interface through which it is executed, and an independently trained LSTM reproduces the failure, its rescue, and a strong dependence on which recurrent variable stores the affected information.

References (18)