Method and apparatus for retrieval augmented forecasting in time series foundation models and computer device
The retrieval-augmented framework addresses the challenge of short input series in time series foundation models by combining similar series with the input to enhance forecasting accuracy, leveraging cross-variate dependencies without fine-tuning.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SIEMENS AG
- Filing Date
- 2025-01-27
- Publication Date
- 2026-07-30
AI Technical Summary
Time series foundation models struggle with short input series due to insufficient information context, leading to reduced accuracy in forecasting, and existing retrieval augmented methods do not leverage cross-variate dependencies effectively.
A retrieval-augmented framework that searches for similar time series in a database, combines them with the input series to form a combined input, and inputs this into the time series foundation model for improved forecasting accuracy.
Significantly enhances the ability of time series foundation models to handle short input series by providing sufficient context for accurate forecasting without the need for fine-tuning, improving zero-shot forecasting accuracy.
Smart Images

Figure CN2025075480_30072026_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS FOR RETRIEVAL AUGMENTED FORECASTING IN TIME SERIES FOUNDATION MODELS AND COMPUTER DEVICETECHNICAL FIELD
[0001] This application relates to the field of machine learning, in particular, to the field of time series forecasting, and specifically, to a method and an apparatus for retrieval-augmented forecasting in time series foundation models, a computer device, and a storage medium.BACKGROUND
[0002] Time series forecasting is a task of forecasting future value of one or more variates based on a historical value of the one or more variates and other potentially relevant information, and is important in different fields such as manufacturing, transportation, healthcare, finance, and environmental science. Because of their practicality, a large number of time series forecasting methods have been developed.SUMMARY
[0003] This summary is provided to introduce some selected concepts in a simplified form, which are further described in the following detailed description. This summary is not intended to identify any key feature or essential feature of the claimed subject, and is not intended to help determine a scope of the claimed subject.
[0004] Based on this, this application discloses a method for retrieval-augmented forecasting in time series foundation models, comprising:
[0005] searching multiple similar series in a time series database based on a first input series with first predetermined time points;
[0006] retrieving further predetermined steps for each said similar series and outputting resulting series with second predetermined time points; wherein said second predetermined time points are subsequent to said first predetermined time points;
[0007] generating a second input series by combining said first input series with said resulting series;
[0008] inputting said second input series into said time series foundation model and predicting future time points of said first input series.
[0009] By above means, using retrieval augmented methods, it can significantly improve the ability of time series foundation models in dealing with short input series.
[0010] In addition, this application further discloses an apparatus for retrieval-augmented forecasting in time series foundation models, comprising:
[0011] searching module, for searching multiple similar series in a time series database based on a first input series with first predetermined time points;
[0012] retrieving module, for retrieving further predetermined steps for each said similar series and outputting resulting series with said first predetermined time point and second predetermined time points; wherein said second predetermined time points are larger than said first predetermined time points;
[0013] combining module, for generating a second input series by combining with said first input series and said resulting series;
[0014] predicting module, for inputting said second input series into said time series foundation model and predicting future time points of said first input series.
[0015] This application further provides a computer device, including a memory and a processor, the memory storing a computer program, where when executing the computer program, the processor implements the foregoing method.
[0016] This application further provides a computer-readable storage medium, storing a computer program, the computer program, when executed by a processor, implements the foregoing method.
[0017] This application further provides a computer program product, where the computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, and the computer-executable instructions, when executed, causes at least one processor to perform the foregoing method.BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Implementations of the present disclosure are described in a form of example rather than a form of limitation in the accompanying drawings. Similar reference numerals in the accompanying drawings represent the same or similar components.
[0019] FIG. 1 is a schematic flowchart of a method for retrieval-augmented forecasting in time series foundation models according to an implementation of this application;
[0020] FIG. 2 is a schematic diagram of an apparatus for retrieval-augmented forecasting in time series foundation models according to an implementation of this application;
[0021] FIG. 3 is a schematic diagram of a computer device for retrieval-augmented forecasting in time series foundation models according to an implementation of this application;
[0022] FIG. 4 is a schematic chart of covariate retrieval-augmented form according to an implementation of this application;
[0023] FIG. 5 is a schematic chart of target retrieval-augmented form according to an implementation of this application;
[0024] FIG. 6 is a schematic diagram of a system for retrieval-augmented forecasting in time series foundation models according to an implementation of this application.
[0025] Reference numerals:
[0026] S101 to S104: Steps
[0027] 200: Apparatus
[0028] 201: Module
[0029] 202: Module
[0030] 203: Module
[0031] 204: Module
[0032] 300: Computer device
[0033] 302: Processor
[0034] 304: Memory
[0035] 401: database
[0036] 402: input series
[0037] 403: retrieved top-k most similar series
[0038] 404: covariate retrieval-augmented series
[0039] 504: target retrieval-augmented series
[0040] 601: processors
[0041] 602: time series foundation models
[0042] 603: database
[0043] 604: connection linkDETAILED DESCRIPTION
[0044] In the following specification, for the purpose of explanation, a large number of specific details are described. However, it may be understood that the implementation of the present application may be implemented without these specific details. In other instances, well-known circuits, structures, and technologies are not shown in detail, so as not to affect understanding of the specification.
[0045] As mentioned above, time series foundation models provide in-context learning abilities for time series data, thus can achieve zero-shot forecasting. However, it also means that the input context to the model must convey sufficient information for the model to learn the dynamics, otherwise the model is uncapable to generate good results. Thus, the in-context learning paradigm also reduces the ability of time series foundation models to handle short time series.
[0046] Time series foundation model is new area of research, currently there is no specific method to handle the problem. However, one can fine-tune the pretrained time series foundation models on a specific dataset, and the idea is to memorize the short series during the fine-tuning process. On the other hand, depending on fine-tuning also significantly reduces the scalability and generalization of time series foundation models. More recently, some other retrieval augmented methods are proposed to enhancing forecasting accuracy by searching for similar time series in a database and then adding them into the input context. However, these methods assume the time series foundation model is a univariate forecasting model, thus do not leverage the models’ capability for utilizing cross-variate dependency to enhancing forecasting accuracy.
[0047] In this application, it provides a retrieval-augmented framework to significantly improve the ability of times series foundation models in handling short series.
[0048] Specifically, this application defines a time series foundation model as a model takes in a look-back window of L time points of one or multiple target variates and optionally their corresponding covariates as context, and predicts the future H time points of the target variates. Formally, let x1: L and c1: L+H be the input target variates and corresponding covariates (the values of covariates are available in the prediction horizon) , the model is a function to predict xL+1: L+H, such that:
[0049] xL+1: L+H = f (x1: L, c1: L+H)
[0050] In this application, it provides a method which can significantly improve the ability of times series foundation models in handling short series without fine-tuning. The idea is to retrieve similar time series with the input series from an external database and then put the retrieved series in the context combined with the input series to generate combined inputs for the time series foundation model. The combined inputs are more likely to convey sufficient information for the model to generate good forecasting results.
[0051] Based on this, this application discloses a method for retrieval-augmented forecasting in time series foundation models, comprises:
[0052] S101: searching multiple similar series in a time series database based on a first input series with first predetermined time points.
[0053] In some embodiment, a first input series with first predetermined time points could be represented as x1: L; wherein x represent the first input series and L represent the first predetermined time points. In some embodiment, the first predetermined time points repesent the historical time.
[0054] In some embodiment, there are plenty of sample series in the time series database. And searching multiple similar series in a time series database based on a first input series with first predetermined time points, comprises: searching said multiple similar series in said time series database based on distance metrics.
[0055] By above means, it can correctly and efficiently search out most similar sample series based on the distance metrics.
[0056] Furthermore, wherein searching multiple similar series in a time series database based on a first input series with first predetermined time points, comprises: searching predetermined number of similar series in said time series database. By above means, it can select out multiple sample series which are used for following forecasting.
[0057] In some embodiment, search top-k most similar series of x1: Lin database B using distance metrics such as dynamic time warping. Specifically, s11: L, …, sk1: Lrepresent multiple similar series which are searched out in the database.
[0058] S102: retrieving further predetermined steps for each said similar series and outputting resulting series with said first predetermined time points and second predetermined time points; wherein said second predetermined time points are subsequent to said first predetermined time points.
[0059] As mentioned above, let s11: L, …, sk1: L be the top-k most similar series, and retrieve further H steps for each series, then output the resulting series with said first predetermined time points and second predetermined time points could be represented as s11: L+H, …, sk1: L+H , wherein the second predetermined time points is represented as H. More specially, the second predetermined time points H are subsequent to the first predetermined time points L.
[0060] S103: generating a second input series by combining said first input series with said resulting series.
[0061] Specifically, generating a combined input series for the time series foundation model in one of the following forms:
[0062] In the first embodiment, it could be covariate retrieval-augmented form: put s11: L+H, …, sk1: L+H as the covariates of x1: L.
[0063] As shown in Fig. 4, input series 402 are inputted into database 401 and get retrieved top-k most similar series 403. Then said input series 402 and said retrieved top-k most similar series 403 are combined parallelly to get covariate retrieval-augmented series 404 for time series foundation model forecasting. In Fig. 4, it could find that the length of covariate is larger than the length of input series 402 since covariate comprise L + H time points, input series only comprise L time points.
[0064] As mentioned above, generating a second input series by putting resulting series as covariate of said first input series. By this means, the multiple sample series from history to future target time could give much more additional information for model to forecast the target variate.
[0065] In the second embodiment, it could target retrieval-augmented form: putting s11: L+H, …, sk1: L+H before x1: L to combine and then inputting them into said time series foundation models. In some embodiment, to process concatenate / concat operation to s11: L+H, …, sk1: L+H and x1: L to get said second input series.
[0066] As mentioned above, generating a second input series by putting said resulting series before said first input series. In Fig. 5, input series 402 are inputted into database 401 and get retrieved top-k most similar series 403. Then the input series 402 and the retrieved top-k most similar series 403 are combined sequentially or concatenated to get target retrieval-augmented series 504 for time series foundation model forecasting. As shown in Fig. 5, target retrieval-augmented series could be treated as multiple repeated series and front repeated series could give information for predicting of later series.
[0067] By this means, it could also give model much more information for predicting.
[0068] S104: inputting said second input series into said time series foundation model and predicting future time points of said first input series.
[0069] In some embodiment, future time points could be represented as L+1 to L+H.
[0070] For the covariate retrieval-augmented form, it could be represent as following:
[0071] xL+1: L+H = f (x1: L , s11: L+H, …, sk1: L+H)
[0072] In other words, by using the second input series x1: L , s11: L+H, …, sk1: L+H into the time series foundation model f to predict future time points of said first input series xL+1: L+H.
[0073] For the target retrieval-augmented form, it could be represent as following:
[0074] xL+1: L+H = f (s11: L+H⊙…⊙sk1: L+H⊙ x1: L )
[0075] where ⊙ denotes concatenate / concat operation.
[0076] In other words, by using the second input series s11: L+H⊙…⊙sk1: L+H⊙ x1: L into the time series foundation model f to predict future time points of said first input series xL+1: L+H.
[0077] By above means, using retrieval augmented methods, it can significantly improve the ability of time series foundation models in dealing with short input series.
[0078] Experiments
[0079] In this application, it compares the zero-shot forecasting accuracy of GTT model on the M4 datasets with and without retrieval-augmented forecasting. Specifically, for each series in M4, it uses the last 24 timesteps as the forecast horizon, the remaining timesteps as the input series. For retrieval-augmented forecasting, it searches top 5 most similar series with lowest dynamic time wrapping (DTW) distance in the whole datasets.
[0080] More specifically, it summarizes the normalized mean absolute error (MAE) for each method in the following table. Both the covariate and target retrieval-augmented forecasting methods can improve the zero-shot forecasting accuracy significantly.
[0081] Table 1 Experimental results of the open benchmark dataset
[0082] Differences between this application and the related art lie in that: currently time series foundation models are unable to generate accurate forecasts for short input series. Using our retrieval augmented methods, we can significantly improve the ability of time series foundation models in dealing with short input series.
[0083] Whether the model in this application is applied may be checked by checking if a retrieval augmented method is used for generating results from time series foundation models.
[0084] In addition, time series forecasting is a task of forecasting future time series based on historical time series with other potentially relevant information, and time series forecasting is important in different fields such as manufacturing, transportation, healthcare, finance, weather and other environmental science.
[0085] It should be understood that, although the steps in the flowchart of FIG. 1 are sequentially displayed in accordance with instructions of arrows, these steps are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly specified in this application, execution of the steps is not strictly limited, and the steps may be performed in other sequences. Furthermore, at least some steps in FIG. 1 may include a plurality of steps or a plurality of stages. The steps or stages are not necessarily performed at the same moment, and may be performed at different moments. The steps or stages are not necessarily performed in order, and may be performed in turn or alternately with other steps or at least some of steps or stages in other steps.
[0086] FIG. 2 provides an apparatus 200 for retrieval-augmented forecasting in time series foundation models, comprises:
[0087] searching module 201, for searching multiple similar series in a time series database based on a first input series with first predetermined time points;
[0088] retrieving module 202, for retrieving further predetermined steps for each said similar series and outputting resulting series with said first predetermined time point and second predetermined time points; wherein said second predetermined time points are larger than said first predetermined time points;
[0089] combining module 203, for generating a second input series by combining with said first input series and said resulting series;
[0090] predicting module 204, for inputting said second input series into said time series foundation model and predicting future time points of said first input series.
[0091] Fig. 6 provides a system 600, comprising time series foundation models 602, a database 603 and one or more processors 601. Said time series foundation model 602, said database 603 and said one or more processors 601 are communicated; wherein said one or more processors 601 configured to implement steps of the method accordingly.
[0092] In some embodiment, said time series foundation model 602, said database 603 and said one or more processors 601 are connected with connection link 604. And said time series foundation models 602 and database 603 could be storge in local or on cloud or on edge device. The connection link 604 could be physical link or telecommunication link. Said on or more processors 601 could be CPU or GPU. This application doesn’ t have restrictions on this.
[0093] For example, in a computer system, the time series foundation model is stored in RAM. The database is stored in hard disk. The processer is CPU or GPU which could use connection link such as data bus to communicate with RAM and hard disk.
[0094] More specially, the communication process could be described as below: the processor will receive the first input series firstly and then read the hard disk by data bus to search the top-k most similar sample series and then retrieve further steps to obtain the resulting series. Then processor will generate the second input series and send the resulting series to RAM by data bus to and then input the second input series into the time series foundation model. The time series foundation model receives the second input series in RAM and predicting the future time points of said first input series.
[0095] For example, in a cloud system, the time series foundation model is stored in an edge device and the data base is stored in a cloud server. The processer is a CPU or a GPU stored in another edge device.
[0096] More specifically, the communication process could be described as below: the processor will receive the first input series firstly and then send the input series by telecommunication link such as wireless link to the server to search the top-k most similar sample series and then retrieve further steps to obtain the resulting series. Then the processor receives the resulting series by telecommunication link from the server and then generate the second input series and send the second input series to time series foundation model by telecommunication link. The time series foundation model receives the second input series by telecommunication link and predicts the future time points of said first input series.
[0097] It is to be noted that, the apparatus may include more or fewer modules to implement the described functions. For example, at least one module in FIG. 2 may be further divided into a plurality of different sub-modules, and each sub-module is configured to perform at least a part of the operations described herein with reference to the corresponding module. In addition, in some examples, the apparatus 200 may further include an additional module, configured to perform other operations that have been described in the specification. In addition, a person skilled in the art may understand that the exemplary apparatus 200 may be implemented by using software, hardware, firmware, or any combination thereof.
[0098] FIG. 3 provides a computer device. According to an implementation, the computer device 300 may include a processor 302, and the processor 302 executes a computer program stored in a memory 304. When executed by the processor, the computer program implements the foregoing method.
[0099] A person skilled in the art may understand that, the structure shown in FIG. 3 is merely a block diagram of a partial structure related to a solution in this application, and does not constitute a limitation to the computer device to which this application is applied. Specifically, the computer device may include more components or fewer components than those shown in the figure, or some components may be combined, or a different component deployment may be used.
[0100] A person of ordinary skill in the art may understand that all or some of the processes of the methods in the foregoing implementations may be implemented by a computer program instructing relevant hardware. The computer program may be stored in a non-volatile computer-readable storage medium. When the computer program runs, the processes of the foregoing methods in the implementations may be performed. Any reference to a memory, a storage, a database, or another medium used in the various implementations provided in this application may include at least one of a non-volatile memory or a volatile memory. The non-volatile memory may include a read-only memory (ROM) , a magnetic tape, a floppy disk, a flash memory, an optical memory, or the like. The volatile memory may include a random access memory (RAM) , an external cache, or the like. For illustration rather than limitation, the RAM may be in various forms, for example, may be a static random access memory (SRAM) or a dynamic random access memory (DRAM) .
[0101] This application further provides a computer-readable storage medium, storing a computer program, and when executed by a processor, the computer program implementing the foregoing steps.
[0102] This application further provides a computer program product, where the computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, and the computer-executable instructions, when executed, causes at least one processor to perform the foregoing method.
[0103] Further, the computer program may be stored and run in a cloud to perform the method. Further, components of the program may be laid out on a plurality of devices or the cloud. For example, corresponding steps may be laid out and run on a local computer or run on different cloud devices to transmit signals through communication connection, or may be laid out and run on a local computer. The manner or method is not limited in this application. Corresponding technologies may be flexibly laid out and deployed, and devices and technologies such as cloud, big data, and supercomputing capabilities may be fully utilized to execute and complete the method.
[0104] Some implementations of the present disclosure may include a product. The product may include a storage medium, which is configured to store logic. Examples of the storage medium may include one or more types of computer-readable storage media that can store electronic data, including a volatile memory or a non-volatile memory, a removable or non-removable memory, an erasable or non-erasable memory, a writable or re-writable memory, or the like. Examples of the logic may include various software units, such as a software component, a program, an application, a computer program, an application program, a system program, a machine program, operating system software, middleware, firmware, a software module, a routine, a subroutine, a function, a method, a process, a software interface, an application program interface (API) , an instruction set, computing code, computer code, a code segment, a computer code segment, a word, a value, a symbol, or any combination thereof. In some implementations, for example, the product may store executable computer program instructions that, when executed by a processor, enable the processor to perform the methods and / or operations described in this specification. The executable computer program instructions may include any suitable type of code, for example, source code, compiled code, interpreted code, executable code, static code, dynamic code, or the like. The executable computer program instructions may be implemented according to a predefined computer language, manner, or syntax for instructing a computer to perform a specific function. The instructions may be implemented by using any suitable high-level, low-level, object-oriented, visual, compiled, and / or interpreted programming language.
[0105] References to "an implementation" , "implementation" , "an exemplary implementation" , "some implementations" , "various implementations" , or the like throughout the specification indicate that the described implementations of the present application may include particular features, structures, or characteristics. However, it is not intended that each implementation necessarily include the particular features, structures, or characteristics. In addition, some implementations may have some, all, or none of the features described for other implementations.
[0106] Content described above includes examples of disclosed architectures. It is clear that, it is not possible to describe every conceivable combination of components and / or methods, but a person skilled in the art may understand that many other combinations and arrangements are also possible. Therefore, the novel architecture is intended to cover all such substitutes, modifications, and variations that fall within the spirit and scope of the appended claims.
Claims
1.A method (100) for retrieval-augmented forecasting in time series foundation models, comprising:searching (101) multiple similar series in a time series database based on a first input series with first predetermined time points;retrieving (102) further predetermined steps for each said similar series and outputting resulting series with said first predetermined time point and second predetermined time points; wherein said second predetermined time points are subsequent to said first predetermined time points;generating (103) a second input series by combining said first input series with said resulting series;inputting (104) said second input series into said time series foundation model and predicting future time points of said first input series.2.The method according to claim 1, wherein generating (103) a second input series by combining with said first input series and said resulting series, comprises:generating a second input series by putting resulting series as covariate of said first input series.3.The method according to any one of claims 1 to 2, wherein generating (103) a second input series by combining with said first input series and said resulting series, comprises:generating a second input series by putting said resulting series before said first input series.4.The method according to any one of claims 1 to 3, wherein inputting (104) said second input series into said time series foundation model and predicting future time point of said first input series, comprise:processing a concatenate operation with said resulting series and said first input series to predict future time point of said first input series.5.The method according to any one of claims 1 to 4, wherein searching (101) multiple similar series in a time series database based on a first input series with first predetermined time points, comprises:searching said multiple similar series in said time series database based on distance metrics.6.The method according to any one of claims 1 to 5, wherein searching (101) multiple similar series in a time series database based on a first input series with first predetermined time points, comprises:searching predetermined number of similar series in said time series database.7.An apparatus (200) for retrieval-augmented forecasting in time series foundation models, comprising:searching module (201) , for searching multiple similar series in a time series database based on a first input series with first predetermined time points;retrieving module (202) , for retrieving further predetermined steps for each said similar series and outputting resulting series with said first predetermined time point and second predetermined time points; wherein said second predetermined time points are larger than said first predetermined time points;combining module (203) , for generating a second input series by combining with said first input series and said resulting series;predicting module (204) , for inputting said second input series into said time series foundation model and predicting future time points of said first input series.8.A system (600) , comprising time series foundation models (602) , a database (603) and one or more processors (601) , said time series foundation model (602) , said database (603) and said one or more processors (601) are communicated; wherein said one or more processors configured to implement the steps of the method according to any one of claims 1 to 6.9.A computer device, comprising a memory and a processor, the memory storing a computer program, wherein when executing the computer program, the processor implements steps of the method according to any one of claims 1 to 6.10.A computer-readable storage medium, storing a computer program, wherein when executed by a processor, the computer program implements steps of the method according to any one of claims 1 to 6.11.A computer program product, wherein the computer program product is tangibly stored on a computer-readable medium and comprises computer-executable instructions, and the computer-executable instructions, when executed, causes at least one processor to perform the method according to any one of claims 1 to 6.