Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Advertisement

Scientific Reports
  • View all journals
  • Search
  • My Account Login
  • Content Explore content
  • About the journal
  • Publish with us
  • Sign up for alerts
  • RSS feed
  1. nature
  2. scientific reports
  3. articles
  4. article
Learning to route in time and frequency domains: a dual-domain MoE transformer for multi-horizon forecasting
Download PDF
Download PDF
  • Article
  • Open access
  • Published: 11 May 2026

Learning to route in time and frequency domains: a dual-domain MoE transformer for multi-horizon forecasting

  • Qi Ji1 na1,
  • Jiaxing Wang2 na1,
  • Han He3,
  • Sheya He4 &
  • …
  • Xiaoyu Dai5 

Scientific Reports (2026) Cite this article

  • 468 Accesses

  • Metrics details

We are providing an unedited version of this manuscript to give early access to its findings. Before final publication, the manuscript will undergo further editing. Please note there may be errors present which affect the content, and all legal disclaimers apply.

Subjects

  • Energy science and technology
  • Engineering
  • Mathematics and computing

Abstract

Accurate long-term electrical load forecasting is required for reliable smart grid operation, yet it remains difficult due to multi-scale periodic patterns and non-stationary temporal variations across different prediction horizons. This paper presents MoE-Transformer, a dual-domain forecasting framework that learns to route representations in both the time and frequency domains through reinforcement learning. To mitigate spectral misalignment in multi-step forecasting, we introduce an Extended Discrete Fourier Transform (Extended DFT) that aligns the input spectrum with the frequency grid of the full prediction window. The proposed model incorporates parallel Mixture-of-Experts modules in the time and frequency domains (T-MoE and F-MoE), where domain-specific experts capture complementary temporal dynamics and spectral structures. Expert routing in each domain is modeled as an independent Markov Decision Process and optimized using reinforcement learning to jointly consider forecasting accuracy, routing consistency, and balanced expert utilization. Experiments on five benchmark datasets, including ETTh1, Electricity, and Traffic, across four forecasting horizons show that MoE-Transformer achieves MSE reductions of 50.9–56.9% relative to state-of-the-art baselines under matched training protocols. Relative to a same-capacity dense Transformer baseline on NVIDIA RTX 4090, sparse top-1 expert activation reduces peak GPU memory by \(39.6 \pm 1.1\%\) and single-sample inference latency by \(60.1 \pm 1.2\%\) (mean ± std over 5 runs), with measured absolute batched latency of \(1.20 \pm 0.03\) ms per sample, supporting real-time forecasting deployment. Ablation results confirm the individual effects of Extended DFT, dual-domain modeling, and reinforcement-based routing, yielding performance gains of 5.8%, 4.6%, and up to 47.2%, respectively.

Similar content being viewed by others

Remaining useful life prediction across different operational conditions based on domain adaptation feature transfer

Article Open access 22 April 2026

Physics-informed machine learning for spectrum prediction in phosphorescent OLEDs

Article Open access 07 May 2026

MeshHSTGT: hierarchical spatio-temporal fusion for mesh network traffic forecasting

Article Open access 01 July 2025

Funding

This research received no external funding.

Author information

Author notes
  1. Qi Ji and Jiaxing Wang have contributed equally to this work.

Authors and Affiliations

  1. Faculty of Engineering, Universiti Putra Malaysia, 43400, Serdang, Selangor, Malaysia

    Qi Ji

  2. School of Mechanical Engineering, Wuhan University of Science and Technology, Wuhan, 430081, China

    Jiaxing Wang

  3. School of Computer Science and Artificial Intelligence, Changzhou University, Changzhou, 213164, China

    Han He

  4. School of Economics and Management, Bengbu University, Bengbu, 233030, China

    Sheya He

  5. College of Electrical Engineering and New Energy, China Three Gorges University, Yichang, 443002, China

    Xiaoyu Dai

Authors
  1. Qi Ji
    View author publications

    Search author on:PubMed Google Scholar

  2. Jiaxing Wang
    View author publications

    Search author on:PubMed Google Scholar

  3. Han He
    View author publications

    Search author on:PubMed Google Scholar

  4. Sheya He
    View author publications

    Search author on:PubMed Google Scholar

  5. Xiaoyu Dai
    View author publications

    Search author on:PubMed Google Scholar

Corresponding author

Correspondence to Xiaoyu Dai.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ji, Q., Wang, J., He, H. et al. Learning to route in time and frequency domains: a dual-domain MoE transformer for multi-horizon forecasting. Sci Rep (2026). https://doi.org/10.1038/s41598-026-50232-8

Download citation

  • Received: 10 February 2026

  • Accepted: 20 April 2026

  • Published: 11 May 2026

  • DOI: https://doi.org/10.1038/s41598-026-50232-8

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Keywords

  • Time series forecasting
  • Mixture of experts
  • Dual-domain Transformer
  • Frequency-domain modeling
  • Reinforcement learning
  • Dynamic expert routing
  • Multi-horizon prediction
  • Electrical load forecasting
Download PDF

Advertisement

Explore content

  • Research articles
  • News & Comment
  • Collections
  • Subjects
  • Follow us on Facebook
  • Follow us on X
  • Sign up for alerts
  • RSS feed

About the journal

  • About Scientific Reports
  • Contact
  • Journal policies
  • Guide to referees
  • Calls for Papers
  • Editor's Choice
  • Journal highlights
  • Open Access Fees and Funding

Publish with us

  • For authors
  • Language editing services
  • Open access funding
  • Submit manuscript

Search

Advanced search

Quick links

  • Explore articles by subject
  • Find a job
  • Guide to authors
  • Editorial policies

Scientific Reports (Sci Rep)

ISSN 2045-2322 (online)

nature.com footer links

About Nature Portfolio

  • About us
  • Press releases
  • Press office
  • Contact us

Discover content

  • Journals A-Z
  • Articles by subject
  • protocols.io
  • Nature Index

Publishing policies

  • Nature portfolio policies
  • Open access

Author & Researcher services

  • Reprints & permissions
  • Research data
  • Language editing
  • Scientific editing
  • Nature Masterclasses
  • Research Solutions

Libraries & institutions

  • Librarian service & tools
  • Librarian portal
  • Open research
  • Recommend to library

Advertising & partnerships

  • Advertising
  • Partnerships & Services
  • Media kits
  • Branded content

Professional development

  • Nature Awards
  • Nature Careers
  • Nature Conferences

Regional websites

  • Nature Africa
  • Nature China
  • Nature India
  • Nature Japan
  • Nature Middle East
  • Privacy Policy
  • Use of cookies
  • Legal notice
  • Accessibility statement
  • Terms & Conditions
  • Your US state privacy rights
Springer Nature

© 2026 Springer Nature Limited

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing: AI and Robotics