Stateless Yet Not Forgetful: Implicit Memory as a Hidden Channel in LLMs

Ahmed Salem, Andrew Paverd, Sahar AbdelnabiarXiv 2026

TL;DR

This paper challenges the conventional wisdom that Large Language Models (LLMs) are entirely stateless across independent sessions. The authors demonstrate implicit memory: a mechanism where an LLM embeds hidden state information within its own text outputs, which it then decodes and updates when those outputs are later reingested as inputs. As a proof of concept, they introduce temporal backdoors ("time bombs")—exploits that remain dormant until a specific sequence of hidden conditions is accumulated across multiple independent interactions.

What Problem Does This Paper Address?

In standard deployments, LLMs are assumed to be stateless. Once an API call or chat session ends, the model retains no memory of the interaction unless an external system explicitly stores and feeds it back (e.g., via chat history or Retrieval-Augmented Generation).

However, the authors identify a massive blind spot: in real-world workflows, LLM outputs are routinely reingested as inputs. For instance, a code assistant generates code that a user later asks it to refactor, or an enterprise bot drafts an email that is subsequently summarized by another model instance. This paper investigates whether this reingestion loop can act as a hidden communication channel, allowing models to pass state across time and sessions without any explicit memory architecture.

Methods

The authors formalize implicit memory and demonstrate how it can be deliberately induced using two primary methods: prompting (system instructions) and fine-tuning (modifying model weights).

To carry the hidden state through text, they explore two encoding strategies:

  1. Non-printing characters (NPCs): Using invisible Unicode characters (like Zero-Width Non-Joiners) to act as binary bits.
  2. Steganographic/Semantic encodings: Hiding information in high-level structural choices of the text, such as the exact number of examples provided, the industry domain chosen, or specific sentiment trajectories.

The "Time Bomb" Case Study

To show the security risks of this capability, the authors design a temporal backdoor. The model is tasked with tracking eight distinct semantic signals related to financial distress (e.g., "net loss," "payroll default"). Across separate interactions, the model performs a bitwise OR operation: it reads the hidden state from the incoming text, checks if any new distress signals are present in the current user prompt, updates the 8-bit vector, and embeds the new state into its output.

Fig. 4. Overview of the temporal backdoor (“time bomb”) mechanism. Hidden state is accumulated across reingested outputs and triggers a payload only once all conditions are satisfied.

Only when all 8 bits are successfully set to 1 does the backdoor activate, causing the model to output a malicious payload (in this case, aggressively recommending a fictional cryptocurrency called "Tutankhamoolah").

Datasets

The authors evaluated their approach using a combination of synthetic and standard datasets:

  • Time-Bomb Dataset: A custom synthetic dataset generated via GPT-4o containing 6,000 user queries mapped to zero or more of the eight financial distress signals. An LLM judge was used to ensure ground-truth label correctness.
  • State Propagation Dataset: 30,000 inputs created by pairing the initial queries with randomly sampled 8-bit vectors to simulate prior interaction histories.
  • Alpaca Dataset: Approximately 41,000 benign instruction-following samples mixed into the training data during the fine-tuning experiments to ensure the model maintained its standard utility and didn't degrade in performance.

Key Insights and Ideas

  • The Environment as a Substrate: Implicit memory turns the external environment (web pages, code repositories, email threads) into a memory storage layer for the LLM.
  • Reasoning Models are Better Vectors: Advanced "reasoning" models (like OpenAI's o-series) are significantly more effective at executing implicit memory via prompting than standard models. Their internal chain-of-thought allows them to reliably parse, update, and re-encode hidden states.
  • The Stealth vs. Robustness Trade-off: Invisible Unicode characters are highly efficient and easy for models to use, but they are fragile and easily stripped by basic text normalization. Conversely, semantic encodings (hiding data in text structure) easily survive heavy paraphrasing and cleaning defenses, though they are currently harder for models to generate reliably via simple prompting.

Key Results

  • Prompting vs. Fine-Tuning: Fine-tuning open-weight models (such as Llama 3.1 and Qwen 2.5) yielded much more stable and dangerous time bombs than prompting alone. Fine-tuned models consistently kept false activation rates below 2% while maintaining correct backdoor activation rates between 90.1% and 98.4%.
  • Benign Utility Preservation: Models fine-tuned with the hidden time bomb showed negligible differences (<1%) in validation perplexity and average loss compared to clean baselines, making the backdoor incredibly difficult to detect through standard performance benchmarking.
  • Semantic Robustness: When using high-level text structures to encode the hidden state, the joint accuracy of the encoding survived aggressive LLM-based paraphrasing defenses with only a minor drop (from 98% down to 95%).

Limitations and Future Work

The authors note a few core limitations of implicit memory in its current form:

  • Append-Only Nature: Because an LLM cannot guarantee it is always reingesting its latest output, it can reliably add information to the implicit memory state but cannot safely delete or decrement state without risking synchronization errors.
  • Generation Complexity: While semantic encodings are highly robust against defenses, current models struggle to generate them reliably via zero-shot prompting (achieving only an 18% joint success rate in tests).

Future Directions: The paper calls for the AI safety community to move away from purely single-interaction safety testing. They recommend developing continuous steganalysis monitoring tools, building multi-turn benchmarks to explicitly test for covert persistence, and studying "experimental model organisms"—simplified models trained specifically to see if implicit memory can emerge organically under optimization pressures.

Summary updated

Abstract

Large language models (LLMs) are commonly treated as stateless: once an interaction ends, no information is assumed to persist unless it is explicitly stored and re-supplied. We challenge this assumption by introducing implicit memory-the ability of a model to carry state across otherwise independent interactions by encoding information in its own outputs and later recovering it when those outputs are reintroduced as input. This mechanism does not require any explicit memory module, yet it creates a persistent information channel across inference requests. As a concrete demonstration, we introduce a new class of temporal backdoors, which we call time bombs. Unlike conventional backdoors that activate on a single trigger input, time bombs activate only after a sequence of interactions satisfies hidden conditions accumulated via implicit memory. We show that such behavior can be induced today through straightforward prompting or fine-tuning. Beyond this case study, we analyze broader implications of implicit memory, including covert inter-agent communication, benchmark contamination, targeted manipulation, and training-data poisoning. Finally, we discuss detection challenges and outline directions for stress-testing and evaluation, with the goal of anticipating and controlling future developments. To promote future research, we release code and data at: https://github.com/microsoft/implicitMemory.
BibTeX
@misc{salem2026stateless,
  author = {Ahmed Salem and Andrew Paverd and Sahar Abdelnabi},
  title = {{Stateless Yet Not Forgetful: Implicit Memory as a Hidden Channel in LLMs}},
  year = {2026},
  eprint = {2602.08563},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.08563},
}
Figure