{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/a-dual-stage-attention-based-recurrent-neural","title":"A Dual-Stage Attention-Based Recurrent Neural Network for Time Series Prediction","arxiv_id":"1704.02971","date":"2017-04-07","proceeding":null,"authors":["Yao Qin","Dongjin Song","Haifeng Chen","Wei Cheng","Guofei Jiang","Garrison Cottrell"],"abstract":"The Nonlinear autoregressive exogenous (NARX) model, which predicts the\ncurrent value of a time series based upon its previous values as well as the\ncurrent and past values of multiple driving (exogenous) series, has been\nstudied for decades. Despite the fact that various NARX models have been\ndeveloped, few of them can capture the long-term temporal dependencies\nappropriately and select the relevant driving series to make predictions. In\nthis paper, we propose a dual-stage attention-based recurrent neural network\n(DA-RNN) to address these two issues. In the first stage, we introduce an input\nattention mechanism to adaptively extract relevant driving series (a.k.a.,\ninput features) at each time step by referring to the previous encoder hidden\nstate. In the second stage, we use a temporal attention mechanism to select\nrelevant encoder hidden states across all time steps. With this dual-stage\nattention scheme, our model can not only make predictions effectively, but can\nalso be easily interpreted. Thorough empirical studies based upon the SML 2010\ndataset and the NASDAQ 100 Stock dataset demonstrate that the DA-RNN can\noutperform state-of-the-art methods for time series prediction.","url_abs":"http://arxiv.org/abs/1704.02971v4","url_pdf":"http://arxiv.org/pdf/1704.02971v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/JulesBelveze/time-series-autoencoder","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/Junghwan-brian/Dual_Stage_Attention_RNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/KurochkinAlexey/DA-RNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/XingguangZhang/ECE629-neraul-networks","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/Zhenye-Na/DA-RNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/chaofanwang123/DA-RNN_Model","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/fanyun-sun/DARNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/kaelzhang/DA-RNN-in-Tensorflow-2-and-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/kaelzhang/tensorflow-2-DA-RNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/kdgutier/esrnn_torch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/maksle/Dual-Stage-Attention-Based-Recurrent-Neural-Network","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/spallas/time-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"a-dual-stage-attention-based-recurrent-neural","repo_url":"https://github.com/microsoft/qlib/tree/main/examples/benchmarks/ALSTM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-prediction","task_name":"Time Series Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1704.02971","atlas_url":"https://app.syntology.ai/?focus=1704.02971","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1704.02971"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kaelzhang/tensorflow-2-DA-RNN","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maksle/Dual-Stage-Attention-Based-Recurrent-Neural-Network","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JulesBelveze/time-series-autoencoder","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chaofanwang123/DA-RNN_Model","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/qlib/tree/main/examples/benchmarks/ALSTM","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/XingguangZhang/ECE629-neraul-networks","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kaelzhang/DA-RNN-in-Tensorflow-2-and-PyTorch","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/KurochkinAlexey/DA-RNN","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kdgutier/esrnn_torch","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/spallas/time-attention","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fanyun-sun/DARNN","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Zhenye-Na/DA-RNN","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Junghwan-brian/Dual_Stage_Attention_RNN","reach":{"status":"unanswered"}}],"summary":{"ran_fixture":1},"by_repo_kind":{"listed":{"samples":1,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"a7cd366bda667787","entry":"init_hidden","repo":"JulesBelveze/time-series-autoencoder","repo_kind":"listed","path":"tsa/model.py","file_url":"https://github.com/JulesBelveze/time-series-autoencoder/blob/HEAD/tsa/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a7cd366bda667787"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}