Skip to main content
Back

Mila's TRACE Beats Wall Street AI With Auditable Graph Reasoning

Researchers from Université de Montréal, Mila, and Aily Labs propose TRACE, a knowledge graph reasoning method that predicts stock moves with auditable evidence chains.

Pro

Paper, Full Access
  • Researchers propose TRACE, a temporal knowledge graph reasoning method for interpretable stock movement prediction (paper).
  • Combines mined logical rules, graph exploration, and an LLM validator into one end-to-end pipeline.
  • Achieves 55.1% accuracy and 60.8% F1 on an S&P 500 benchmark, beating XGBoost, T-GNN, and agent baselines.
  • Top-10 buy-and-hold backtest returns 41.7% with 2.00 Sharpe, versus 16.7% for equal-weight benchmark.
  • Every prediction ships with human-readable paths connecting a stock to news evidence through typed relations.
  • No code or knowledge graph release is indicated; evaluation is limited to one year of S&P 500 data.

A team of researchers from the Université de Montréal, Mila, and Aily Labs has published a paper describing TRACE, a stock movement prediction method that tries to fix a persistent trust problem in machine learning for finance: models that predict well but cannot explain themselves, or worse, hallucinate reasons that were never in the data. The paper argues that combining mined logical rules, a temporal knowledge graph, and an LLM as a validator produces both better numbers and human-readable justifications for every UP or DOWN call.

The setup is a binary classification task on S&P 500 stocks, and the reported gains are modest in accuracy but sharp in downstream trading performance. On the S&P 500 benchmark, the method achieves 55.1% accuracy, 55.7% precision, 71.5% recall, and 60.8% F1, and a Top-10 buy-and-hold basket built from its picks returns 41.7% with a 2.00 Sharpe ratio over a one-year backtest.

Why plain LLMs and plain graphs both fall short

Financial forecasting has drifted in two directions. Classical approaches rely on time-series modeling of historical prices and macroeconomic indicators, while more recent methods incorporate textual sentiment from financial news and social media. Both tend to treat each stock in isolation, and LLM-based systems have an additional habit that is dangerous in finance: they often hallucinate unsupported facts and lack interpretability, posing risks in high-stakes financial domains.

Markets, though, are relational. An acquisition boosts the acquirer, lifts upstream suppliers, and pressures rivals; a regulatory hit on a pharma company ripples through its contract manufacturers. Graph-based models have tried to capture this, but they mostly lean on latent embeddings that are hard to audit. The authors position TRACE as an attempt to do explicit temporal reasoning on a financial knowledge graph rather than fusing opaque vectors.

The knowledge graph under the hood

The paper's substrate is a temporal knowledge graph covering 2022 through 2023 for S&P 500 constituents. It contains 42,188 entities and 174,415 timestamped edges, with six entity types and typed relations that include SELLS, INVESTED_IN, PARTNERED, ACQUIRED, CAUSED_INCREASE, and CAUSED_DECLINE. Every edge carries a validity interval, so any query at day t sees only facts that were known on or before day t. This as-of constraint is what makes the backtest honest.

Temporal financial knowledge graph structure with entities, relations, and validity intervals

The heaviest edge type is EXTRACTED_FROM, which anchors companies, events, and products to the news article or filing they came from. That anchoring is what lets the system produce chains that end in a real document rather than a vibes-based sentiment score.

Rules as a search prior, not a rulebook

Before prediction, the authors mine a rule bank from the historical graph. Candidate rules are 2- to 4-hop relational patterns generalized into logical bodies, each mapped to an UP or DOWN head with a confidence score computed from historical hit rate. Rules with confidence below 0.60 are discarded. A mined rule looks like this:

PARTNERED(X, Z) AND CAUSED_INCREASE(Z, Y)
    => predict_direction(X, UP),  conf = 0.74

Crucially, these rules are not applied as a hard rulebook. They constrain which relation sequences the search is even allowed to consider, keeping exploration on what the authors call economically meaningful motifs instead of random walks.

How a prediction gets made

For each stock on each trading day, TRACE runs a rule-guided beam search over the graph. The pipeline works roughly like this:

  1. Start at the stock's Company node and expand along temporally valid edges.
  2. At each step, only keep relation sequences that form a prefix of some mined rule body.
  3. An LLM relation selector (Qwen QwQ-32B in the experiments) further prunes candidates that look semantically incompatible with the current news snippet.
  4. Rank surviving paths by a lexicographic score that prioritizes completion of a high-confidence rule, then rule body coverage, then recency, then a penalty on high-degree hub nodes.
  5. When a path completes a rule and terminates at a TextSource node, it becomes a hypothesis with a predicted direction and confidence.
  6. The LLM validates each hypothesis against the news content, and the final UP or DOWN verdict is the label with the highest aggregated confidence across surviving hypotheses.
TRACE pipeline showing knowledge graph construction, automated rule mining, and an example mined rule

The output is not just a label. Every prediction ships with the top supporting paths, each one a concrete chain like Company - PARTNERED - Counterparty - CAUSED_INCREASE - Market - EXTRACTED_FROM - News Article.

Numbers that matter

Against seven baselines including XGBoost, a temporal GNN, a Qwen-based news sentiment model, and agent frameworks like StockAgent and FinMem, TRACE leads on all four classification metrics. Accuracy is only about 0.7 points above the next-best baseline, but recall is meaningfully higher.

The backtest is where the gap widens. The method achieves 41.7% total return with a 2.00 Sharpe ratio, 18.5% annualized volatility, -11.7% maximum drawdown, and 56% win rate, while the equal-weight benchmark yields 16.7% total return with a 1.17 Sharpe. XGBoost, the strongest tabular baseline, returns 27.0%; T-GNN comes in at 3.5%.

Ablations line up with the story. Multi-hop reasoning provides the largest performance contribution at 2.1%, confirming that complex financial relationships require multi-step graph traversal, followed by temporal constraints (1.4%) and rule mining (1.1%). A counterfactual test that masks either the news evidence or the first rule-completing edge shows monotonically dropping accuracy, which the authors read as confirmation that predictions really do depend on the surfaced paths rather than spurious correlations.

What it is good for, and what it is not

The most useful contribution here is arguably the auditability, not the accuracy. Experts rated 73% of reasoning paths as financially meaningful and 64% as actionable for investment decisions, with inter-rater reliability of Fleiss' kappa 0.68. For anyone building an assistive tool where a human analyst needs to sanity-check the machine, that kind of grounded chain is worth more than a marginal F1 bump.

The limitations are honest and worth noting:

  • Accuracy near 55% is still barely above coin flip; the method is a signal, not an oracle.
  • Performance depends heavily on knowledge graph coverage; sparse relations or missing news mean no path and no prediction.
  • The backtest excludes fees, slippage, and dividends, so real-world returns would be lower.
  • The evaluation window is a single year on S&P 500 names, and the authors flag cross-market validation as future work.
  • The paper does not indicate that code or the constructed knowledge graph have been released.

TRACE is a research contribution rather than a shipped framework, and it should be read that way. The idea worth taking away is the architectural pattern: mine symbolic rules to constrain where an LLM is allowed to reason, and force every conclusion to terminate at a real document. That template extends well beyond stock prediction to any domain where hallucination-free, auditable reasoning matters more than raw accuracy.