Ensemble forecasting with IBM Granite time-series models
TL;DR · AI 摘要
IBM Granite时间序列集成方法通过组合四个互补模型实现无需训练的鲁棒预测,提供分位数输出和默认配置。
核心要点
- 集成四个Granite模型可提升时间序列预测的准确性与稳定性
- QuantileEnsembleForecaster支持0.1-0.9分位数预测,覆盖80%置信区间
- Hugging Face提供预训练模型,安装命令为pip install granite-tsfm>=0.3.11
结构提纲
按章节快速跳转。
- §引言
介绍时间序列预测中模型选择的挑战及集成方法的必要性。
通过天气预报类比解释集成预测的机制与优势。
- ›实现细节
展示QuantileEnsembleForecaster的代码实现与参数说明。
- ·模型成员
解析默认集成方案中四个预训练模型的互补特性。
- ›应用示例
演示ETT-small数据集的预测流程与结果解析。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- 时间序列集成预测
- 集成方法
- 四个模型组合
- 无需重新训练
- 核心组件
- QuantileEnsembleForecaster
- 分位数输出
- 应用场景
- 工业信号预测
- 零售需求预测
金句 / Highlights
值得收藏与分享的关键句。
Ensemble forecasts explore a range of possible outcomes, similar to weather prediction systems.
The recipe stores the ensemble configuration rather than merged model weights.
result.quantile_outputs contains quantile predictions ranging from 0.1 to 0.9 by default.
使用 IBM Granite 时间序列模型的集成预测
返回文章列表
[0
[-1
企业
]
文章
发布于 2026 年 10 月 22 日
点赞
6
[
Fearghal O'Donncha
Fearghal
关注
ibm-research
Chandramouli Kamanchi
rry003
Guruprasad
Ranjini
Wesley M. Gifford
wmgifford
Natalia Martinez Gil
natalialmg91
Bradley Eck
bradleyjeck
Pankaj Dayama
pankajdayama
Roman Vaculin
vaculin
Ayhan Sebin
ayhansebin
四种开源 Granite 模型、一个可扩展的预测接口,以及更少的模型选择困扰。
预训练的时间序列模型可以在不训练您的数据集的情况下进行预测,但您仍然需要选择一个模型。处理平滑工业信号表现良好的模型可能难以应对嘈杂的零售需求或长周期季节性数据,最佳选择取决于数据序列和任务目标。
Granite 时间序列集成模型将这种选择简化为合理的默认方案。一种方案组合了四种互补的 Granite 架构,直接返回中位数和分位数预测,无需重新训练或拟合集成权重。从概率集成(均匀概率池化)开始,比较自适应四分位距(IQR)集成,再通过兼容的预测器扩展相同接口。集成方案及其默认 Granite 成员采用宽松许可。
这个概念在气象预测中已经很熟悉。集成预测会探索多种可能的结果,北美多模型集成系统(North American Multi-Model Ensemble)等系统会结合不同模型进行季节预测。时间序列预测同样受益:互补模型能提供不同的未来视角,集成方法将这些视角合并为单一预测。
尝试 Granite 时间序列集成模型
安装 Granite TSFM 并直接从 Hugging Face 加载推荐的四模型方案:
pip install
"granite-tsfm>=0.3.11"import
pandas
as
pd
from
tsfm_public.models.ensemble.modeling_ensemble
import
QuantileEnsembleForecaster
df = pd.read_csv(
"https://raw.githubusercontent.com/zhouhaoyi/ETDataset/main/ETT-small/ETTh1.csv"
,
parse_dates=[
"date"
],
)
ensemble = QuantileEnsembleForecaster.from_pretrained(
"ibm-granite/granite-timeseries-ensemble-r1"
,
)
result = ensemble(
df.tail(
1024
),
timestamp_column=
"date"
,
target_columns=[
"OT"
],
context_length=
1024
,
prediction_length=
24
,
)
print
(result.prediction_outputs)
# 点预测
print
(result.quantile_outputs)
# 分位数该方案存储集成配置而非合并模型权重。它会在运行时下载四个成员模型的检查点,因此首次运行需要额外时间。关于完整配置、成员检查点、评估细节和限制,请参阅模型卡片。
result.prediction_outputs 包含点预测,而 result.quantile_outputs 包含默认范围从 0.1 到 0.9 的分位数预测。应用可将点值作为中心预测,选择特定分位数表示预测区间。例如,0.1 和 0.9 分位数定义了一个名义覆盖率为 80% 的中心预测区间。
集成成员模型
默认方案组合了四种具有不同架构的预训练 Granite 模型:
模型
架构
Granite PatchTST-FM-r1
带补丁的 Transformer
Granite PatchTST-FM-r2
带补丁的 Conformer
Granite FlowState-r1.1
状态空间模型
Granite TTM-r3
微型时间混洗器(MLP 混洗器)
For background, see the PatchTST-FM-r1 paper , PatchTST-FM-r2 architecture overview , FlowState paper , and Tiny Time Mixers paper .
These architectures capture trends, seasonality, and local variation in different ways, so their errors need not coincide. A 50-year review of forecast combinations describes how combining forecasts can reduce the risk of picking the wrong single model, while stressing that member quality and diversity still matter.
Two ways to combine the forecasts
Each member returns quantile forecasts. The two main recipes use different rules to turn those forecasts into one predictive distribution and its median.
Probabilistic Ensemble: the recommended default
The Probabilistic Ensemble (uniform probability pooling) gives each member equal influence, pools their quantile forecasts in probability space, and extracts the requested quantiles from the combined values. Because the weights are fixed, there is no fitting step and no weighting hyperparameters to tune for a new series.
The forecast combination puzzle offers useful motivation: in point forecasting, simple equal-weight combinations have often held up well against methods with estimated weights. This recipe applies the same equal-influence idea to probabilistic forecasts. It is the default loaded in the example above.
IQR Ensemble: an adaptive alternative
The IQR Ensemble weights members according to their forecast spread, giving narrower intervals greater influence. It approximates each member’s interquartile range from the closest available quantiles around the 25th and 75th percentiles. Weights vary by sample, target, and horizon step, and like the Probabilistic Ensemble, nothing is fitted from historical forecast errors. Isotonic regression keeps the combined quantiles from crossing.
A narrower interval does not necessarily mean a more accurate or better-calibrated forecast, and IQR weighting can favor an overconfident member. If you want to experiment, the recipe exposes a temperature setting (higher values move the weights toward uniform) and an optional cap on any single member's weight.
Load the evaluated IQR recipe by changing only the subfolder:
ensemble = QuantileEnsembleForecaster.from_pretrained(
"ibm-granite/granite-timeseries-ensemble-r1"
,
subfolder=
"recipes/granite-iqr"
,
)Which method should I use?
Your goal
Start with
Why
A simple default
Probabilistic Ensemble
Equal influence, no fitted weights
Adaptive weighting based on forecast spread
IQR Ensemble
Influence varies with each member's predicted spread
Start with the Probabilistic Ensemble. If forecast spread looks informative for your application, compare the IQR Ensemble against it on representative data, since accuracy and calibration depend on the series and the horizon.
Does the ensemble improve on its members?
We evaluated both recipes on 97 GIFT-Eval dataset configurations. The models forecast without fine-tuning, and test targets were not used to select or fit the aggregation method. Here we compare the official ensemble submission results with the four constituent models, using published leaderboard scores and ranks captured on 20 October 2026.
GIFT-Eval reports MASE for point forecasts and CRPS/MWQL (the benchmark's mean_weighted_sum_quantile_loss metric) for probabilistic forecasts. Scores are normalized to Seasonal Naive and geometrically averaged across configurations. Lower is better.
Forecast
MASE ↓
MASE Rank ↓
CRPS / MWQL ↓
CRPS Rank ↓
Granite Ensemble R1 — Prob
0.683
★
47.175
0.471
50.948
Granite Ensemble R1 — IQR
0.684
48.773
47.619
0.685
51.371
0.467
48.918
0.701
66.474
0.490
69.485
0.717
74.794
0.488
68.134
0.724
83.062
0.520
88.959
★ 所有预测中最佳值。数值越低越好。
排名列基于完整 GIFT-Eval 参考排行榜对每种配置的排名进行平均,而不仅仅是这六个预测,因此随着排行榜新增条目,排名值可能会发生变化。
在聚合 MASE 和平均 MASE 排名方面,两个集成模型的表现优于所有四个单独成员。概率集成模型在这些六个预测中实现了最低的 MASE:0.683,而 PatchTST-FM-r2 的 MASE 为 0.685。较低的平均 MASE 排名表明在 GIFT-Eval 多样化的数据集配置中,相对点预测性能更强。这些结果共同表明,集成模型可以作为实用的起点,无需开发者提前选择最强的单个架构。与最佳单个成员相比,MASE 的优势幅度较小,因此主要优势在于鲁棒性:无需提前知道哪种架构适合您的数据,即可获得相当或更好的聚合精度。
PatchTST-FM-r2 保持最低的聚合 CRPS/MWQL 分数。IQR 集成模型在这些六个预测中实现了最低的平均 CRPS 排名,而概率集成模型在该指标上排名低于 PatchTST-FM-r2。因此,聚合误差和平均排名倾向于不同的选择。
在 2026 年 10 月 20 日的比较中,集成方法在 MASE 排名和 CRPS 排名上位列所有符合条件系统的第三位。下图显示了两种配方与每项指标下排名前十的最佳符合条件参考系统并列的情况。一些系统(包括被排除的微调或非许可系统)得分优于任一配方,因此集成模型的价值不在于其位居排行榜首位,而在于默认配置即可在多个序列上实现强大且一致的结果,无需您提前选择成员。
图:2026 年 10 月 20 日 GIFT-Eval 平均排名,显示两种 Granite 集成模型与每项指标下排名前十的最佳符合条件参考系统。符合条件的系统具有可复现代码且未声明测试数据泄漏;微调条目和已知非许可许可证或成员依赖的系统被排除。排名值直接取自已发布的整体排行榜快照;筛选操作会改变显示的系统,但不会改变其排名值。
将配方扩展到其他预测器
默认配方使用四个 Granite 模型,但通用的 Forecaster 接口也接受兼容的外部模型。您可以更改成员组合或聚合方法,同时保持相同的下游预测格式,无需合并或重新训练成员检查点。这使得将集成模型融入现有预测堆栈更加容易,并且随着需求变化,可以添加适合您领域的预测器。
该仓库还包含扩展的配方,添加了 IBM Research 的检查点。这些检查点带有单独的许可条款,包括非商业和研究使用限制,因此在使用前请查看每个成员的模型卡片。
对于任何新的组合,请检查预测兼容性、准确性、校准、延迟和许可。
GIFT-Eval 是一个广泛的基准测试,但总体收益并不意味着每个序列都能受益,平均排名也无法证明校准效果。要了解这些方法在你的应用场景中的表现,唯一途径是使用代表性数据对它们进行回测:
- 匹配你的使用场景。使用历史预测窗口,这些窗口应反映每个预测起点可用的数据、你需要的预测范围以及你预期要服务的序列。
- 同类对比。在相同的窗口上运行概率集成(Probabilistic Ensemble)、IQR 集成(IQR Ensemble)以及一个强大的单模型(如 PatchTST-FM-r2)。
- 超出点误差。在 MASE 指标之外评估分位数损失,并检查 0.1 到 0.9 区间的实际覆盖范围是否达到其名义上的 80%。
- 衡量成本。记录运行时间和内存使用情况,判断将四个模型组合在一起的收益是否值得,这取决于你的工作负载。
请记住两个限制。当前的方法独立预测多变量通道,未使用跨通道信息,且需要加载四个模型检查点,这会增加推理时间和内存消耗(相比单个模型)。成员模型的上下文限制、预测范围、预处理和缺失值处理方式也存在差异,且两种聚合方法都无法保证在分布偏移情况下的校准性或鲁棒性,因此部署后仍需持续监控预测结果。
在你的数据上尝试
推荐的起点是默认的四模型方案:
- Hugging Face 上的 Granite 时间序列集成
- 入门笔记本
- Granite TSFM 仓库
- GIFT-Eval 基准测试
加载默认方案可一次性获取所有四种 Granite 架构的中位数和分位数预测,并根据需求变化调整方案。
参考文献
- ECMWF:集成天气预测
- NOAA:北美多模型集成
- FlowState:采样率等变时间序列预测
- Tiny Time Mixers (TTMs):用于增强多变量时间序列零次/少量样本预测的快速预训练模型
- 重新审视通用 Transformer:解构时间序列基础模型的强基线
- 预测组合:超过 50 年的综述
- Smith 和 Wallis(2009),预测组合谜题的简单解释
本文提到的模型 5
本文提到的空间 1
更多来自该作者的内容
ALTK-Evolve:无需前沿模型,学习记忆在客户服务任务中登顶 τ²-bench 领域榜首
25
2026 年 10 月 20 日
你的代理完成了任务。它会再次完成吗?
122
2026 年 9 月 15 日
社区
编辑
预览
通过拖拽、粘贴或点击此处上传图片、音频和视频
.
轻点或粘贴此处上传图片
评论
· 注册或登录以发表评论