CosmosAlpha: Multi-Relational Graph Search with Pareto-Guided Exploration for LLM-Driven Alpha Mining
Organizations: Artificial Intelligence and Quantitative Finance Laboratory, School of Physical Sciences, University of Chinese Academy of Sciences · School of Physics and Astronomy, Shanghai Jiao Tong University · School of Fundamental Physics and Mathematical Sciences, Hangzhou Institute for Advanced Study, UCAS
Abstract
Discovering predictive alpha factors from noisy financial data is a fundamental yet challenging problem in quantitative finance. LLM-driven formulaic alpha mining offers an attractive paradigm by combining interpretable symbolic expressions with iterative generation and refinement guided by quantitative feedback. However, existing generation-centric and tree-based search strategies primarily organize factors through generation lineage, leaving structural and statistical relationships across search branches underutilized. Consequently, information remains localized along parent--child trajectories, which can confine exploration to redundant regions. Moreover, effective factor discovery must account for multiple distinct objectives that cannot be adequately captured by a single search criterion. We introduce CosmosAlpha, a graph-based LLM factor-mining framework that represents discovered factors as a multi-relational graph encoding generation lineage, expression-structure similarity, and cross-sectional exposure correlation. A Graph Flow mechanism propagates search utilities across the graph, allowing each factor to be assessed using relational evidence from nearby factors rather than in isolation. Pareto-guided selection jointly considers quality, fertility and diversity, explicitly modeling their trade-offs within a multi-objective search framework. Across CSI 300 and CSI 500, CosmosAlpha-Graph achieves the best mean rank over seven predictive and portfolio metrics and outperforms its controlled CosmosAlpha-MCTS counterpart on every reported metric, showing a consistent advantage for relational graph search in LLM-driven factor mining. The source code is available at https://github.com/wzhmtldswz/CosmosAlpha
Figures & tables
| Predictive Performance | Portfolio Performance | Overall | ||||||
| Method | IC | ICIR | RankIC | RankICIR | ARR (%) | IR | MDD (%) | Mean rank |
| Alpha158 | 0.0320 | 0.3474 | 0.0479 | 0.5668 | 6.32 | 0.3945 | -29.73 | 3.86 |
| GP | 0.0231 | 0.3098 | 0.0300 | 0.4483 | 4.32 | 0.2215 | -42.45 | 9.71 |
| AlphaGen | 0.0301 | 0.3128 | 0.0452 | 0.5461 | 4.25 | 0.2490 | -32.47 | 7.29 |
| AlphaForge | 0.0304 | 0.3404 | 0.0469 | 0.5615 | 6.88 | 0.4164 | -25.41 | 3.86 |
| AlphaSAGE | 0.0243 | 0.2574 | 0.0432 | 0.4750 | 6.57 | 0.4007 | -27.50 | 6.57 |
| Predictive Performance | Portfolio Performance | Overall | ||||||
| Method | IC | ICIR | RankIC | RankICIR | ARR (%) | IR | MDD (%) | Mean rank |
| Alpha158 | 0.0339 | 0.3927 | 0.0618 | 0.7898 | 11.07 | 0.5856 | -28.41 | 4.43 |
| GP | 0.0213 | 0.2752 | 0.0438 | 0.6092 | 12.52 | 0.6101 | -38.06 | 8.57 |
| AlphaGen | 0.0296 | 0.3613 | 0.0573 | 0.7147 | 11.82 | 0.6077 | -34.26 | 6.43 |
| AlphaForge | 0.0284 | 0.3129 | 0.0590 | 0.7076 | 11.08 | 0.5758 | -28.70 | 6.64 |
| AlphaSAGE | 0.0245 | 0.2652 | 0.0531 | 0.6394 | 10.51 | 0.5533 | -27.69 | 8.71 |
| Predictive Performance | Portfolio Performance | ||||||
| Variant | IC | ICIR | RankIC | RankICIR | ARR (%) | IR | MDD (%) |
| Full Graph: ; relations | 0.0324 | 0.3441 | 0.0494 | 0.5670 | 8.44 | 0.5332 | -25.07 |
| w/o Flow: | 0.0278 | 0.2929 | 0.0436 | 0.4937 | 5.90 | 0.3541 | -28.73 |
| Quality scalarization: intrinsic quality | 0.0284 | 0.3107 | 0.0452 | 0.5117 | 5.80 | 0.3539 | -27.13 |
| Flow scalarization: normalized | 0.0289 | 0.2987 | 0.0474 | 0.5201 | 5.80 | 0.3486 | -26.86 |
| w/o Fertility: Pareto | 0.0297 | 0.3181 | 0.0456 | 0.5286 | 6.71 | 0.4132 | -26.35 |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Setting | Value | Scope or provenance |
| Universes | CSI 300 and CSI 500 with historical membership | Shared across methods |
| Frequency and prices | Daily; post-adjusted prices | Shared data protocol |
| Rolling lookback start | January 4, 2010 | Supports lagged operators |
| Mining and training | April 1, 2010–May 31, 2019 | Search feedback and LightGBM fitting |
| Validation | June 1, 2019–December 31, 2020 | LightGBM early stopping only |
| Test | January 1, 2021–December 31, 2025 | Final prediction and portfolio evaluation only |
| Setting | Value | Role |
| Initial Graph factors | LLM-generated factors evaluated before the first expansion round | |
| Parents per round | Up to | Parallel expansion width |
| Expansion cap per node | attempts | Prevents repeated use of one parent |
| Child proposals per attempt | Up to | Parent-grounded mutations |
| Factor-pool target | Approximately evaluable factors | Common downstream budget across automated methods |
| Maximum expression depth | Expression-complexity constraint |
| Setting | Value | Role |
| Structure edge threshold | Minimum Jaccard similarity | |
| Structure neighbors | Top- per node | Local structure neighborhood before union symmetrization |
| Correlation edge threshold | Minimum exposure-correlation strength | |
| Correlation neighbors | Top- per node | Local correlation neighborhood before union symmetrization |
| Correlation daily validity | stocks and coverage | Reliable daily cross-sectional correlation |
| Correlation date validity | of the evaluation calendar and of overlapping dates | Reliable pairwise relation |
| Setting | Value | Role |
| anchors | Quality and hypervolume normalization | |
| RankIC standard-deviation anchors | , reversed | Quality and hypervolume normalization |
| Top-20% return anchors | Quality and hypervolume normalization | |
| Hypervolume reference point | Quality Pareto Archive | |
| Fertility history | Top- attempt outcomes | Productive-potential aggregation |
| Relation weights | each | Equal generation, structure, and correlation contribution |
| Use | Model identifier | Temperature | Reasoning control |
| Main | DeepSeek-V4-Flash | Maximum | |
| Sensitivity | GPT-5.6-Sol | xhigh | |
| Sensitivity | Kimi K3 | Maximum |
| Component | Setting | Value |
| LightGBM | Objective | Mean squared error |
| LightGBM | Learning rate; boosting cap; early stopping | ; rounds; rounds |
| LightGBM | Column and row subsampling | and |
| LightGBM | and penalties | and |
| LightGBM | Maximum depth; leaves | ; |
| Portfolio | Initial account; invested fraction | ; |
| Setting | Value | Provenance |
| Quality-scalar archive capacity | factors | Fixed ablation design |
| Flow Quality interval | Repeated Graph-run statistics | |
| Flow Fertility interval | Repeated Graph-run statistics | |
| Flow AverageDistance interval | Repeated Graph-run statistics | |
| Flow scalar weights | each | Equal-weight control |
| Template | Version | Search stage | Structured output |
| Hypothesis | 2.3.0 | Graph initialization and expansion; MCTS root and expansion; Chain | One testable hypothesis |
| Factor design | 2.2.0 | Graph initialization; Chain | One or two semantic designs |
| Graph factor design | 2.2.0 | Graph expansion | Parent-grounded mutations |
| MCTS factor design | 2.3.0 | MCTS root and expansion | Initial designs or parent-grounded refinements |
| Factor expression | 2.1.0 | Shared | One DSL expression per design |
| Expression repair | 2.1.0 | Shared, when validation fails | One corrected DSL expression |
| Placeholder | Runtime content |
| context_json | Research goal, market, stock universe, frequency, available fields, search constraints, and bounded prior search summaries. For Graph expansion, the search constraint carries the selected parent’s current guidance. |
| request_json | The current hypothesis and stage-specific request. A design request includes the universe, frequency, generation limit, and relevant parent reference. MCTS expansion additionally supplies the parent expression, scores, and target dimension. An expression request contains one semantic design and expression limits; a repair request contains the previous expression and its deterministic validation issues. |
| prompt_view_json | The runtime capability view: admissible raw fields, canonical operators and signatures, supported windows, and the bounded context permitted at that stage. |
| DSL field | Symbol | Definition | Scale or natural domain |
| open | Opening price on trading day | Post-adjusted price; positive on eligible rows | |
| high | Intraday highest price | Post-adjusted price; positive on eligible rows | |
| low | Intraday lowest price | Post-adjusted price; positive on eligible rows | |
| close | Closing price | Post-adjusted price; positive on eligible rows | |
| volume | Daily trading volume | Source volume unit; nonnegative | |
| vwap | Volume-weighted average price | Same adjusted-price scale |
| Variable | Symbol | Definition | Role and scale |
| industry_id | Point-in-time industry classification | Categorical operator and preprocessing context | |
| log_mkt_cap | Natural logarithm of point-in-time market capitalization | Real-valued preprocessing exposure | |
| ret20 | Close-to-close return over the trailing 20 trading days through | Decimal preprocessing exposure | |
| turn20 | Mean daily turnover over the trailing 20 trading days | Nonnegative preprocessing exposure | |
| vol20 | Sample standard deviation of daily returns over the trailing 20 trading days | Nonnegative preprocessing exposure | |
| Forward return | One-trading-day forward close-to-close return | Real-valued prediction target |
| Signature | Scope | Definition and numerical behavior | Comm. |
|---|---|---|---|
| Non-windowed operators | |||
| add(x,y) | Elementwise | for finite inputs | Yes |
| sub(x,y) | Elementwise | for finite inputs | No |
| mul(x,y) | Elementwise | for finite inputs | Yes |
| div(x,y) | Elementwise | ; missing when | No |
| abs(x) | Elementwise | No | |
| Constraint | Enforced rule |
| Data frequency | Daily ( 1d ) for every field and operator |
| Allowed windows | Final integer literal in trading days |
| Expression length | At most 512 characters at the parser boundary |
| AST depth | Root counted at depth 1; the run-specific cap appears in Table 5 |
| Operator count | At most 32 call nodes |
| Field count | At most 6 distinct expression fields and at least 1 field |
| Case | Graph ID | Round/ | Aligned Top-20 (bp/day) | AverageDistance | ||
| E1 | 63d83d | 18/5 | 0.058165 | 0.073829 | 13.10 | 0.5092 |
| E2 | 835f66 | 20/7 | 0.005304 | 0.057119 | 4.93 | 0.8182 |
| E3 | 1b4d31 | 21/4 | 0.054396 | 0.072582 | 12.79 | 0.5040 |
| E4 | 5a02af | 19/7 | 0.017627 | 0.063906 | 3.85 | 0.8535 |
| ID | Round/ | Canonical DSL expression |
|---|---|---|
| a6f90c | Init./0 | mul(mul(sub(close,low),inv(sub(high,low))),ts_rank(volume,20)) |
| ed54a5 | Init./0 | rank(mul(sub(div(close,vwap),1),div(turn,div(ts_sum(turn,20),20)))) |
| 65260c | 0/1 | mul(div(turn,div(ts_sum(turn,20),20)),div(sub(vwap,close),sub(high,low))) |
| 4060a1 | 1/1 | rank(mul(div(sub(close,vwap),sub(high,low)),ts_rank(volume,20))) |
| 19f0cc | 2/3 | mul(div(sub(close,open),open),ts_zscore(free_turn,20)) |
| Mode | LLM | Predictive Performance | Portfolio Performance | |||||
| IC | ICIR | RankIC | RankICIR | ARR (%) | IR | MDD (%) | ||
| Chain | DeepSeek-V4-Flash | 0.0241 | 0.2731 | 0.0373 | 0.4260 | 3.94 | 0.2223 | -35.33 |
| GPT-5.6-Sol | 0.0280 | 0.2892 | 0.0411 | 0.4519 | 4.16 | 0.2599 | -29.11 | |
| Kimi K3 | 0.0299 | 0.3156 | 0.0401 | 0.3932 | 4.28 | 0.2810 | -33.60 | |
| MCTS | DeepSeek-V4-Flash | 0.0281 | 0.3238 | 0.0409 | 0.5145 | 5.68 | 0.3296 | -31.56 |
| GPT-5.6-Sol | 0.0259 | 0.2868 | 0.0419 | 0.4590 | 5.95 | 0.3361 | -33.81 | |
| Mode | Run | Predictive Performance | Portfolio Performance | |||||
| IC | ICIR | RankIC | RankICIR | ARR (%) | IR | MDD (%) | ||
| Chain | Run 1 | 0.0230 | 0.2606 | 0.0369 | 0.4087 | 3.49 | 0.1839 | -39.27 |
| Run 2 | 0.0234 | 0.2732 | 0.0371 | 0.4261 | 4.06 | 0.2399 | -33.13 | |
| Run 3 | 0.0242 | 0.2912 | 0.0352 | 0.4332 | 4.48 | 0.2631 | -36.60 | |
| Mean | 0.0235 | 0.2750 | 0.0364 | 0.4227 | 4.01 | 0.2290 | -36.33 | |
| Std. | 0.0005 | 0.0126 | 0.0009 | 0.0103 | 0.41 | 0.0332 | 2.51 | |