arXiv

MemTrain: Self-Supervised Context Memory Training

Title: MemTrain: Enhancing LLM Context Memory via Self-Supervised Training

Abstract:

For long-horizon Large Language Model (LLM) agents, memory is a critical function that allows them to retain and leverage information gathered over prolonged interactions. Current methods for training memory-aware agents usually rely on end-to-end reinforcement learning applied directly to downstream tasks. However, this approach faces significant hurdles: acquiring high-quality, annotated data for complex memory scenarios is expensive, and the resulting datasets often lack the diversity needed to capture a broad spectrum of general memory behaviors.

To address these limitations, we introduce MemTrain, a self-supervised framework designed to broadly strengthen the context-memory capabilities of LLM agents, thereby facilitating more effective post-training for specific tasks. MemTrain leverages unlabeled Wikipedia datasets to construct two coupled proxy tasks. The first is an end-to-end masked reconstruction objective, which challenges the model to recover masked entities following multiple rounds of memory updates. This mechanism promotes the maintenance of memory from the perspective of the final output. The second is an intermediate memory recall objective, requiring the model to reconstruct masked historical data using intermediate memory states. This encourages faithful compression and ensures memory completeness throughout the interaction. Both objectives are optimized jointly using GRPO.

Our extensive evaluations on long-text question answering and search-based QA benchmarks reveal that MemTrain consistently boosts memory-intensive reasoning performance across various models. Notably, it achieves improvements of up to 17.67 points compared to direct task-specific post-training.


Source: arXiv Generated at: 2026-06-03 00:00:00 UTC

Related Articles

TechCrunch

The world’s largest privately owned laser just turned on

Xcimer Energy activated the Phoenix laser, the world’s largest privately owned laser, aiming to commercialize fusion pow...

Uber Targets Doubling Its Fleet of Electric Motorcycles in Kenya
Bloomberg

Uber Targets Doubling Its Fleet of Electric Motorcycles in Kenya

Uber plans to double its electric motorcycle fleet in Kenya. This expansion aims to enhance sustainable transport option...

AI Saves Time But Most Companies Waste the Gain, Study Shows
Bloomberg

AI Saves Time But Most Companies Waste the Gain, Study Shows

A study reveals that while AI saves employee time, most companies fail to capitalize on these gains, squandering potenti...

JPMorgan Lifts S&P Target on Earnings 'Supercycle'
Bloomberg

JPMorgan Lifts S&P Target on Earnings 'Supercycle'

JPMorgan raised its S&P 500 target, citing an earnings “supercycle” that reflects heightened confidence in corporate pro...

Europe Sleepwalking Into Economic Ruin, Serb Leader Says
Bloomberg

Europe Sleepwalking Into Economic Ruin, Serb Leader Says

Serbian leader warns Europe is sleepwalking into economic ruin.

Delta Electronics Flags Power Crunch
Bloomberg

Delta Electronics Flags Power Crunch

Delta Electronics warns of a looming power deficit due to surging demand and constrained production, predicting serious ...