Dual-Relation Fusion Network (DRFN) for Accurate Stock Prediction

The paper introduces DRFN, a dual‑relation fusion network that jointly models static and dynamic stock relationships using multimodal BERT and GRU encodings, achieving significantly lower RMSE and MAE than baseline models on both Chinese and US market datasets.

Bighead's Algorithm Notes
Bighead's Algorithm Notes
Bighead's Algorithm Notes
Dual-Relation Fusion Network (DRFN) for Accurate Stock Prediction

Background

Accurate stock price prediction relies on modeling inter‑stock relationships, which are often overlooked by existing methods that focus solely on short‑term fluctuations or long‑term dependencies. Such single‑state models miss the complementary nature of static (long‑term) and dynamic (short‑term) relations, leading to poor performance during market shocks.

Problem Definition

The authors identify three core challenges: (1) single‑state relation modeling limits the capture of both dynamic changes and stable long‑term patterns; (2) news and information effects on stock relations are ignored; (3) existing approaches fail to model the time‑varying structure and nonlinear interaction between static and dynamic relations.

Method

DRFN consists of several modules:

Multimodal Input Encoding : News texts are encoded with a pretrained BERT to obtain embeddings, which are then processed by a GRU to learn temporal patterns over a window of T days. Market indicators (open, close, etc.) are encoded as vectors p_{i}^{\theta} and also fed into a GRU.

Modality Alignment : An InfoNCE contrastive loss aligns the hidden states of news and market indicators, encouraging small cosine distances for the same stock and large distances for different stocks.

Relation Fusion : A predefined static relation matrix S_{pre} (built from Wikidata) provides binary static connections. A distance‑aware mechanism learns dynamic relations, producing an attention matrix and a distance matrix. These are combined with the static matrix via a learnable weight \alpha and a bilinear transformation.

Temporal Modeling : The fused multimodal vector x_{i}^{\theta} is input to another GRU to capture cross‑modal temporal co‑patterns.

Adaptive Residual Connection : Relation features are merged with the original hidden states of news and market indicators through residual links, producing the final representation for next‑day return prediction.

Loss Function : The training objective combines mean‑squared error (MSE) for price prediction with the modality alignment loss.

Experiments

Datasets : Chinese market (CMIN‑CN, 227 stocks, 968 days) and US market (CMIN‑US, 105 stocks, 1006 days) split 8:1:1 for train/validation/test.

Evaluation Metrics : Root Mean Square Error (RMSE) and Mean Absolute Error (MAE).

Hyper‑parameters : Time window T=5, attention heads B=6, GRU hidden size F=128, learning rate 2\times10^{-3}, Adam optimizer, single P100 GPU (~11 h training).

Baselines : Temporal models (LSTM, GRU), graph models (GCN, GAT), and recent methods SAMBA, MASTER, LSR‑IGRU.

Main Results : DRFN outperforms all baselines. On CMIN‑US it achieves RMSE = 0.0166, MAE = 0.0117 versus LSR‑IGRU (0.0192 / 0.0141). On CMIN‑CN it records RMSE = 0.0270, MAE = 0.0191 versus LSR‑IGRU (0.0317 / 0.0228).

Ablation Study : Removing static relations degrades performance (RMSE = 0.0221), confirming the importance of dynamic information. Using only dynamic relations improves over static‑only but remains worse than full DRFN (RMSE = 0.0196), showing static anchors are necessary. Omitting modality alignment or adaptive residual connections also harms results.

Relation Sensitivity Analysis : Pearson correlation between relation strength changes and price volatility is highest for DRFN (ρ≈0.439), moderate for LSR‑IGRU (ρ≈0.053), and near zero for static GAT (ρ≈0), indicating DRFN captures real‑time relational dynamics effectively.

Conclusion

By jointly modeling static and dynamic inter‑stock relations through multimodal fusion and adaptive residual connections, DRFN delivers more accurate and relation‑sensitive stock price forecasts across diverse markets.

BERTGRUMultimodal Learninggraph neural networkstock predictionfinancial time seriesdual relation fusion
Bighead's Algorithm Notes
Written by

Bighead's Algorithm Notes

Focused on AI applications in the fintech sector

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.