arXiv Science⌕ Search

arXiv subjects

Johan Lindqvist

Publications and source records attributed to Johan Lindqvist.

3 recordsLinked to original sources

The Role of Recurrent Memory in Event-Based Vision

Memory is essential for event-based vision. Event cameras respond to changes in brightness and objects with little motion relative to the camera can generate few events. Detection thus relies on memory from earlier observations. Prior recurrent detectors address this challenge, but truncate backpropagation through time to approximately one second of events. We lift this limit with a $60\times$ longer gradient horizon and train decoupled temporal modules on frozen spatial features. To process temporal information, we compare recently proposed state-space models and stateful linear attention variants, which differ in their update rules governing what the model can retain and forget over time, as well as in their state-tracking capabilities. We introduce an event-based shell game to inspect permutation tracking performance, which has been linked to improved reasoning capabilities in large language models. We find that models that perform best in this controlled setting are also the strongest detectors on event recordings, particularly when current evidence is insufficient. Stacking these recurrent blocks with depth-scaled training further improves detection, in line with theoretical guarantees established for state tracking. The resulting detector outperforms existing methods on Gen1 and 1Mpx.

cs.CV↗

Eliciting the Recall Capacity of Linear Attention

Linear attention models exhibit a disproportionate deficit relative to softmax attention in associative recall (AR) in language modeling. We investigate this gap through natural language evaluations, synthetic recall tasks, and targeted training interventions. Using a synthetic setting, we quantify the role of state-size in how many items can be recalled from memory and find a similar empirical scaling across the tested linear-attention architectures. Testing this relationship reveals that even a single layer at scale can learn to retrieve thousands of associations across long distances. Yet, standard language model training does not reliably teach a linear model to copy from context, whereas a comparable softmax model learns to do so. Considering this, we strengthen recall supervision during training through in-context sentence repetition and context-sensitive loss reweighting. Both methods improve recall-intensive benchmark performance and narrow the long-distance AR gap to the softmax baseline without changing the architecture, token budget, or number of optimization steps, at a slight cost to general language modeling. These targeted changes to training can thus elicit substantial but underutilized retrieval capacity in linear-attention models. These findings suggest that, although linear-attention architectures have substantial capacity for recall, their inductive biases and the demands of language model training make it difficult to develop this capability without dedicated incentives.

cs.LG↗

Reproducibility Report: Test-Time Training on Nearest Neighbors for Large Language Models

We reproduce the central claims of Test-Time Training on Nearest Neighbors for Large Language Models (Hardt and Sun, 2024), which proposes adapting a language model at inference time by fine-tuning on retrieved nearest-neighbor sequences. Using pretrained RoBERTa embeddings indexed with Faiss, we retrieve 20 neighbors per test input and apply one gradient update per neighbor across GPT-2 (117M, 774M), GPT-Neo (1.3B), and R1-Distilled-Qwen2.5-1.5B. Our experiments confirm that test-time training significantly reduces perplexity and bits-per-byte metrics across diverse domains from The Pile, with the largest improvements in structured or specialized datasets such as GitHub and EuroParl. We further validate that models not pretrained on The Pile benefit more from this adaptation than models already trained on similar data, allowing smaller models to approach the performance of larger ones. Due to infrastructure limitations, we introduce a memory-efficient retrieval implementation that loads only required line offsets rather than entire files, reducing RAM requirements from over 128 GB per server to 32 GB. We also extend the original study by evaluating R1-Distilled-Qwen2.5-1.5B, showing that test-time training yields consistent gains even for modern reasoning-optimized architectures. Overall, our results support the robustness and generality of nearest-neighbor test-time training while highlighting practical considerations for reproducing large-scale retrieval-augmented adaptation.

cs.CL↗