Request a Call Back

How do Transformers compare to LSTMs for time-series forecasting?


We are moving from traditional RNNs and LSTMs to Transformer-based architectures for our financial market predictions. While Transformers are great for NLP, are they actually better for sequential time-series data where the order of events is strictly linear and temporal? What are the trade-offs?


   2024-05-20 in Deep Learning by Lisa Thompson | 13601 Views


All answers to this question.


The primary advantage of Transformers is the "Self-Attention" mechanism, which allows the model to look at the entire sequence simultaneously, capturing long-range dependencies that LSTMs often miss due to the sequential nature of their hidden state. However, Transformers don't have an inherent sense of order, so you must use "Positional Encoding" to give the model temporal context. For very long sequences, Transformers are faster because they allow for parallelization during training. LSTMs are still very competitive for smaller datasets or where the temporal patterns are relatively short-term and simple to capture.

   Answered 2024-05-22 by Nancy Carter


That parallelization is a huge plus, but what about the "Informer" or "Temporal Fusion Transformer" variants? Are you planning to use the vanilla Transformer, or are you looking at these specific modifications that were designed to handle the multi-horizon forecasting challenges specific to financial data?

   Answered 2024-05-24 by Richard Scott

  • Richard, we are currently testing the Temporal Fusion Transformer (TFT). It’s performing better than our old LSTM because it handles static covariates (like stock symbols) and time-varying inputs much more elegantly. The attention weights also give us some level of interpretability, which our stakeholders really appreciate when we explain our model's predictions.

       Commented 2024-05-26 by Lisa Thompson


Don't ignore the computational cost. Transformers have a quadratic complexity $O(n^2)$ relative to sequence length, which can be a bottleneck if you are trying to process high-frequency tick data in real-time.

   Answered 2024-05-28 by Kevin Parker

  • Great point, Kevin. We actually had to implement a "Sparse Attention" mechanism to keep our inference times under the required millisecond threshold for our high-frequency trading platform.

       Commented 2024-05-30 by Nancy Carter



Write a Comment

Your email address will not be published. Required fields are marked (*)




Suggested Questions

Introduction to Project Management..
Posted 2026-07-07 by learnersera.
Balancing Link Metrics With Structural Entity Maps..
Posted 2025-05-12 by learnersera.
Balancing Link Metrics With Structural Entity Maps..
Posted 2025-05-12 by learnersera.
Impact of Entity Authority on Organic Competitive..
Posted 2025-01-04 by learnersera.
Backlinks vs Entity Authority for SEO Rankings..
Posted 2025-04-14 by learnersera.
How are modern agile organizations evaluating scrum..
Posted 2025-07-19 by learnersera.
Is a specialized technical degree required to..
Posted 2025-10-05 by learnersera.
How heavily do hiring managers weigh professional..
Posted 2025-09-12 by learnersera.

Disclaimer

  • "PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc.
  • "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA.
  • COBIT® is a trademark of ISACA® registered in the United States and other countries.
  • CBAP® and IIBA® are registered trademarks of International Institute of Business Analysis™.

We Accept

We Accept

Follow Us

 facebook icon
 twitter
linkedin

Instagram
twitter
Youtube

Quick Enquiry Form

WhatsApp Us  /      +1 (713)-287-1187