← Latest papers
💻 computer science

AutoMem: A Text-Gradient Recursive Self-Improvement Framework for Automated Memory Architectures Search

The paper proposes AutoMem, a text-gradient recursive self-improvement framework that automatically discovers task-adaptive memory architectures by combining experience-guided search with failure-guided module diagnosis, consistently outperforming human-designed baselines while improving accuracy-efficiency trade-offs.

Original authors: Lin Du, Jie Zhou, Yuxuan Cai, Kai Chen, Qin Chen, Xin Li, Bo Zhang, Wei Li, Liang He

Published 2026-08-18
📖 6 min read🧠 Deep dive

Original authors: Lin Du, Jie Zhou, Yuxuan Cai, Kai Chen, Qin Chen, Xin Li, Bo Zhang, Wei Li, Liang He

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Artificial intelligence has reached a point where large language models can act as agents, capable of planning, using tools, and navigating the web to solve complex problems. To do this effectively, these agents need a way to remember things, much like a human relies on long-term memory to recall past lessons, facts, and strategies. However, building this memory for a machine is not as simple as adding a single notebook. It involves a series of decisions: what information should be written down, how it should be stored, how the agent finds it when needed, and how old or useless entries are removed. For years, researchers have built these memory systems by hand, choosing one specific design and sticking with it for every task. But just as a carpenter would not use the same tool for every job, a one-size-fits-all memory system often fails when the task changes.

A team of researchers at East China Normal University and the Shanghai AI Laboratory has tackled this problem by treating memory not as a fixed invention, but as a puzzle to be solved for each specific job. They built a system called AUTOMEM, which automatically searches for the best possible memory design for a given task. Instead of a human engineer guessing which combination of storage and retrieval methods works best, this system tests thousands of different configurations, learns from its mistakes, and refines its choices until it finds a setup that outperforms even the most skilled human-designed systems. The result is a memory architecture that adapts to the specific needs of the problem, whether it is navigating a website, solving a multi-step reasoning challenge, or digging deep into search results.

The researchers began by breaking down the concept of agent memory into four distinct parts, similar to how a library is organized. First, there is the encoder, which decides what information is worth saving. Second is the store, which determines how that information is kept, such as in a simple list, a complex web of connections, or a structured database. Third is the retriever, the mechanism that finds the right piece of information when the agent needs it. Finally, there is the manager, which handles the lifecycle of the memory, deleting old or conflicting data to keep the system efficient. By mixing and matching different options for each of these four parts, the researchers created a vast space of possible memory designs. Their initial experiments revealed a crucial truth: no single design works best for everything. A memory system that excels at solving math problems might fail miserably at navigating a website, and the best combination for one computer model might be poor for another.

To navigate this vast space of possibilities without wasting time and computing power, the team developed a method that learns from failure. When the system tries a memory design and the agent fails to solve a task, the system does not just discard the attempt. Instead, it acts like a careful investigator, analyzing exactly where the breakdown occurred. Did the agent fail because it never wrote down the right clue? Was the information stored in a format that was impossible to find? Did it pull up the wrong memory? Or did it hold onto too much outdated information? The system pinpoints the specific part of the memory process that caused the error and translates that technical failure into plain language instructions. It tells the search process, "The problem was in how we stored the data; try a different format next time."

This process of diagnosis and adjustment happens in a loop. The system proposes a new memory design based on what it has learned from previous failures, tests it, and then analyzes the results again. Over just a few rounds of this self-improvement, the system converges on a highly effective architecture. In their tests, the researchers used three different challenging benchmarks: a set of complex reasoning questions, a series of deep web navigation tasks, and a collection of difficult search queries. They ran these tests using two different powerful computer models as the agents. In every case, the memory architecture discovered by the system was superior to the best human-designed alternatives. On the reasoning benchmark, the system improved accuracy by nearly four percentage points compared to the strongest fixed memory system. On the web navigation task, it improved accuracy by nearly four points as well, and on the deep search challenge, it gained one full percentage point.

Beyond just being more accurate, the system also proved to be more efficient. The memory designs it found often required fewer computing resources to run. For instance, on the reasoning benchmark, the system achieved its higher accuracy while using significantly fewer tokens, which is a measure of the computational cost of processing text. This suggests that the system did not just find a way to work harder, but a way to work smarter. It discovered that for some tasks, the best approach was to store information in a graph-like structure that links related facts together, while for others, a simple structured list was more effective. For web navigation, it found that a mix of text and structured data worked best, whereas for deep search, it favored a system that could easily rerank past solutions to find the most relevant ones.

The researchers also tested whether their method was truly learning or just getting lucky. They compared their guided search against a method that simply picked memory designs at random. The random method occasionally found a good design, but it was inconsistent and often wasted resources testing designs that were clearly inferior. The guided system, by contrast, improved steadily with every round of testing, finding a better solution in half the time and with half the computational cost of the random approach. This confirmed that the system's ability to diagnose failures and translate them into specific instructions was the key to its success. Without this feedback loop, the system struggled to improve, often getting stuck in designs that were costly but ineffective.

The study concludes that the future of artificial intelligence agents lies not in building a single, perfect memory system, but in creating systems that can adapt their memory to the task at hand. The researchers found that the best memory design depends heavily on the specific nature of the work the agent is doing and the computer model it is running on. A design that works for one agent on one type of problem can be a hindrance on another. By automating the search for these designs, the team has shown that it is possible to build agents that are not only smarter but also more efficient. The work suggests that as artificial intelligence becomes more integrated into complex real-world tasks, the ability to dynamically tune how an agent remembers and uses information will be just as important as the intelligence of the agent itself. The system does not replace human ingenuity but rather extends it, allowing computers to find the right tools for the job in a way that is too complex for a human to design manually.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →