Improving Financial Forecasting with a Synergistic LLM-Transformer Architecture: A Hybrid Approach to Stock Price Prediction

—

Improving Financial Forecasting with a Synergistic LLM-Transformer Architecture: A Hybrid Approach to Stock Price Prediction

Sayed Akif Hussain
Chen Qiu-shi
Syed Amer Hussain
Syed Atif Hussain
Asma Komal
Muhammad Imran Khalid
Published on 1/6/2026
Equities
Stocks
AI
LLM
Machine learning
Deep learning
Sentiment
Stock picking

This paper presents a hybrid deep learning framework that integrates a Large Language Model (LLM) with a Transformer architecture for stock price prediction. The authors address a theoretical gap in prior work that combines textual and numerical data empirically without formalizing their interaction. They conceptualize a prompt-based LLM as a mathematically defined signal generator that extracts directional market sentiment and an associated confidence score from financial news. These signals are dynamically fused with historical price features through a noise-robust gating mechanism, enabling the Transformer to adaptively weigh semantic and quantitative information. The proposed approach is evaluated on stock price forecasting tasks, demonstrating a 5.28% reduction in Root Mean Squared Error (RMSE) over a Vanilla Transformer baseline, with statistical significance (p=0.003). Ablation studies confirm the critical role of the gating mechanism and LLM signals, while robustness analysis shows the model's stability under noisy conditions. Additionally, the confidence-weighted attention mechanism provides interpretability by highlighting influential news and price features. The findings support a paradigm shift from empirical observation to formalized modeling of LLM-Transformer interactions, paving the way toward explainable, noise-resilient, and semantically enriched financial forecasting systems.

Highlights

  • 1Proposes a novel hybrid LLM-Transformer architecture for stock price prediction that formally models the interaction between textual and numerical data.
  • 2Conceptualizes a prompt-based LLM as a mathematically defined signal generator producing directional sentiment and confidence scores.
  • 3Introduces a noise-robust gating mechanism to dynamically fuse LLM-generated signals with historical price features.
  • 4Achieves a 5.28% reduction in RMSE over a Vanilla Transformer baseline with statistical significance (p=0.003).
  • 5Demonstrates model interpretability through confidence-weighted attention and robustness under noisy conditions.

Methods

  • M
    LLM as signal generator: Uses a prompt-based LLM to extract directional market sentiment and confidence scores from financial news.
  • M
    Noise-robust gating mechanism: Dynamically fuses LLM signals with historical price features, allowing the Transformer to adaptively weigh semantic and quantitative information.
  • M
    Transformer architecture: Employs a standard Transformer encoder-decoder for time-series forecasting, augmented with gated fusion of LLM outputs.
  • M
    Ablation and robustness analysis: Evaluates model components and performance under noisy input conditions.

Results

  • R
    Hybrid LLM-Transformer reduces RMSE by 5.28% compared to Vanilla Transformer (p=0.003).
  • R
    Ablation studies confirm the importance of the gating mechanism and LLM signals for performance gains.
  • R
    Robustness analysis shows the model maintains stability under noisy conditions.
  • R
    Confidence-weighted attention provides interpretability by highlighting influential news and price features.
  • R
    The hybrid model outperforms baselines in directional accuracy and risk-adjusted returns.
0/5

Analyze Paper

Generate insights from "Improving Financial Forecasting with a Synergistic LLM-Trans...".

Suggested Actions