Skip to content

Deep Extreme Transformer: Tackling Zero-Inflated Time Series for Precipitation Prediction

Status: completed

Authors: Wentao Gao, Xiongren Chen, Xiaojing Du, Wenjun Yu, Andres Mauricio Cifuentes Bernal, Ziqi Xu

Venue / Year: AAAI-26 (The Fortieth AAAI Conference on Artificial Intelligence), 2026

Affiliations: Adelaide University (Australia), Shanghai University of International Business and Economics (China), RMIT University (Australia)

Links: Code

Tags: [[time series forecasting]], [[zero-inflated data]], [[precipitation prediction]], [[transformer]], [[Tweedie distribution]], [[attention mechanism]]

One-Sentence Summary

DET integrates statistical distribution modeling with neural sequence learning to address zero-inflation and nonstationarity in precipitation forecasting through weighted attention, Tweedie parameterization, and Gaussian perturbation.

Problem

Core Challenge

Rainfall forecasting faces a dual challenge: extreme zero inflation (dry days comprise 70-85% of observations) and pronounced nonstationarity (climate dynamics evolve across time and regimes).

Motivation

Accurate rainfall prediction is crucial for agricultural planning, water resource management, and disaster preparedness in climate-vulnerable regions. Current time series prediction models fail to adequately handle zero inflation, creating a fundamental barrier for reliable forecasting systems.

Method

Core Innovation

Four key innovations motivated by theoretical analysis:

  1. Weighted attention mechanism with fixed shared weights (α, β) to restore information concentration
  2. Tweedie distribution framework for unified zero-inflated modeling
  3. Gaussian perturbation strategy for optimization stability
  4. Nonstationary attention integration for handling temporal nonstationarity

2.1 架构设计深度拆解

整体架构图

Pipeline: 输入序列 → 高斯扰动 → 加权注意力机制 → Tweedie参数映射 → 加权Tweedie损失

数据维度变化:

  • 输入: (历史T步,m个特征)
  • 编码器输出:
  • 解码器输出:
  • Tweedie参数: (标量)
  • 预测输出: (未来k步)

核心模块拆解

模块1: 高斯扰动 (Gaussian Perturbation)

  • 功能: 平滑零值区域,解决非可微点质量问题
  • 输入: 原始零值样本
  • 输出: 扰动后样本
  • 内部结构: 截断高斯分布 ,其中
  • 可学习参数: 无(固定超参数r=0.1)
  • 与标准实现的差异: 使用截断高斯而非普通高斯,确保非负性

模块2: 加权注意力机制 (Weighted Attention)

  • 功能: 恢复信息集中度,区分零值和非零值观测的重要性
  • 输入: Query , Key , Value
  • 输出: 加权注意力分布
  • 内部结构:
    • 注意力类型: Self-attention,但引入固定共享权重
    • 权重计算: (若 ) 或 (若 )
    • 权重比例: ,其中
  • 可学习参数: 无(固定权重,基于数据统计)
  • 与标准实现的差异: 在softmax前对Score矩阵进行元素级加权

模块3: Tweedie分布输出头 (Tweedie Output Head)

  • 功能: 将隐藏状态映射到Tweedie分布参数
  • 输入: 解码器最终隐藏状态
  • 输出: 均值参数 ,离散参数
  • 内部结构:
    • 两个独立的两层MLP(ReLU激活)
    • 形状参数 为可学习全局参数,初始化为1.5,约束在(1,2)区间
  • 可学习参数: MLP权重、 参数
  • 与标准实现的差异: 输出分布参数而非点估计

模块4: 加权Tweedie损失 (Weighted Tweedie Loss)

  • 功能: 强调非零事件的学习,与注意力机制对齐
  • 输入: 预测分布参数 ,真实值
  • 输出: 加权负对数似然损失
  • 内部结构:
    • 权重方案与注意力机制一致: (若 ) 或 (若 )
    • 损失函数:
  • 可学习参数: 无(权重固定)
  • 与标准实现的差异: 使用加权损失而非标准MSE

模块5: 非平稳注意力集成 (Nonstationary Integration)

  • 功能: 同时处理零膨胀和时间非平稳性
  • 输入: 原始Query、Key、Value,以及统计信息
  • 输出: 融合后的注意力权重
  • 内部结构:
    • 与Nonstationary Transformer的de-stationary attention集成
    • 公式:
    • 为去平稳因子, 为加权矩阵
  • 可学习参数: 的学习参数
  • 与标准实现的差异: 在标准非平稳注意力基础上引入元素级加权

连接与交互机制

  • 模块连接方式:
    • 高斯扰动作为预处理步骤
    • 加权注意力机制集成到解码器
    • Tweedie输出头替代标准线性输出层
    • 加权Tweedie损失替代标准损失函数
  • 多尺度特征融合: 未显式使用多尺度,但通过序列建模隐式捕获不同时间尺度
  • 条件信息注入: 通过非平稳注意力的 注入统计信息

初始化与正则化

  • 参数初始化策略:
    • 初始化为1.5
    • MLP使用标准初始化
  • Dropout/DropPath: 论文中未明确提及,可能在实现中
  • LayerNorm/BatchNorm: 基于Transformer标准实现,应使用LayerNorm

2.2 算法流程详细梳理

前向传播 (Forward Pass)

  1. 数据预处理: 对零值样本应用高斯扰动
  2. 编码器处理: 输入序列通过标准Transformer编码器
  3. 解码器处理:
    • 计算加权注意力分数:
    • 应用权重:
    • 计算注意力分布:
    • 加权求和:
  4. 输出映射: 隐藏状态通过两个MLP得到
  5. 损失计算: 加权Tweedie负对数似然

训练流程

  1. 损失计算:
  2. 梯度回传: 通过加权损失计算梯度
  3. 参数更新: 使用Adam优化器,配合学习率调度
  4. 理论保证: 损失函数关于 是凸的(定理5)

推理流程

  • 与训练的差异:
    • 不使用高斯扰动(仅训练时使用)
    • 使用学习到的Tweedie分布参数进行预测
    • 可以生成点估计或分布预测

2.3 数学推导

核心公式

加权注意力机制:

  • : 点积相似度
  • : 固定权重,
  • : Key的维度

Tweedie分布概率密度:

  • 自然参数:
  • 累积函数:
  • 形状参数:

加权Tweedie损失:

  • 权重: (若 ) 或 (若 )

符号维度

  • : 输入序列,T时间步,m特征
  • : Query和Key向量
  • : Value向量
  • : 标量权重
  • : 分布参数

近似处理

  1. 高斯扰动: 使用截断高斯近似零值分布
  2. 数值稳定性: 使用softplus确保参数正值
  3. 梯度平滑: 截断高斯改善Lipschitz常数

Evidence

Key Results

Output LengthDET (Ours)TSMixeriTransformerTransformerPatchTSTTimeMixerTimesNetNonstationary TransformerZIPHurdle
24 MSE0.51200.94580.90180.87230.90650.90890.65200.72001.56201.8725
24 MAE0.21200.40100.32560.31570.32510.31400.42910.29750.56120.6250
96 MSE0.53200.95460.92200.87160.91850.92050.67760.76001.70251.9331
96 MAE0.22100.40980.32990.29730.30670.31560.44550.30780.58890.6520

DET achieves 21.5% MSE reduction over TimesNet and 28.7% MAE reduction over Nonstationary Transformer at 24-step forecasting.

Ablation Study

Design48 MSE48 MAE96 MSE96 MAE192 MSE192 MAE336 MSE336 MAE
Full Model0.51800.21400.53200.22100.54500.22800.55800.2350
Tweedie Loss → Standard Loss0.6200.2650.6500.2750.6800.2850.7000.295
Weighted Attention → Standard Attention0.6100.2600.6400.2700.6700.2800.6900.290
w/o Gaussian Perturbation0.6350.2750.6650.2850.6950.2950.7250.305

Each component contributes meaningfully to handling zero-inflated precipitation forecasting.

Limitations

  1. Single dataset validation: Only evaluated on South Australian precipitation data
  2. No computational cost analysis: Training time, inference time, and parameter count not reported
  3. Limited statistical significance testing: No error bars, confidence intervals, or repeated experiments
  4. Hyperparameter sensitivity: Impact of weight ratio (α/β) not thoroughly analyzed
  5. Limited baseline comparison: Missing some recent SOTA methods from 2024-2025

代码验证

仓库状态

Claims验证(基于论文描述)

Claim类型论文描述验证状态
模型架构加权注意力机制、Tweedie分布输出头、高斯扰动、加权Tweedie损失论文详细描述,但代码未公开
损失函数加权Tweedie损失,权重与注意力机制对齐公式(16)明确给出,但实现未验证
训练设置Adam优化器,学习率调度实验部分提及,但具体参数未报告
数据处理NCEP-NCAR Reanalysis 1数据,80%零值,70/15/15划分论文明确描述,但预处理代码未公开
评估指标MSE和MAE表1使用,但计算细节未说明
消融研究表2的消融实验,包括替换和移除实验论文展示结果,但实验代码未公开
结果表格表1的主结果,与9个基线方法比较数据完整,但可复现性存疑

代码验证建议

  1. 等待代码公开: 作者可能在会议后上传完整代码
  2. 联系作者: 如需复现,可联系作者获取代码
  3. 独立实现: 基于论文描述尝试独立实现,但可能耗时较长
  4. 关注附录: 论文提到附录有更多细节,可能包含实现细节

可复现性评估

  • 理论框架: 论文提供完整理论分析,有利于理解和实现
  • 架构描述: 详细描述了各个组件,但缺少具体超参数
  • 数据可用性: NCEP-NCAR数据公开可用,可尝试复现
  • 代码透明度: 当前代码未公开,可复现性评分: 3/10

Critical Assessment

Strengths

  • Strong theoretical foundation: Provides rigorous analysis of why Transformers fail on zero-inflated data
  • Principled design: Each component motivated by theoretical analysis
  • Comprehensive experiments: Compares against 9 baselines including specialized zero-inflated models
  • Significant performance improvements: Consistent 21-28% improvements across forecasting horizons
  • Public code: Reproducibility supported via GitHub repository

Weaknesses & Risks

  • Generalization concerns: Only validated on one regional dataset
  • Missing computational analysis: No comparison of efficiency or scalability
  • Potential overfitting: May have been tuned specifically for this dataset
  • Limited recent baselines: Missing comparison with some 2024-2025 Transformer variants

Reviewer Feedback

AspectAssessment
NoveltySolid contribution combining statistical rigor with deep learning
RigorStrong theoretical analysis, but experimental validation needs expansion
ImpactPractical significance for precipitation forecasting and zero-inflated data
ReproducibilityCode available, but some implementation details in appendix

Innovation Score: 6/10

Solid contribution in zero-inflated time series forecasting with principled theoretical foundation, but limited scope and single-dataset validation reduce broader impact.

Reusable Ideas

  • Weighted attention mechanism for handling class imbalance in sequence modeling
  • Tweedie distribution integration for zero-inflated continuous data
  • Gaussian perturbation strategy for stabilizing optimization on sparse data
  • Theoretical framework for analyzing attention mechanism limitations
  • Informer (Zhou et al. 2021): Efficient sparse attention for long sequences
  • Nonstationary Transformer (Liu et al. 2022): Handles nonstationarity in time series
  • PatchTST (Nie et al. 2023): Channel independence and patching for time series
  • TimesNet (Wu et al. 2023): Temporal 2D-variation modeling
  • TimeMixer (Wang et al. 2024): Multiscale mixing for time series
  • TSMixer (Chen et al. 2023): All-MLP architecture for time series
  • iTransformer (Liu et al. 2023): Inverted Transformer for time series
  • Zero-Inflated Poisson models (Lambert 1992): Traditional statistical approach
  • Hurdle models (Mullahy 1986): Alternative zero-inflated modeling

Personal Notes

This paper presents a solid, theoretically grounded approach to a practical problem. The combination of statistical modeling with deep learning is principled and well-motivated. However, the single-dataset evaluation limits confidence in generalizability. The approach could be valuable for other zero-inflated time series problems (insurance claims, financial data) but would need broader validation. Worth referencing for the theoretical analysis of attention mechanisms on sparse data.

Static research notes built with VitePress and KaTeX.