Papers
Topics
Authors
Recent
Search
2000 character limit reached

RicciFlowRec: Geometric Risk-Aware Recommender

Updated 8 July 2026
  • RicciFlowRec is a geometric, risk-aware recommender that uses discrete Ricci curvature to quantify local stress in financial markets.
  • It constructs dynamic financial graphs by integrating asset prices, macroeconomic indicators, and FinBERT-based sentiment for enhanced interpretability.
  • The system applies Ricci flow to track shock propagation and adjusts asset rankings using a structural risk penalty for robust recommendations.

RicciFlowRec is a geometric, risk-aware recommender system for financial markets that operates on dynamic financial graphs and performs root cause attribution via Ricci curvature and Ricci flow. It models evolving interactions among stocks, macroeconomic indicators, and news, quantifies local stress using discrete Ricci curvature, traces shock propagation via Ricci flow, and uses the resulting geometric signals to adjust asset ranking. In its reported formulation, RicciFlowRec is applied to S&P 500 data with FinBERT-based sentiment, and the preprint presents it explicitly as ongoing work with preliminary results on robustness, interpretability, and risk-aware ranking (Sun et al., 12 Aug 2025).

1. Geometric basis and conceptual scope

RicciFlowRec takes the position that market structure has geometry. Within this framework, discrete Ricci curvature on a graph is interpreted as a local structural stress signal: negative curvature indicates stretched or bottlenecked regions where small perturbations can propagate far and cause systemic effects, while positive curvature indicates redundant, tightly connected regions that are structurally robust (Sun et al., 12 Aug 2025). The “Ricci flow” component is then used not for geometric uniformization in the classical differential-geometric sense, but to model how structural stress evolves and propagates across the financial network.

The name is directly tied to the mathematical lineage of Ricci flow, where a Riemannian metric evolves by

$\frac{\partial}{\partial t} g = -2\,\Ric(g),$

a heat-type evolution that smooths geometry by diffusing curvature (Khan, 2022). In discrete settings, Ricci-type quantities have multiple formulations; Forman’s combinatorial Ricci curvature is an edge-based notion on cell complexes and weighted discrete structures, while broader metric and graph discretizations support Ricci-type flows on polyhedral manifolds and networks (0903.3676, Saucan, 2019). RicciFlowRec adopts that discrete-geometry tradition in a financial graph setting, using curvature as a structural diagnostic rather than as a purely geometric invariant (Sun et al., 12 Aug 2025).

A central conceptual distinction is that RicciFlowRec’s “root cause attribution” is structural. The preprint is explicit that curvature and Ricci flow are fundamentally structural or correlational, and do not establish true causal directionality without additional assumptions (Sun et al., 12 Aug 2025). This makes the method best understood as a geometry-based attribution and ranking framework rather than a causal identification procedure in the econometric sense.

2. Dynamic financial graph construction

At each trading day tt, RicciFlowRec builds a heterogeneous graph

Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),

whose node set includes three types of entities: asset nodes, macroeconomic indicator nodes, and news or entity nodes embedded via FinBERT (Sun et al., 12 Aug 2025). The asset universe is described as S&P 500, approximately 450 liquid stocks. Macroeconomic nodes include variables such as bond yields and CPI. News and entity nodes are derived from financial news and tweets, with textual context embedded by FinBERT.

Each asset aia_i at time tt carries a feature vector

xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,

combining price-based features and sentiment features. The price-based features include log-returns, 30-day realized volatility, and trading volume. Sentiment is aggregated from tweets mentioning the asset on that day; if no tweets mention the stock on day tt, the sentiment is set to $0$, treated as neutral (Sun et al., 12 Aug 2025).

Edges encode three relation types. Statistical links are based on rolling Pearson correlation of log-returns over a 30-day window,

corruvt=Pearson(ru(t29:t),rv(t29:t)),\mathrm{corr}_{uv}^t = \mathrm{Pearson}\big(r_u^{(t-29:t)},\, r_v^{(t-29:t)}\big),

with edges formed when correlation exceeds a threshold and weighted proportionally to corruvt|\mathrm{corr}_{uv}^t|. Semantic links are derived from FinBERT or FinBERT-based sentence embeddings, with weights given by cosine similarity. Knowledge links encode sector and supply-chain relations from an external economic knowledge graph (Sun et al., 12 Aug 2025).

The resulting daily graph is sparsified by thresholding to keep only top-tt0 strongest interactions. The preprint also notes a 252-day rolling window for some graph statistics and a 5-day horizon for Ricci flow experiments (Sun et al., 12 Aug 2025). This construction is designed to keep the graph sparse and interpretable while allowing both financial co-movement and exogenous textual or macroeconomic structure to influence the geometry.

3. Curvature computation and Ricci flow on the graph

RicciFlowRec conceptually invokes Ollivier–Ricci curvature,

tt1

where tt2 is the Wasserstein-1 distance between neighborhood distributions and tt3 is the graph distance, usually tt4 for adjacent nodes. This formulation encodes the extent to which neighborhoods overlap or diverge. In the actual implementation, however, the system uses Forman–Ricci curvature for scalability, computed through the GraphRicciCurvature package (Sun et al., 12 Aug 2025).

The interpretation is explicit. Positive curvature is associated with overlapping neighborhoods, redundancy, and clustering; negative curvature is associated with divergent neighborhoods and bridge or bottleneck edges between otherwise separated regions. The curvature landscape across edges is therefore used as a structural stress map of the market network (Sun et al., 12 Aug 2025).

Curvature is computed per day and per edge on tt5. The preprint reports that Forman curvature is chosen because it is much more scalable than directly computing Ollivier–Ricci curvature with optimal transport. For the S&P 500 graph, computation over 252 trading days takes about 5 minutes, and inference updates are reported as below 200 ms (Sun et al., 12 Aug 2025).

Ricci flow is implemented as an edge-weight evolution driven by curvature,

tt6

Under this dynamics, negatively curved edges increase in weight, emphasizing growing stress in fragile regions, while positively curved edges decrease in weight, reflecting stabilizing or redundant structure (Sun et al., 12 Aug 2025). In discrete time, RicciFlowRec uses an iterative update,

tt7

typically over a short horizon, described as either a 5-day or 50-iteration flow (Sun et al., 12 Aug 2025).

The flow output is summarized by the curvature shift

tt8

Edges with large tt9 are treated as structurally unstable. The preprint stresses that convergence is not the emphasis; the aim is stress tracing rather than geometric uniformization (Sun et al., 12 Aug 2025).

4. Root cause attribution and risk-aware ranking

Root cause attribution in RicciFlowRec is built from curvature changes under flow. The system first identifies unstable nodes as those whose average curvature change falls below a threshold,

Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),0

with Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),1 in the reported experiments (Sun et al., 12 Aug 2025).

For each asset, the system then performs backward graph search over edges with sufficiently large curvature change. Starting from a top-ranked asset Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),2, it runs a backward BFS toward perturbed or unstable nodes, restricting traversal to edges satisfying

Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),3

The search stops when it reaches a perturbed node, exceeds a maximum hop length Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),4, or when curvature decay falls below a small Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),5, which is described conceptually but not numerically specified (Sun et al., 12 Aug 2025). Among candidate paths, RicciFlowRec selects the one maximizing cumulative curvature change,

Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),6

This path is stored as the RCA path Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),7 for asset Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),8 (Sun et al., 12 Aug 2025).

The ranking component combines predicted return with a structural risk penalty. Two equivalent score forms are given: Gt=(Vt,Et,Wt),\mathcal{G}_t = (\mathcal{V}_t, \mathcal{E}_t, \mathbf{W}_t),9 and

aia_i0

Here aia_i1 is a predicted return from a base forecaster such as an LSTM, GAT, or other GNN, and aia_i2 is structural risk exposure (Sun et al., 12 Aug 2025).

The risk term is defined as

aia_i3

This makes the ranking explicitly sensitive to an asset’s exposure to unstable regions rather than only to its own volatility. The Top-aia_i4 recommendation set is then

aia_i5

with each recommended asset accompanied by its RCA path as an explanation (Sun et al., 12 Aug 2025).

A recurrent misconception is to read these RCA paths as proofs of economic causation. The preprint rejects that interpretation: the framework traces curvature-gradient paths in a structural graph and therefore yields structural or correlational attribution, not causal identification absent stronger assumptions (Sun et al., 12 Aug 2025).

5. Experimental results and interpretability

The reported experiments use approximately 450 actively traded S&P 500 stocks over 2018–2023, with price and volume data from Yahoo Finance, macroeconomic indicators as separate nodes, and more than 500k financial tweets scored with FinBERT (Sun et al., 12 Aug 2025). Stress tests inject synthetic volatility shocks into randomly selected nodes by increasing realized volatility and assigning more negative sentiment scores, then allow the shocks to propagate through the graph via curvature flow.

The baseline set includes FinBERT-Ranker, GAT, CausalRec, FinGNN, and SS-GNN. Evaluation uses three metrics: NDCG@10 for ranking quality, Top-10 Volatility for recommendation stability under perturbations, and RCA Fidelity for recovery of perturbed nodes through curvature-based backtracking (Sun et al., 12 Aug 2025).

On the main benchmark, RicciFlowRec reports NDCG@10 of aia_i6, Top-10 Volatility of aia_i7, and RCA Fidelity of aia_i8. The corresponding baseline values are: FinBERT-Ranker aia_i9, tt0, tt1; GAT tt2, tt3, tt4; CausalRec tt5, tt6, tt7; FinGNN tt8, tt9, xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,0; and SS-GNN xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,1, xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,2, xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,3. The reported interpretation is that RicciFlowRec achieves the best raw ranking quality, the lowest perturbation volatility, and the highest attribution fidelity among attribution-capable baselines (Sun et al., 12 Aug 2025).

The ablation study isolates the contribution of explicit flow simulation and of the RCA-based risk penalty. Full RicciFlowRec reports NDCG@10 xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,4, Top-10 Volatility xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,5, and RCA Fidelity xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,6. Removing flow yields xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,7, xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,8, and xitRd,\mathbf{x}_i^t \in \mathbb{R}^d,9. Removing the RCA penalty yields tt0, tt1, and tt2. These results are presented as evidence that both explicit stress propagation and risk-aware ranking materially contribute to robustness and attribution fidelity (Sun et al., 12 Aug 2025).

Sensitivity analysis reports relatively stable behavior around the default return–stability weight tt3. For tt4, the corresponding AUC values are tt5, with RCA Fidelity tt6. For curvature threshold tt7, the reported AUC values are tt8, with RCA Fidelity tt9 (Sun et al., 12 Aug 2025).

Interpretability is illustrated through case studies. On 2022-03-08, a semiconductor sentiment drop is traced to NVIDIA, with the impacted sector described as the tech supply chain. On 2021-12-15, energy price volatility is attributed to ExxonMobil and connected to manufacturing. On 2022-05-11, a bond yield spike is traced to a US Treasury node, affecting Financials and REITs. On 2021-09-27, inflation concern is linked to Procter & Gamble, with impact on retail and logistics (Sun et al., 12 Aug 2025). These examples are presented as economically intuitive RCA pathways through supply-chain, macro, and sectoral links.

6. Limitations, positioning, and future directions

RicciFlowRec is explicitly described as ongoing work or a prototype. Several limitations are stated. First, despite the RCA terminology, the framework is structural or correlational rather than causal. Second, scalability beyond the S&P 500 universe or to higher-frequency data may require further optimization. Third, the choice of curvature remains open: the implementation uses Forman curvature for efficiency, but alternative notions such as Ollivier or Bakry–Émery may capture different stress structures. Fourth, the quality of the risk signal depends on graph construction, including the completeness of economic links and the noisiness of sentiment data. Fifth, the base forecaster is left generic; the preprint’s main focus is curvature-based RCA and ranking adjustment rather than return prediction architecture (Sun et al., 12 Aug 2025).

The system is positioned at the intersection of geometric deep learning, graph curvature, financial graph models, and explainable or causal recommendation. The authors relate it to earlier uses of Ricci curvature and flow in community detection and Internet topology, to financial GNNs such as FinGNN and GAT-based stock predictors, and to explainable recommendation approaches such as CausalRec. They state that RicciFlowRec is, to their knowledge, the first recommender to apply geometric flow-based reasoning for financial decision support (Sun et al., 12 Aug 2025).

The stated future directions are portfolio optimization, incorporation of curvature-derived risk into return forecasting models, combining geometric signals with causal graph learning, richer macro inputs, and near real-time deployment for risk monitoring (Sun et al., 12 Aug 2025). A plausible implication is that RicciFlowRec is less a standalone predictor than a geometric overlay: a curvature-based module for stress localization, exposure quantification, and explanation in dynamic financial networks.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to RicciFlowRec.