AlphaMemo: Structured Search-Process Memory for Self-Evolving Alpha Mining Agents

Hang Yu, Zifan Zheng, Jeff Z. Pan, Tongliang Liu, Zhiyong Wang, Fengxiang HearXiv 2026

TL;DR

AlphaMemo introduces a structured search-process memory for LLM-driven alpha factor mining that tracks how formulas are edited rather than just what the final scores are. By using confidence-gated residual corrections and an asymmetric veto system, it avoids overfitting to noisy financial feedback and significantly boosts factor discovery efficiency.

What Problem Does This Paper Address?

Quantitative finance relies heavily on "alpha factors"—mathematical formulas that predict future asset returns. While Large Language Model (LLM) agents excel at generating these formulaic expressions by combining financial priors and symbolic reasoning, they face severe bottlenecks in financial domains: the search space is combinatorially massive, financial feedback is incredibly noisy and non-stationary, and agents frequently suffer from overfitting.

Current self-evolving LLM agents try to learn from past attempts by saving final factor scores or dumping full text histories into prompts. The authors argue this is too coarse for effective credit assignment; it doesn't tell the agent which specific local modification (e.g., adding a volume gate or changing a time window) actually caused the factor to succeed or fail. This lack of granular process memory leads to redundant discoveries and fragile, overfitted strategies.

Methods

AlphaMemo shifts the focus from memorizing final outcomes to tracking the search process itself through a framework called Structured Search-Process Memory (SSPM).

Figure 1: Architecture of AlphaMemo. The framework combines a search-ledger prior with Structured Search- Process Memory (SSPM) over AST-diff edit motifs. Parent-edit actions are scored through confidence-gated residual fusion, filtered by an asymmetric process veto, and updated after evaluation with residual and failure observations.

The method relies on four core components:

  • Structured Search-Process Memory (SSPM): Instead of storing factors as isolated nodes, it stores the edges (the edits). It records the parent factor context, the specific edit motif, the residual performance gain over baseline expectations, and the success/failure status.
  • AST-diff Edit Motifs: To understand what the LLM actually changed, AlphaMemo computes the difference between the Abstract Syntax Trees (ASTs) of the parent and child formulas. It maps these differences to a compact vocabulary of structural edits (e.g., rank switches, window rescaling, condition gates).
  • Confidence-Gated Residual Fusion: When scoring potential parent-edit actions, AlphaMemo adds a memory correction (residual) on top of a base search-ledger prior. If data is sparse or highly volatile, a confidence gate dampens the memory's influence, safely falling back to the base search prior.
  • Asymmetric Process Veto (APV): Recognizing that positive alpha signals are fragile and regime-dependent, but failure modes (like invalid syntax or extreme complexity) are stable, AlphaMemo uses memory conservatively. High-confidence negative patterns trigger a hard veto to prune the action space, whereas positive patterns only provide a soft preference boost.
Figure 2: Algorithmic flow of AlphaMemo. At each iteration, AlphaMemo scores parent-edit actions using a search-ledger prior and confidence-gated SSPM resid- uals, applies asymmetric vetoes to unreliable actions, generates child factors with the LLM, and updates the ledger and memory with evaluation feedback.

Datasets

The authors evaluated AlphaMemo using the open-source Qlib quantitative platform across two major equity universes:

  • CSI 500 (representing Chinese A-shares)
  • S&P 500 (representing US Large Caps)

The data split used market features from 2016–2020 for training, 2021 for validation, and a completely held-out test/backtest period from 2022–2025 under a standard 20-trading-day prediction horizon.

Key Insights and Ideas

  • Edges > Nodes for Credit Assignment: In symbolic search, knowing how you changed a formula to make it better is far more reusable than just knowing a specific formula was good. Storing edge-level evidence allows the agent to transfer search insights across surface-level expression variants.
  • Asymmetry in Financial Search: Success in alpha mining is often fleeting and regime-dependent, but failure is structural. Therefore, memory should be used strictly to veto known bad moves rather than blindly double-down on past lucky breaks.
  • Residual Learning Prevents Overfitting: By modeling memory as a correction (residual) to a strong base search prior rather than an unconstrained controller, the agent avoids getting trapped in local optima early in the search.

Key Results

AlphaMemo was tested in two configurations: Balanced (keeping memory as a weak residual prior) and Residual (giving memory a stronger role after a longer warmup).

Figure 3: Memory calibration across AlphaMemo operating points and internal diagnostics. Search-ledger only removes process memory. APV-only keeps negative process vetoes. Balanced and residual are the two operating points reported in Table 2. Higher is better for both RankICIR and Sharpe.
  • Predictive & Portfolio Performance: On the CSI 500, AlphaMemo (Balanced) achieved a RankICIR (predictive stability) of 0.4597 and a Sharpe ratio of 0.6109, substantially outperforming state-of-the-art baselines like AlphaGen (0.4156 RankICIR, 0.4040 Sharpe). On the S&P 500, AlphaMemo (Residual) reached a Sharpe ratio of 1.0672 and an annualized return of 23.65%.
  • Search Efficiency: In fixed-budget discovery tests, AlphaMemo found 76.0 mean effective factors, compared to only 52.4 for a standard search-ledger agent without process memory, proving its superior search efficiency under identical generation budgets.

Limitations and Future Work

  • Dependency on Structure: The method heavily relies on having an executable formula parser and a well-defined symbolic operator grammar. It cannot easily handle unstructured code or free-form text strategies.
  • Data Requirements: SSPM requires a medium-to-long search budget to accumulate enough repeated edit observations before the confidence gates activate the memory.
  • Offline Constraints: The current framework is designed for offline alpha discovery. Deploying it in live trading systems would require additional operational checks and integration with richer, dynamic market states.

Summary updated

BibTeX
@misc{yu2026alphamemo,
  author = {Hang Yu and Zifan Zheng and Jeff Z. Pan and Tongliang Liu and Zhiyong Wang and Fengxiang He},
  title = {{AlphaMemo: Structured Search-Process Memory for Self-Evolving Alpha Mining Agents}},
  year = {2026},
  eprint = {2606.20625},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.20625},
}
Figure