保留正文与补采附件。源页面当前未重新核验;具体限制见交付清单。
We value your privacy
We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking "Accept All", you consent to our use of cookies.
Customise Reject All Accept All
Customise Consent Preferences
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more
NecessaryAlways Active
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
Cookie BCTempID
Duration 10 minutes
Description No description available.
Cookie __cf_bm
Duration 1 hour
Description This cookie, set by Cloudflare, is used to support Cloudflare Bot Management.
Cookie AWSALBCORS
Duration 7 days
Description Amazon Web Services set this cookie for load balancing.
Cookie _cfuvid
Duration session
Description Cloudflare sets this cookie to track users across sessions to optimize user experience by maintaining session consistency and providing personalized services
Cookie li_gc
Duration 6 months
Description Linkedin set this cookie for storing visitor's consent regarding using cookies for non-essential purposes.
Cookie __hssrc
Duration session
Description This cookie is set by Hubspot whenever it changes the session cookie. The __hssrc cookie set to 1 indicates that the user has restarted the browser, and if the cookie does not exist, it is assumed to be a new session.
Cookie __hssc
Duration 1 hour
Description HubSpot sets this cookie to keep track of sessions and to determine if HubSpot should increment the session number and timestamps in the __hstc cookie.
Cookie wpEmojiSettingsSupports
Duration session
Description WordPress sets this cookie when a user interacts with emojis on a WordPress site. It helps determine if the user's browser can display emojis properly.
Cookie BCSessionID
Duration 1 year 1 month 4 days
Description Blueconic sets this cookie as a unique identifier for the BlueConic profile.
Cookie _octo
Duration 1 year
Description No description available.
Cookie logged_in
Duration 1 year
Description No description available.
Cookie __Secure-YEC
Duration past
Description YouTube sets this cookie to stores the user's video player preferences using embedded YouTube video
Cookie __eoi
Duration 6 months
Description Description is currently not available.
Cookie AWSALBTGCORS
Duration 7 days
Description No description available.
Cookie login-status-p
Duration past
Description Description is currently not available.
Cookie AWSALBTG
Duration 7 days
Description No description available.
Cookie csrf_token
Duration session
Description No description available.
Cookie token_v2
Duration 1 day
Description Description is currently not available.
Cookie D
Duration 1 year
Description Description is currently not available.
Cookie PHPSESSID
Duration session
Description This cookie is native to PHP applications. The cookie stores and identifies a user's unique session ID to manage user sessions on the website. The cookie is a session cookie and will be deleted when all the browser windows are closed.
Cookie VISITOR_PRIVACY_METADATA
Duration 6 months
Description YouTube sets this cookie to store the user's cookie consent state for the current domain.
Cookie cookietest
Duration session
Description The cookietest cookie is typically used to determine whether the user's browser accepts cookies, essential for website functionality and user experience.
Cookie __Host-airtable-session
Duration 1 year
Description This cookie is used to enable us to integrate the services of Airtable.
Cookie __Host-airtable-session.sig
Duration 1 year
Description This cookie is used to enable us to integrate the services of Airtable.
Cookie m
Duration 1 year 1 month 4 days
Description Stripe sets this cookie for fraud prevention purposes. It identifies the device used to access the website, allowing the website to be formatted accordingly.
Cookie BIGipServer*
Duration session
Description Marketo sets this cookie to collect information about the user's online activity and build a profile about their interests to provide advertisements relevant to the user.
Cookie __cfruid
Duration session
Description Cloudflare sets this cookie to identify trusted web traffic.
Cookie _GRECAPTCHA
Duration 6 months
Description Google Recaptcha service sets this cookie to identify bots to protect the website against malicious spam attacks.
Cookie __Secure-YNID
Duration 6 months
Description Google cookie used to protect user security and prevent fraud, especially during the login process.
Cookie cookieyes-consent
Duration 1 year
Description CookieYes sets this cookie to remember users' consent preferences so that their preferences are respected on subsequent visits to this site. It does not collect or store any personal information about the site visitors.
Functional Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.
Cookie lidc
Duration 1 day
Description LinkedIn sets the lidc cookie to facilitate data center selection.
Cookie brw
Duration 1 year
Description No description available.
Cookie brwConsent
Duration 5 minutes
Description Description is currently not available.
Cookie WMF-Uniq
Duration 1 year
Description Description is currently not available.
Cookie loom_anon_comment
Duration 1 year
Description No description available.
Cookie loom_referral_video
Duration session
Description Description is currently not available.
Cookie VISITOR_INFO1_LIVE
Duration 6 months
Description A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
Cookie yt-remote-connected-devices
Duration Never Expires
Description YouTube sets this cookie to store the user's video preferences using embedded YouTube videos.
Cookie ytidb::LAST_RESULT_ENTRY_KEY
Duration Never Expires
Description The cookie ytidb::LAST_RESULT_ENTRY_KEY is used by YouTube to store the last search result entry that was clicked by the user. This information is used to improve the user experience by providing more relevant search results in the future.
Cookie yt-remote-device-id
Duration Never Expires
Description YouTube sets this cookie to store the user's video preferences using embedded YouTube videos.
Cookie yt-remote-session-name
Duration session
Description The yt-remote-session-name cookie is used by YouTube to store the user's video player preferences using embedded YouTube video.
Cookie yt-remote-fast-check-period
Duration session
Description The yt-remote-fast-check-period cookie is used by YouTube to store the user's video player preferences for embedded YouTube videos.
Cookie yt-remote-session-app
Duration session
Description The yt-remote-session-app cookie is used by YouTube to store user preferences and information about the interface of the embedded YouTube video player.
Cookie yt-remote-cast-available
Duration session
Description The yt-remote-cast-available cookie is used to store the user's preferences regarding whether casting is available on their YouTube video player.
Cookie yt-remote-cast-installed
Duration session
Description The yt-remote-cast-installed cookie is used to store the user's video player preferences using embedded YouTube video.
Cookie cp_session
Duration 3 months
Description Codepen sets this cookie for Help systems found in the website.
Cookie loid
Duration 1 year 1 month 4 days
Description This cookie is set by the Reddit. The cookie enables the sharing of content from the website onto the social media platform.
Analytics Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
Cookie __hstc
Duration 6 months
Description Hubspot set this main cookie for tracking visitors. It contains the domain, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session).
Cookie hubspotutk
Duration 6 months
Description HubSpot sets this cookie to keep track of the visitors to the website. This cookie is passed to HubSpot on form submission and used when deduplicating contacts.
Cookie _ga
Duration 1 year 1 month 4 days
Description Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.
Cookie ga*
Duration 1 year 1 month 4 days
Description Google Analytics sets this cookie to store and count page views.
Cookie __Host-psifi.analyticsTrace
Duration 6 hours
Description Description is currently not available.
Cookie __Host-psifi.analyticsTraceV2
Duration 6 hours
Description Description is currently not available.
Cookie _gh_sess
Duration session
Description GitHub sets this cookie for temporary application and framework state between pages like what step the user is on in a multiple step form.
Cookie YSC
Duration session
Description YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
Cookie ajs_anonymous_id
Duration 1 year
Description This cookie is set by Segment to count the number of people who visit a certain site by tracking if they have visited before.
Cookie vuid
Duration 1 year 1 month 4 days
Description Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website.
Performance Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Cookie AWSALB
Duration 7 days
Description AWSALB is an application load balancer cookie set by Amazon Web Services to map the session to the target.
Cookie acq
Duration past
Description Description is currently not available.
Cookie acq.sig
Duration past
Description Description is currently not available.
Cookie ptc
Duration 2 years
Description No description available.
Advertisement Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.
Cookie muc_ads
Duration 1 year 1 month 4 days
Description Twitter sets this cookie to collect user behaviour and interaction data to optimize the website.
Cookie guest_id_marketing
Duration 1 year 1 month 4 days
Description Twitter sets this cookie to identify and track the website visitor.
Cookie guest_id_ads
Duration 1 year 1 month 4 days
Description Twitter sets this cookie to identify and track the website visitor.
Cookie personalization_id
Duration 1 year 1 month 4 days
Description Twitter sets this cookie to integrate and share features for social media and also store information about how the user uses the website, for tracking and targeting.
Cookie guest_id
Duration 1 year 1 month 4 days
Description Twitter sets this cookie to identify and track the website visitor. It registers if a user is signed in to the Twitter platform and collects information about ad preferences.
Cookie bcookie
Duration 1 year
Description LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser IDs.
Cookie __Secure-ROLLOUT_TOKEN
Duration 6 months
Description YouTube sets this cookie to manage feature rollout and experimentation. It helps Google control which new features or interface changes are shown to users as part of testing and staged rollouts, ensuring consistent experience for a given user during an experiment.
Cookie yt.innertube::nextId
Duration Never Expires
Description YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.
Cookie yt.innertube::requests
Duration Never Expires
Description YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.
Cookie session_tracker
Duration session
Description This cookie is set by the Reddit. This cookie is used to identify trusted web traffic. It also helps in adverstising on the website.
Cookie edgebucket
Duration session
Description Reddit sets this cookie to save the information about a log-on Reddit user, for the purpose of advertisement recommendations and updating the content.
Cookie did
Duration 1 year
Description Arbor sets this cookie to show targeted ads to site visitors.This cookie expires after 2 months or 1 year.
Uncategorised Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet. No cookies to display. Reject All Save My Preferences Accept All Toggle SearchToggle Mobile Navigation Publish AI, ML & data-science insights to a global community of data professionals. Sign inSubmit an Article LatestEditor's PicksNewsletterShipAI
Write For TDS LinkedInXToggle Search Artificial Intelligence
A Deep Learning model that provides accuracy and interpretability Nikos Kafritsas November 25, 202212 min read
Created with DALLE [1]
There's one thing that makes Time-Series Forecasting special.
It was the only area of Data Science where Deep Learning and Transformers didn't decisively outperform the other models.
Let's use the prestigious Makridakis M-competitions as a benchmark - a series of large-scale challenges that showcase the latest advances in the time-series forecasting area.
In the fourth iteration of the competition, known as M4 , the winning solution was ES-RNN [2], a hybrid LSTM & Exponential Smoothing model developed by Uber. Interestingly, the 6 (out of 57) pure ML models performed so poorly, they barely surpassed the competition baseline.
Learn this step by step with the interactive AI Engineer, AI and Data Scientist, Machine Learning and Computer Science roadmaps.
That changed one year later. Elemental AI (co-founded by Yoshua Bengio) published N-BEATS [3], a pure Deep-Learning model that outperformed the winning ES-RNN model of M4 by 3%. But there's more.
In this article, we describe in depth:
Let's dive in.
I've launched AI Horizon Forecast, a newsletter focusing on time-series and innovative AI research. Subscribe here to broaden your horizons!
N-BEATS is a fast, interpretable DL model that recreates the mechanisms of statistical models using double residual stacks of fully connected layers. N-BEATS stands for N eural B asis E xpansion A nalysis for T ime S eries, a revolutionary model created by ElementAI. This company was co-founded by Yoshua Bengio and was later acquired by ServiceNow. N-BEATS **** is an interesting forecasting model because:
Around that time, Amazon published its novel time-series model, known as DeepAR [4]. Although DeepAR contains __ Deep Learning components, the model employs a few statistical concepts as well (maximum likelihood estimation).
Let's briefly discuss a few key traits of N-BEATS :
Note: The original N-BEATS implementation by ElementAI works on univariate time-series only. The Darts library has released an updated version that supports multivariate time-series and probabilistic outputs. In this article, we focus on the original version.
The N-BEATS architecture is deep, yet very simple. Figure 1 displays the top-level view:
Figure 1: The top-level architecture of N-BEATS (Source)
Notice 3 things:
Every neural network layer in the model is just a dense (fully-connected) layer. Let's start with the first component, the basic block:
Suppose H is the forecasting horizon. In N-BEATS , the lookback window is a multiple of the horizon H .
Figure 2 displays the architecture of the basic block:
Figure 2: The basic Block architecture (Source)
Let's take a look under the hood.
In Figure 3, we **** use the parameters of the paper's benchmark from the** Electricity dataset [5**]:
Figure 3: All operations inside the basic Block (Image by author)
Let's see what happens here:
3 days = 72 hours =3 horizons to predict the power usage of the next 24 hours.θ^b and θ^f), which are called expansion coefficients.g^b and g^f to produce the backcast and forecast signals. This process is called "neural basis expansion ".So**,** how the backcast and forecast vectors are useful? The backcast signal is the best-approximated vector that can optimally predict the forecast signal, given the
g^bandg^ftransformations. Wheng^bandg^ftake specific forms, the backcast and forecast vectors become interpretable (more to that later).
To increase the effectiveness of the neural expansion process, the authors stack many blocks together. This structure is displayed in Figure 4:
Figure 4: Stack of blocks (left) and stack of stacks (right) - (Source)
Only the first block receives the original sequence input. The downstream blocks receive the backcast signal **x_l+1**from the previous block (wherel is the block index, i.e. l_1 is the first block in the stack).
Figure 5: Operations inside the block (Image by author)
Inside each stack, the backcast and forecast signals are organized into two branches: This topology is called doubly residual stacking and can be **** described by the following equations:
In each block, the model removes the part of the backcast signal **x̂** _lfrom the input **x**_l that has approximated well. In other words:
The model at each block learns to optimally approximate a portion of the input signal, and sends the rest to be approximated by the downstream blocks. Since each block models only a portion of the input signal, the final forecast is the sum of all forecast
ŷsignals from all blocks. Finally, the stacks are also stacked (Figure 4, right). This architectural choice further increases the depth of the model and enhances its ability to learn complex time sequences. We have seen how the generic version of N-BEATS works. Next, we will describe the interpretable version.
If you are familiar with ARIMA , you might have noticed a few similarities with the N-BEATS approach . ARIMA is modeled using the Box-Jenkins method, which is an iterative process. Specifically:
p and q parameters).p and q degrees on top of the previous ones.In other words, in each step of Box-Jenkins, we add more information to our model. Each iteration creates a better representation of the input, based on the model residuals. Hence, we can conclude that:
In N-BEATS, each successive block models only the residual error due to the reconstruction of the backcast from the previous block and then updates the forecast based on that error. This process mimics the Box-Jenkins method when fitting ARIMA models. The main difference between the 2 approaches is the target function of the residuals. ARIMA focuses on the quality of the residuals, while N-BEATS uses an arbitrary loss function. Plus, we don't manually adjust any equation with N-BEATS — the basis transformations are automatically optimized with backpropagation. With ARIMA however, we make heavy use of autocorrelation and partial autocorrelation plots to guess the order of
AR()andMA()functions. Note: Some ARIMA libraries implement the Box-Jenkins method with slight variations, depending on the programming language and the library. Here, we document the textbook implementation.
With a few changes, the N-BEATS model can become interpretable: These are:
g^b and g^f are shared at the stack level.The basic idea is that g^b and g^f basis take specific forms. Let's describe them in more detail.
Our goal is to restructure the g^b and g^f functions as monotonic that vary slowly across the forecast window.
Given a time vector t=[0,1,2,...,H −2,H −1] (H is the horizon), the thetas θ from the previous layer and the polynomial degree p, the trend model is defined as:
In other words, we use the architecture of Figure 3 (the generic block) and swap the last linear layer with the above operation. The result is shown in Figure 6:
Figure 6: The Trend block (Image by author)
The backcast equations are not described in the paper, but they can easily be derived from the project's implementation. Moreover, the trend and seasonality blocks (Figure 6 and Figure 7) adopt the parameters from the official project repo:
ini
interpretable.seasonality_layer_size = 2048
interpretable.seasonality_blocks = 3
interpretable.seasonality_layers = 4
interpretable.trend_layer_size = 256
interpretable.degree_of_polynomial = 3
interpretable.trend_blocks = 3
interpretable.trend_layers = 4
interpretable.num_of_harmonics = 1
Similarly, we swap the final layer with appropriate g^b and g^f functions that capture seasonality. An excellent candidate would be the Fourier series:
Then, the architecture becomes:
Figure 7: The Seasonality block (Image by author)
Again, we stress that in all interpretable stacks, the g^b and g^f weights within the stack are shared.
Finally, the authors tested the performance of N-BEATS in 3 popular time-series datasets - M3[6], M4[7], and Tourism[8].
The authors categorized all models into specific classes and compared N-BEATS with the best model of each class. For example, the DL/TS hybrid is the winning ES-RNN model on M4.
Since all these datasets were used for data science competitions, all participants relied on ensembling to achieve maximum performance. Hence, the N-BEATS authors relied on ensembling to be comparable. They used three variations: N-BEATS-G (generic), N-BEATS-I (interpretable), **** an** d N-BEATS-I+**G (ensemble of all models from N-BEATS-G and N-BEATS-I).
On top of that, they created 6 different models with look back windows 2H, 3H .. 7H for every horizon and variation. For extra details about the ensembling configurations, check the original paper. In total, the authors ensembled 180 models to report the final results on the test set.
The results for all datasets are shown in Figure 8:
Figure 8: Experimental results on M3, M4, and Tourism datasets (Source)
The results are quite impressive.
The N-BEATS outperforms the other implementations on all datasets, with N-BEATS-I+G being the most successful.
Note that in every dataset, the competitions use the MAPE, sMAPE, and OWA metrics (lower is better). These metrics are popular in time-series competitions.
Note: Contrary to the other approaches, N-BEATS does not require any hand-crafted feature engineering, or input scaling. Thus, N-BEATS is far more easier to use in different time-series tasks.
The main contribution of N-BEATS is its ability to successfully implement transfer learning on time series.
Transfer learning is a more general term— it refers to how a model can transfer its knowledge across different datasets. This is already established on Computer Vision or NLP tasks: We can download a pretrained model and adjust it to our dataset with fine-tuning. Meta-learning (or few-shot-learning) is when the model can adapt to our dataset with little training/fine-tuning. The best scenario is zero-shot learning , where the model is not trained on the target dataset.
Zero-shot learning is the model's ability to make predictions using unseen data, without having specifically trained on them. This learning method better reflects the human perception. Besides, this new paradigm shift towards meta-learning has been embraced by the latest AI research, such as OpenAI —CLIP [9] and Whisper[10] are a few of them.
Yoshua Bengio (co-author of N-BEATS) has already established the theoretical foundation of transfer learning on forecasting tasks in his previous work [11].
The authors of N-BEATS published a follow-up paper[12] where it summarizes most of this work, including what requirements a time-series forecasting model should meet to perform efficient transfer learning.
Let's focus on N-BEATS.
The authors state that N-BEATS's meta-learning ability hinges on two procedures: i) the inner learning procedure and the outer learning procedure. They are shown in Figure 9:
Figure 9: Meta-learning procedures in N-BEATS (Source, edited by author)
The inner loop takes place inside each block and focuses on learning task-specific characteristics.
The outer loop takes place at the stack level. Here, the model learns global characteristics across all tasks.
In other words, the inner loop learns local temporal traits, while the outer loop learns longer dependencies across all time-series. However, this begs the following section:
If an established paradigm dictates which criteria a forecasting model should meet to be appropriate for transfer learning, then why ARIMA is not? To answer this question, we will again focus on the two learning procedures described by [12] When creating an ARIMA model, there are 2 challenges:
Notice that statistical models only pass the first criterion, the inner loop. The parameter estimation part is straightforward once we have chosen our model. However, the model formulation part requires human intervention. Therefore, regarding the statistical approaches, the role of the outer loop is not fulfilled. Thus, we conclude:
N-BEATS replaces the predefined set of rules for model parameter estimation of classical statistical models with a learnable parameter estimation strategy. This strategy allows N-BEATS to generalize well on multiple, unseen time sequences.
In this experimental analysis, the authors enrich the results of the previous benchmark (Figure 8) with some new models:
The total results are shown in Figure 10 :
Figure 10: Comparison of zero-shot models (Source)
Again, the results are very interesting.
N-BEATS is a breakthrough Deep Learning forecasting model that has left a lasting impact on the time-series field. In this article, we described the two main strengths of N-BEATS : First, it's a powerful model that produces SOTA results. Secondly, N-BEATS establishes a well-defined framework for implementing zero-shot transfer learning. To the best of my knowledge, this is the first model to achieve this successfully. In our next articles, we will present a programming tutorial with N-BEATS, and describe a newer paper, called N-HiTS.
AutoGluon-TimeSeries : Creating Powerful Ensemble Forecasts - Complete Tutorial
[1] Created from DALLE with the text prompt "a neon sinusoidal signal transmitting through space, concept art", to rg [2] Slawek Smyl et al. M4 Forecasting Competition: Introducing a New Hybrid ES-RNN Model [3] Boris O. et al. N-BEATS: Neural Basis Expansion Analysis For Interpretable Time Series Forecasting , ICLR (2020) [4] D. Salinas et al. DeepAR: Probabilistic forecasting with autoregressive recurrent networks, International Journal of Forecasting (2019). [5] ElectricityLoadDiagrams20112014 dataset by UCI, CC BY 4.0. [6] M3 Dataset https://forecasters.org/resources/time-series-data/, Public domain [7] M4 Dataset https://forecasters.org/resources/time-series-data/, Public domain [8] Tourism Dataset https://www.kaggle.com/c/tourism1, Public domain [9] Alec Radford et al. Learning Transferable Visual Models From Natural Language Supervision (Feb 2021) [10] Alec Radford et al. Robust Speech Recognition via Large-Scale Weak Supervision (September 2022) [11] Yoshua Bengio et al. Learning a synaptic learning rule [12] Boris O. et al. Meta-learning framework with applications to zero-shot time-series forecasting
All articles on Towards Data Science are available to registered users. Create a free account today to access this article and thousands more. Register for freeSign in to your account
Written By
See all from Nikos Kafritsas Artificial IntelligenceData ScienceDeep LearningScienceTime Series Forecasting Share This Article
Towards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program. Write for TDS
Artificial Intelligence And how I managed to solve them without spending a dime of my non-existent savings Vagif Aliyev August 16, 20217 min read
Artificial Intelligence Let's kick the tires on a brand new library Daniel Shapiro, PhD July 1, 20209 min read
Data Science Basic and Advanced Techniques for the 21st Century Data Scientist TheDataProf July 7, 20216 min read
Machine Learning How to select the right predictors using statistical measures Jack Tan September 13, 20200 min read
Artificial Intelligence Comprehensive overview of open-source libraries for automatic language detection Zoumana Keita February 21, 20222 min read
Artificial Intelligence A quick summary through the problems faced by AI today! Alexiei Dingli April 1, 202114 min read
Machine Learning Data Mining and a Simple Starter Model Taras Baranyuk February 15, 20219 min read
Artificial Intelligence Predicting flowers' variety with a single layer neural network without a deep learning library Giovanni Valdata April 5, 202210 min read
Programming A look into a tool that allows a pain-free troubleshooting experience Aashish Nair September 20, 20224 min read
Your home for data science and AI. The world's leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals. Subscribe to Our NewsletterWrite For TDS•About•Advertise•Privacy Policy•Terms of Use © Insight Media Group, LLC 2026•The New Stack•roadmap.sh•Creator Network
Close