Time series forecasting
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2026-08-13
Smart Images

Figure EP2025053259_13082026_PF_FP_ABST
Abstract
Description
[0001] TIME SERIES FORECASTING
[0002] TECHNICL FIELD
[0003] This disclosure relates to an apparatuses and methods for time series forecasting.
[0004] BACKGROUND
[0005] Accurate time series forecasting can be an essential component of various major industries, spanning tasks including finance, weather forecasting, and cloud computing. Over the last decade there has been rapid development in machine learning models for time series forecasting. Where traditional econometric and statistical methods were once standard, modem machine learning techniques now dominate. As a consequence, practitioners in these domains are required to adopt, train and deploy increasingly advanced machine learning models to remain competitive. The machine learning methods mainly take the form of deep learning models, which can exploit non-linear relationships in the data. Additionally, there has been work on using more general and large deep learning models, called foundation models, to perform time series forecasting, which are trained on curated large datasets of time series, consisting of billions of training points.
[0006] In a time series forecasting setting, when a forecast model is deployed, new data arrives sequentially over time. This incoming data provides feedback on the accuracy of the model’s forecasts and reveals any changes in the underlying behaviour of the time series. This online feedback is valuable and presents an opportunity to enhance the model’s performance. However, for most forecasting models, there is no efficient mechanism to exploit this feedback for continuous improvement. As a result, the forecast model usually remains fixed after deployment, and practitioners must accept that its performance may degrade over time.
[0007] An alternative approach to keeping the forecast model fixed is regular retraining of the forecast model. This consists of collecting new time series data and using this data to retrain the forecast model from scratch with some regularity. For example, every month or week. This ensures that the forecast model performance does not dramatically degrade as it is regularly exposed to more recent, and therefore more relevant, training data.
[0008] A more sophisticated alternative to regular retraining of the forecast model from scratch is dynamic updating of the model parameters. This idea has a long history, which is studied in area of machine learning research called continual / lifelong learning. For example, there is work looking at how to update a model online given new data which is either from the same distribution or from a shifting distribution.
[0009] The follow patents disclose the three main types of previous work in this area:
[0010] US10936947B1 : Recurrent neural network-based artificial intelligence system for time series predictions. The patent covers a system for time series forecasting using a Recurrent Neural Network (RNN).
[0011] EP3259881B1: Adaptive, anomaly detection-based predictor for network time series data. The patent covers a system for anomaly detection-based time series prediction. A primary predictor and an alternative predictor are used to forecast a time series.US11556756B2: Model training method, apparatus, and system. This patent covers a system to to obtain local version of a machine learning model sent by a central server; and performing incremental training on the machine learning model based on a local training dataset.
[0012] Each of the methods discussed above has a drawback. The simplest approach discussed is keeping the forecast model fixed. When employing this policy there is a significant risk that the performance of the deployed model will degrade over time. The model has been trained on data drawn from some historic time period and has learned the patterns present during this time period. In practice time series can evolve over time and these patterns in the data may change or disappear. As a consequence, a formerly effective forecast model may become less effective over time.
[0013] Regular model retraining can mitigate the problems of distribution shift as the model is exposed regularly to the most up-to-date data. However intermittent retraining of the forecast model is also problematic for a number of reasons: Retraining is generally expensive. Retraining a model from scratch generally requires extensive computational resources, expertise and time. These barriers limit the frequency by which one can feasibly retrain meaning that the forecast model does not ‘observe’ important changes in distribution with the desired immediacy.
[0014] The final approach mentioned is dynamic updating of the forecast model parameters. Importantly, most work in continual learning domain looks at the vision or text problems and there has been relatively little work on continual learning for times series. There are two main problems when using continual learning for time series forecasting: a) Updating the weights of a deep learning model, especially for larger deep models, at the frequency often required for times series data and with the resources usually available (e.g., a CPU) can often make such methods infeasible to use in practice, b) The process of online updating of deep models suffers from catastrophic forgetting, where the model's performance on old data degrades, and a loss of plasticity, where it becomes increasingly harder to update the model to take into account new data. Solutions to this currently requires retraining on large amounts of historic data and complex learning routines, each of which only work for a particular subset of model types.
[0015] It is desirable to develop an apparatus and method that overcomes the above problems.
[0016] SUMMARY
[0017] According to a first aspect, there is provided a computer apparatus for generating a time series forecast output, the computer apparatus comprising one or more processors and a memory storing in non-transient form data defining program code executable by the one or more processors, wherein the program code is executable by the one or more processors so that the computer apparatus is configured to : obtain a time series context, the time series context comprising time series data of a current time period; using a first model, determine a first time series forecast, the first time series forecast comprising first time series data of a future time period, the first model being pre-trained; using a second model, determine a second time series forecast, the second model being trained online; and combine the first time series forecast with the second time series forecast to generate the time series forecast output, the time series forecast output comprising time series data of the future time period. In this way, the online trained second model may allow the system to adapt to the current time series data with improved performance.
[0018] In some implementations, the second time series forecast may comprise second time series data of the future time period. The first time series data and the second time series data may be combined to generate the time series forecast output. In this way, the second time series data itself may be used to produce the time series forecast output.In some implementations, the second time series forecast may comprise an estimated loss between the first time series data of the future time period and true data of the future time period. The first time series data and the estimated loss may be combined to generate the time series forecast output. In this way, the loss of the first model may be used to produce the time series forecast output.
[0019] In some implementations, the first time series forecast and the second time series forecast may be combined using a weighter model. The weighter model may apply weights to the first time series forecast and the second time series forecast. In this way, outputs from the first and second models may be weighted differently in the produced time series forecast output.
[0020] In some implementations, the weighter model may be trained online based on a previous first time series forecast. In this way, the weighter model may be kept up to date based on the current first time series forecast.
[0021] In some implementations, the weighter model may be trained online based on a loss between the previous first time series forecast time series data and the true data of the corresponding time period. In this way, the weighter model may be kept up to date based on the accuracy of the current first time series forecast.
[0022] In some implementations, the weighter model may be trained by updating the weights applied to the first time series forecast and the second time series forecast. The weights may be updated based on performance of first model and the second model with respect to the true data of the corresponding time period. In this way, the outputs from the first and second models may be weighted differently in the produced time series forecast output depending on the model’s performance.
[0023] In some implementations, the weights may comprise fast weights to capture a local data distribution and slow weights to capture global trends. The fast weights and the slow weights may be combined to give to the weights applied to the first time series forecast and the second time series forecast. In this way, current data may be weighted differently to previous data depending on the requirements.
[0024] In some implementations, the second model may be trained online based on a previous first time series forecast and / or a true time series data of a previous time period corresponding to the time series of the time series context. In this way, the second model may be kept up to date based on the current first time series forecast.
[0025] In some implementations, the second model may be trained online based on a loss between the previous first time series forecast time series data and the true data of the corresponding time period. In this way, the second model may be kept up to date based on the accuracy of current first time series forecast.
[0026] In some implementations, the first model may be pre-trained based on true time series data of a previous time period corresponding to the time series of the time series context and / or corresponding to a different time series. In this way, historical data may be used to train the first model before it is used, either from the same or different time series to the time series context input.
[0027] In some implementations, the first model may have a first training update time, and the second model may have a second training update time. The second training update time may be less than the first training update time. In this way, the only the model with the shorter update time may need to be trained, improving performance.In some implementations, the first model may be a deep learning model. In some implementations, the second model may be a linear regression model. In this way, the only the model with the shorter update time may need to be trained, improving performance.
[0028] In some implementations, the apparatus may be configured to receive a user query, the user query may comprise a request for time series data of the future time period; and to output the time series forecast output to the user in response to receiving the user query. In this way, the system may be used for time series forecast user queries.
[0029] According to a second aspect, there is provided a method for generating a time series forecast output, the method comprising the steps of: obtaining a time series context, the time series context comprising time series data of a current time period; using a first model, determining a first time series forecast, the first time series forecast comprising first time series data of a future time period, the first model being pre-trained; using a second model, determining a second time series forecast, the second model being trained online; and combining the first time series forecast with the second time series forecast to generate the time series forecast output, the time series forecast output comprising time series data of the future time period. In this way, the online trained second model may allow the system to adapt to the current time series data with improved performance.
[0030] BRIEF DESCRIPTION OF THE FIGURES
[0031] The present disclosure will now be described by way of example with reference to the accompanying drawings. In the drawings:
[0032] Figure 1 is a schematic illustration of a prior art time series forecasting procedure.
[0033] Figure 2 is a schematic illustration of a first time series forecasting procedure of the present system.
[0034] Figure 3 is a schematic illustration of a second time series forecasting procedure of the present system.
[0035] Figure 4 is a schematic illustration of a third time series forecasting procedure of the present system.
[0036] Figure 5 is a schematic illustration of a weighting procedure of a weighter model of the present system.
[0037] Figure 6 shows an example of a computer implemented method of the procedure of the present system.
[0038] Figure 7 shows an example of a computer apparatus configured to perform the methods described herein.
[0039] DETAILED DESCRIPTION
[0040] The apparatuses and methods described herein concern time series forecasting.
[0041] Embodiments of the present disclosure may tackle one or more of the problems previously mentioned by: using a first model, determining a first time series forecast, the first time series forecast comprising first time series data of a future time period, the first model being pre-trained; using a second model, determining a second time series forecast, the second model being trained online; and combining the first time series forecast with the second time series forecast to generate the time series forecast output, the time series forecast output comprising time series data of the future time period. In this way, system may adapt to the current time series data with improved performance.The following key terms are used herein:
[0042] AdapTS - name of present system.
[0043] Base model - generic name of the fixed forecaster whose forecasts are adjusted by AdapTS.
[0044] AdapTS-Forecaster - name of forecasting component of AdapTS.
[0045] AdapTS-Weighter - name of weighting component of AdapTS, used to combine the forecasts of the base model and AdapTS forecaster.
[0046] Online Learning - is the process of updating a system / model repeatedly given a new data which may arrive continuously.
[0047] The present system aims to solve at least the following 3 problems:
[0048] 1. The general problem of providing accurate forecasts of times series in deployment, particularly for cloud data. 2. The problem that models become out-of-date as the data they trained on becomes older, requiring an efficient method for adjusting forecasts to maintain performance.
[0049] 3. Quick adaptation to shifts in the behaviour on different cloud resources.
[0050] The present system proposes AdapTS (online Adaption for Time Series), a lightweight approach for adapting the forecasts of a pre-trained time series forecast model which may be referred to hereafter as the base model or base forecast model.
[0051] AdapTS may employ a lightweight online model to extract information from time series data, using it to adapt the forecasts of a pretrained base forecast model to improve performance (as outlined in Figure 2). The proposed approach may be used out-the-box and may be used to enhance the performance of any fixed time series base forecast model.
[0052] AdapTS may comprise of two components: a) The AdapTS-Forecaster 212: A lightweight forecast model which may be trained online, b) The AdapTS-Weighter 213 which may combine the forecasts 202, 203 of the base model 211 and the AdapTS-Forecaster 212 using an online weighting policy.
[0053] Figure 2 is a schematic illustration of a first time series forecasting procedure 200 of the present system.
[0054] A time series context 201 may be received. The time series context 201 may comprise time series data of a current time period. The time series data may be numerical time series data points. The current time period may be the immediately previous time period. For example, the time series context 201 may be the last minute, hour, day etc. The time series context 201 may be received continuously or periodically.
[0055] The procedure 200 may be configured to output a time series forecast output 204 based on the time series context 201. The time series forecast output 204 may comprise time series data of a future time period. Put simply, the time series forecast output 204 may be an estimation of the future time series data following the time series context 201 time series data. The procedure 200 may generate this estimation.
[0056] The time series context 201 may be received as part of a user query. A user query may be received. The user query may be received from a user device. The user device may be separate to, or the same as, the device which carries out the procedure 200. The user query may comprise a request for time series data of a future time period. The user query may comprise the time series context 201. The procedure 200 may output the time series forecast output 204 to the user in response to receiving the user query. The time series forecast output 204 may be provided to the user device.
[0057] The procedure 200 may comprise a first model 211. The first model 211 may be pre-trained. The first model 211 may have been pre-trained based on historical time series data. The first model 211 may be pre-trained based on true time series data ofa previous time period corresponding to the time series of the time series context. Put another way, the first model 211 may have been pre-trained on historical data in the time series of the time series context 211. This historical data may be older than the data in the time series context 201. Alternatively, or in addition, the first model 211 may be pre-trained based on true time series data of a previous time period corresponding to a different time series. Put another way, the first model 211 may have been pre-trained on historical data in a different time series to the time series context 211. The time series may be similar, but different, to the time series of the time series context 211. The first model 211 may not be online trained.
[0058] The first model 211 may not be trained / updated during its use in the procedure 200. The first model 211 may be set during its use in the procedure 200. This may reduce the update time for the overall procedure 200. Alternatively, the first model 211 may also be online trained, if this is required.
[0059] The first model 211 may receive the time series context 201. The first model 211 may be used to determine a first time series forecast 202. The first time series forecast 202 may comprise first time series data of a future time period. Put another way, the first time series forecast 202 may be an estimation of the future time series data following the time series context 201 time series data, as determined by the first model 211.
[0060] The procedure 200 may comprise a second model 212. The second model 212 may be trained online. The second model 212 may be trained based on past predictions 202, 203, 204 of the procedure 200. The second model 212 may be trained based on the past predictions 202 of the base model 211, past predictions 203 of the second model 212 and / or the true time series data which corresponds to the past predictions of the procedure 200. The second model 212 may be trained online based on a previous first time series forecast 202, a previous second time series 203, and / or a true time series data of a previous time period corresponding to the time series of the time series context 201. In particular, the second model 212 may be trained online based on a loss between the previous first time series forecast 202 and the true data of the corresponding time period, and / or a loss between the previous second time series forecast 203 and the true data of the corresponding time period. Put another way, the second model 212 may be trained based on previous outputs 202, 203 of the first model 211 and the second model 212, and how accurate they were compared to the true data for that time period.
[0061] The second model 212 may have also been pre-trained based on historical time series data. The second model 212 may be pretrained based on true time series data of a previous time period corresponding to the time series of the time series context. Put another way, the second model 212 may have been pre-trained on historical data in the time series of the time series context 211. This historical data may be older than the data in the time series context 201. Alternatively, or in addition, the second model 212 may be pre-trained based on true time series data of a previous time period corresponding to a different time series. Put another way, the second model 212 may have been pre-trained on historical data in a different time series to the time series context 211. The time series may be similar, but different, to the time series of the time series context 211.
[0062] The second model 212 may receive the time series context 201. The second model 212 may be used to determine a second time series forecast 203. The second time series forecast 203 may comprise second time series data of a future time period. Put another way, the second time series forecast 203 may be an estimation of the future time series data following the time series context 201 time series data, as determined by the second model 212. Alternatively, or in addition, the second time series forecast 203 may comprise an estimated loss between the first time series data of the future time period and true data of the future time period. Put another way, the second time series forecast 203 may be an estimation of the loss between the first time series data estimated by the first model 211 and the true data of the corresponding future time period. The loss may be an error or residual between the first time series data estimated by the first model 211 and the true data of the corresponding future time period. The second model 212 may directly determine the loss between the first time series data of the future time period and true data of the future time period, without needing to determine second time series data of a future time period.The first model 211 may have a first training update time. The second model 212 may have a second training update time. The update training time may be the time required to update the model 211, 212. The second training update time may be less than the first training update time. The second model 212 may be quicker to update than the first model 211. As the first model 211 may be pre-trained, this slower update time may not affect the efficiency of the procedure 200. As the second model 212 may be online trained, the faster update time may have less of an effect on the efficiency of the procedure 200. In a particular implementation, the first model 211 may be a deep learning model. In a particular implementation, the second model 212 may be a linear regression model.
[0063] The procedure 200 may comprise a weighter model 213. The weighter model 213 may be trained online. The weighter model 213 may be trained based on past predictions 202, 203, 204 of the procedure 200. The weighter model 213 may be trained based on the past predictions 202 of the base model 211, past predictions 203 of the second model 212 and / or the true time series data which corresponds to the past predictions of the procedure 200. The weighter model 213 may be trained online based on a previous first time series forecast 202, a previous second time series 203, and / or a true time series data of a previous time period corresponding to the time series of the time series context 201. In particular, the weighter model 213 may be trained online based on a loss between the previous first time series forecast 202 and the true data of the corresponding time period, and / or a loss between the previous second time series forecast 203 and the true data of the corresponding time period. Put another way, the weighter model 213 may be trained based on previous outputs 202, 203 of the first model 211 and the second model 212, and how accurate they were compared to the true data for that time period.
[0064] The weighter model 213 may receive the first time series forecast 202 and the second time series forecast 203. The first time series forecast 202 and the second time series forecast 203 may be combined. The first time series forecast 202 and the second time series forecast 203 may be combined to generate the time series forecast output 204. The weighter model 213 may be used to combine the first time series forecast 202 and the second time series forecast 203. If the second time series forecast 203 comprises second time series data of the future time period, the first time series data and the second time series data may be combined to generate the time series forecast output 204. If the second time series forecast 203 comprises an estimated loss between the first time series data of the future time period and true data of the future time period, the first time series data and the estimated loss may be combined to generate the time series forecast output.
[0065] The weighter model 213 may apply weights 510 to the first time series forecast 202 and the second time series forecast 203. The weighter model 213 may apply different weights 510 to the first time series forecast 202 and the second time series forecast 203 respectively. As described herein, the weighter model 213 may be trained online. The weighter model 213 may be trained by updating the weights 510 applied to the first time series forecast 202 and the second time series forecast 203. The weights may be updated based on performance of the first model 211 and the second model 212 with respect to the true data of the corresponding time period. Put simply, the weights 510 of the weighter model 213 may be adjusted depending on the performance of the first model 211 and the second model 212. If one model is performing better than the other, the weights 510 may be higher for the better performing model.
[0066] The weights 510 may comprise fast weights 505 to capture a local data distribution and slow weights 507 to capture global trends, the fast weights 505 and the slow weights 507 being combined to give to the weights 510 applied to the first time series forecast 202 and the second time series forecast 203.
[0067] The procedure 200 may be applied to autoscaling numbers of node instances. Figure 3 shows a procedure 300 for autoscaling number of node instances.
[0068]
[0069] Input: An online monitoring framework provides the past number of invocations each function had over a given time period -past instances 201a, 201b, 201c.
[0070] Output: A forecast of the number of invocations for each function will have over the next given number of hours / days 204a, 204b, 205c to the autoscaler 311 such that the system can scale up or down the number of containers used to compute functions to the given current demand. This provides the scales 301a, 301b, 301c.
[0071] Current SoTA: A fixed pretrained base forecaster 21 la, 211b, 211c is used to generate the forecasts. This can be any forecasting method including time-series foundation models or any other time-series forecasting methods.
[0072] Proposed system - AdapTS: This differs from the current approach as it adapts the forecasts of the fixed base forecaster 211a, 21 lb, 211c online given feedback by the system. The adaption is performed by combining the pretrained forecasters forecast with one generated by an AdapTS-Forecaster (one for each function) 212a, 212b, 212c and is combined using the AdapTS-Weighter (online weighter) 213a, 213b, 213c.
[0073] The way AdapTS uses the online feedback to improve performance is presented for a single function in Figure 4. Figure 4 shows such a procedure 400. As shown in Figure 4 the feedback 401, 402 is given by an online monitoring system 312 in the form of newly available time series values and is used to update the AdapTS-F orecaster 212 and AdapTS-W eighter 213 to the changing behaviour in function demand.
[0074] As described herein, the second time series forecast 203 may comprise second time series data of a future time period (embodiment 1). Alternatively, or in addition, the second time series forecast 203 may comprise an estimated loss between the first time series data of the future time period and true data of the future time period (embodiment 2). Each embodiment will be described below:
[0075] Embodiment 1
[0076] There may be two parts to running AdapTS, using it to improve the forecasts 202 of a base model 211 given (Forecasting using AdapTS) and updating AdapTS based on online feedback 401, 402 from seeing the new values of the time series (Updating AdapTS). Below these two parts are explained:
[0077] Forecasting using AdapTS:
[0078] A user / system may query for a forecast of a time series for some given length of time into the future. The system may assume access to the previous values of a time series.
[0079] First, a fixed base model 211 (prior art and typically a deep learning model) may be used to give a base forecast 202.
[0080] Second, the AdapTS-Forecaster may be used to generate a forecast 203. The AdapTS-Forecaster 212 may take the form of any efficiently-updatable model. By this we mean any forecaster 212 which is computationally cheap to alter in order toaccommodate the modelling of additional data. In one example, this may be a linear regression model in the Fourier domain fitted by least squares after dropping out of high frequency components.
[0081] Third, the base model forecast 202 and the AdapTS-Forecaster forecast 203 may be combined using the AdapTS-Weighter 213. The combined forecast 204 may takes the form of a weighted average / sum of the base model 211 and AdapTS-Forecasters 212 forecasts 202, 203 where the weights are given by the AdapTS-Weighter 213. In another example, the combination mechanisms could be to use a weighted geometric median. The AdapTS-Weighter 213 may be embodied by some exponential weighting scheme which efficiently learns online the best weights to combine the two forecasts 202, 203.
[0082] To improve performance, the AdapTS-Weighter 213 maybe embodied by a more adaptive mechanism, which is more sensitive to the current data distribution. Figure 5 illustrates how the weights 510 can be more sensitive. This may be achieved by using fast weights 505 to capture the performance 501, 502 of the base model 211 and AdapTS-Forecaster 212 on local data distribution, while also having slow weights 507 to capture the global performance 503, 504 of the base model 211 and AdapTS-Forecaster 212. These two weights 505, 507 are then combined to give a final weight 510 used to combine the forecasts 202, 203.
[0083] The combined forecast 204 may then be outputted as the forecast of the combined system.
[0084] Updating AdapTS— using true values of forecasts:
[0085] After seeing a given number of time points the AdapTS update mechanism may be called to update the AdapTS-forecaster 212 and AdapTS-Weighter 213 with this new data.
[0086] To update the AdapTS-Forecaster 212: Given the new time points, a learning rule may be used to update the weights of the AdapTS-Forecaster 212 in an efficient manner. This learning rule may be embodied the using the Woodbury identity to efficiently update the ordinary least squares solution on the all the data seen so far (applicable when AdapTS-Forecaster is a linear model).
[0087] To update the AdapTS-Weighter 213: Given the new time points, the performance of the base model 211 and AdapTS-Forecaster 212 may be computed on these time points. The relative performance of the base model 211 and AdapTS-Forecaster 212 may then be used in a learning rule to update the weights 510 given by the AdapTS-Weighter 213. For instance, this may be embodied by the exponential weighting update rule or more complex updating rules based on multiple exponential weighters as shown in Figure 5.
[0088] Referring to Figure 5, the AdapTS-Weighter 213 may comprise three components 511, 512, 513. The first component 511 may receive the local data distribution including most recent base model 211 losses 501 and most recent AdapTS-Forecaster 212 losses 502. The first component 511 may produce the fast weights 505, which may be converted into losses using the fast weights 506. The second component 512 may receive the global trends including all base model 211 losses 503 and all AdapTS-Forecaster212 losses 504. The second component 512 may produce the slow weights 507, which may be converted into losses using the fast weights 508. The third component 513 may receive the losses using fast weights 506 and the losses using slow weights 508. The third component 513 may merge the losses to product merged losses 509, from which the combined weights 501 or produced.Embodiment 2
[0089] In this embodiment forecasting using AdapTS may be similar to embodiment 1 with the main difference being in how the AdapTS-Forecaster 212 is used to predict the errors of the base model 211. This may then be used to adjust the forecast of the base model 211 as before. This embodiment may change how construct the AdapTS-Forecaster 212 is constructed and the loss may be used to update the AdapTS-Weighter 213.
[0090] Updating AdapTS using errors (residuals) of base model forecasts:
[0091] As in embodiment 1, after seeing a given number of time points the AdapTS update mechanism may be called to update the AdapTS-Forecaster 212 and AdapTS-Weighter 213 with this new data.
[0092] To update the AdapTS-Forecaster 212: Given the new time points, the residuals of the base model's forecasts may be computed on the newly seen time points. The residuals may be the difference between the predictions made by the base model 211 and the true values of the time series. A learning rule may then be employed to update the parameters of the AdapTS-Forecaster such that it can predict the residuals of the base model 211. In an embodiment where the AdapTS-Forecaster 212 is a linear regression model, updating may employ the Woodbury update rule. In contrast to embodiment 1, the Woodbury update may utilise the base model 211 residuals instead of the true target values.
[0093] To update the AdapTS-Weighter 213: Given the new time points we compute the performance of the base model 211 and the performance of combined forecast 204 of the AdapTS-Forecaster 212 and base model 211. These performance metrics may then be used in a learning rule to compute the new weights of the AdapTS-W eighter 213. For instance, as in embodiment 1 this may be embodied by the exponential weighting update rule or more complex updating rules based on multiple exponential weighters as shown in Figure 5, and as described in relation to embodiment 1.
[0094] The present system may have the following innovative points and corresponding advantages:
[0095] Efficient online adaption of base model forecasts - Using online feedback may improve forecast performances. Significantly reduced deployment cost may be achieved relative to regular model retraining.
[0096] Agnostic to base forecast model - Broadly applicable with minimal overhead.
[0097] Adaptive to changing data distribution - Improved reliability as the approach enables accurate forecasting despite shifts in underlying time series.
[0098] Applicable in settings where data cannot be permanently stored - Broader applicability than offline approaches.
[0099] The main benefits of the present system may be:
[0100] 1. The updating of the model forecasts may be efficient: It is only necessary to update the parameters of the lightweight online forecaster and the online weighter rather than the pre-trained forecast model.
[0101] 2. AdapTS may be agnostic to the choice of base model: Existing approaches may be applicable to a specific choice of pre-trained model. AdapTS may be used for any base model without making specific alterations. This may be because the outputs of the base model may be altered rather than the base model parameters.
[0102] 3. When there is a shift in the distribution of the time series, AdapTS may rapidly adjust the model forecasts to prevent a substantial degrade in performance.
[0103] 4. AdapTS may provide reduced computational cost relative to existing approaches, such as regular retraining from scratch of the base model. This may be beneficial as model retraining is generally computational expensive, time consuming and requires human expertise and time.While the main application of AdapTS is to time series forecasting for cloud usage / demand, the AdapTS may be applied more widely. AdapTS may be used for any time series forecasting application whereby the system is used continually such that AdapTS incrementally receives the values future time series datapoints. One example may be to predict solar or wind power outputs based on weather time-series which can be useful for intelligent power systems.
[0104] Figure 6 summarises an example of a method 600. At step 601, the method 600 comprises obtaining a time series context, the time series context comprising time series data of a current time period. At step 602, the method 600 comprises using a first model, determining a first time series forecast, the first time series forecast comprising first time series data of a future time period, the first model being pre-trained. At step 603, the method 600 comprises using a second model, determining a second time series forecast, the second model being trained online. At step 604, the method 600 comprises combining the first time series forecast with the second time series forecast to generate the time series forecast output, the time series forecast output comprising time series data of the future time period.
[0105] An example of computer apparatus 700 configured to implement the method 600 is schematically illustrated in Figure 6. The computer apparatus 700 may carry out the procedures 200 to 400 illustrated in Figures 2 to 4. The computer apparatus 700 may be implemented on an electronic device, such as a computer, a computer for a vehicle, laptop, tablet, or smart phone. The computer apparatus 700 may be connected to the internet.
[0106] The computer apparatus 700 comprises a processor 701 configured to process the datasets in the manner described herein. For example, the processor 701 may be implemented as a computer program running on a programmable device such as a Central Processing Unit (CPU). The computer apparatus 700 comprises a memory 702 which is arranged to communicate with the processor 701. Memory 702 may be a non-volatile memory. The processor 701 may also comprise a cache (not shown in Figure 7), which may be used to temporarily store data from memory 702. The computer apparatus 700 may comprise more than one processor 701 and more than one memory 702. The memory 702 may store data that is executable by the processor 701. The processor 701 may be configured to operate in accordance with a computer program stored in non-transitory form on a machine-readable storage medium. The computer program may store instructions for causing the processor to perform its methods in the manner described herein. The method steps described herein may be carried out by a computer-readable storage medium. The method steps described herein may be carried out by a computer program product.
[0107] The applicant hereby discloses in isolation each individual feature described herein and any combination of two or more such features, to the extent that such features or combinations are capable of being carried out based on the present specification as a whole in the light of the common general knowledge of a person skilled in the art, irrespective of whether such features or combinations of features solve any problems disclosed herein, and without limitation to the scope of the claims. The applicant indicates that aspects of the present disclosure may consist of any such individual feature or combination of features. In view of the foregoing description, it will be evident to a person skilled in the art that various modifications may be made within the scope of the disclosure.
Claims
CLAIMS1. A computer apparatus (700) for generating a time series forecast output (204), the computer apparatus (700) comprising one or more processors (701) and a memory (702) storing in non-transient form data defining program code executable by the one or more processors (701), wherein the program code is executable by the one or more processors (701 ) so that the computer apparatus (700) is configured to:obtain a time series context (201), the time series context (201) comprising time series data of a current time period; using a first model (211), determine a first time series forecast (202), the first time series forecast (202) comprising first time series data of a future time period, the first model (211) being pre-trained;using a second model (212), determine a second time series forecast (203), the second model (212) being trained online; andcombine the first time series forecast (202) with the second time series forecast (203) to generate the time series forecast output (204), the time series forecast output (204) comprising time series data of the future time period.
2. A computer apparatus (700) according to claim 1, wherein second time series forecast (203) comprises second time series data of the future time period, the first time series data and the second time series data being combined to generate the time series forecast output (204).
3. A computer apparatus (700) according to claim 1 or 2, wherein second time series forecast (203) comprises an estimated loss between the first time series data of the future time period and true data of the future time period, the first time series data and the estimated loss being combined to generate the time series forecast output.
4. A computer apparatus (700) according to any preceding claim, wherein the first time series forecast (202) and the second time series (203) forecast are combined using a weightermodel(213), the weighter model (213) applying weights (510) to the first time series forecast (202) and the second time series forecast (203).
5. A computer apparatus (700) according to claim 4, wherein the weighter model (213) is trained online based on a previous first time series forecast (202).
6. A computer apparatus (700) according to claim 5, wherein the weighter model (213) is trained online based on a loss between the first time series forecast (202) time series data and the true data of the corresponding time period.
7. A computer apparatus (700) according to claim 5 or 6, wherein the weighter model (213) is trained by updating the weights (510) applied to the first time series forecast (202) and the second time series forecast (203), and optionally wherein the weights (510) are updated based on performance of first model (211) and the second model (212) with respect to the true data of the corresponding time period.
8. A computer apparatus (700) according to any of claims 4 to 7, wherein the weights (510) comprise fast weights (505) to capture a local data distribution and slow weights (507) to capture global trends, the fast weights (505) and the slow weights (507) being combined to give to the weights (510) applied to the first time series forecast (202) and the second time series forecast (203).
9. A computer apparatus (700) according to any preceding claim, wherein the second model (212) is trained online based on a previous first time series forecast (202) and / or a true time series data of a previous time period corresponding to the time series of the time series context (201).
10. A computer apparatus (700) according to claim 9, wherein the second model (212) is trained online based on a loss between the previous first time series forecast (202) time series data and the true data of the corresponding time period.
11. A computer apparatus (700) according to any preceding claim, wherein the first model (211) is pre-trained based on true time series data of a previous time period corresponding to the time series of the time series context (201) and / or corresponding to a different time series.
12. A computer apparatus (700) according to any preceding claim, wherein the first model (211) has a first training update time, and the second model (212) has a second training update time, the second training update time being less than the first training update time.
13. A computer apparatus (700) according to any preceding claim, wherein the first model (211 ) is a deep learning model; and / or wherein the second model (212) is a linear regression model.
14. A computer apparatus (700) according to any preceding claim, wherein the apparatus (700) is configured to receive a user query, the user query comprising a request for time series data of the future time period; and to output the time series forecast output (204) to the user in response to receiving the user query.
15. A method (600) for generating a time series forecast output, the method comprising the steps of:obtaining (601 ) a time series context, the time series context comprising time series data of a current time period; using a first model, determining (602) a first time series forecast, the first time series forecast comprising first time series data of a future time period, the first model being pre-trained;using a second model, determining (603) a second time series forecast, the second model being trained online; and combining (604) the first time series forecast with the second time series forecast to generate the time series forecast output, the time series forecast output comprising time series data of the future time period.