[{"data":1,"prerenderedAt":507},["ShallowReactive",2],{"content-query-iuxcSj5IJ9":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"category":13,"body":14,"_type":501,"_id":502,"_source":503,"_file":504,"_stem":505,"_extension":506},"/technology-blogs/zh/3579","zh",false,"","登顶Nature的AI中期天气预报大模型：GenCast=Diffusion+GraphCast","作者：于璠 来源：知乎","2025-01-15","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/9d0c925e33b24127be74a180e5569649.png","technology-blogs","大V博文",{"type":15,"children":16,"toc":496},"root",[17,25,44,52,57,65,73,81,90,95,109,114,122,129,136,153,158,166,171,178,185,192,200,205,212,219,226,233,240,247,254,266,276,281,286,293,300,307,314,328,333,340,347,355,360,365,370,375,382,391,403,408,420,432,445,457,462,474,479,491],{"type":18,"tag":19,"props":20,"children":22},"element","h1",{"id":21},"登顶nature的ai中期天气预报大模型gencastdiffusiongraphcast",[23],{"type":24,"value":8},"text",{"type":18,"tag":26,"props":27,"children":28},"p",{},[29,31,37,39],{"type":24,"value":30},"**作者：**",{"type":18,"tag":32,"props":33,"children":34},"strong",{},[35],{"type":24,"value":36},"于璠",{"type":24,"value":38}," ",{"type":18,"tag":32,"props":40,"children":41},{},[42],{"type":24,"value":43},"来源：知乎",{"type":18,"tag":26,"props":45,"children":46},{},[47],{"type":18,"tag":32,"props":48,"children":49},{},[50],{"type":24,"value":51},"背景",{"type":18,"tag":26,"props":53,"children":54},{},[55],{"type":24,"value":56},"本文主要分为下面三个大章节：",{"type":18,"tag":26,"props":58,"children":59},{},[60],{"type":18,"tag":32,"props":61,"children":62},{},[63],{"type":24,"value":64},"Diffusion经典工作介绍",{"type":18,"tag":26,"props":66,"children":67},{},[68],{"type":18,"tag":32,"props":69,"children":70},{},[71],{"type":24,"value":72},"GraphCast模型",{"type":18,"tag":26,"props":74,"children":75},{},[76],{"type":18,"tag":32,"props":77,"children":78},{},[79],{"type":24,"value":80},"GenCast模型",{"type":18,"tag":26,"props":82,"children":83},{},[84,86],{"type":24,"value":85},"**1、**",{"type":18,"tag":32,"props":87,"children":88},{},[89],{"type":24,"value":64},{"type":18,"tag":26,"props":91,"children":92},{},[93],{"type":24,"value":94},"Diffusion model也就是所谓的扩散模型，是当下非常火热的生成式模型。本节的内容并不是跟踪diffusion系列最新的进展，而是对diffusion最经典的工作进行梳理。Diffusion模型需要的数学理论涉及统计、随机微分方差等，哪怕是数学专业的研究生，如果不是相关领域的可能也不会了解这方面的知识，所以还是有一定的门槛。下面的理论基础会涉及到部分数学推导和公式，难免会有些枯燥，但尽管如此本文也已经省略了很多细节的推导。如果对理论背景不感兴趣的同学可以跳过理论基础这一小节。",{"type":18,"tag":26,"props":96,"children":97},{},[98,103,104],{"type":18,"tag":32,"props":99,"children":100},{},[101],{"type":24,"value":102},"1.1",{"type":24,"value":38},{"type":18,"tag":32,"props":105,"children":106},{},[107],{"type":24,"value":108},"理论基础",{"type":18,"tag":26,"props":110,"children":111},{},[112],{"type":24,"value":113},"这类模型核心在“扩散”两个字。diffusion模型整体上分为两个过程，正向扩散过程和逆向扩散过程。以图像为例，我们给清晰的图像不断地加入噪声，经过有限步长之后，把这张清晰的图像变成一个噪声的分布（一般是高斯分布），这个过程就是正向扩散的过程。那么可以猜到，逆向扩散过程则是以采样一个随机噪声为起点，不断地“去噪”，经过有限步之后生成一张清晰的图像。虽然当前diffusion有大量的变种，但基本都不会脱离这两个过程。初看这个思路的时候会产生一个问题，这个逆向过程凭什么可以做到这一点呢？为了解释这个问题，我们需要对diffusion背后的数学原理有一些了解。因此，下面用形式化的数学语言来表示diffusion的建模思路。",{"type":18,"tag":26,"props":115,"children":116},{},[117],{"type":18,"tag":118,"props":119,"children":121},"img",{"alt":7,"src":120},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/793346e9bd4c4b3f82096a1b3f717b57.png",[],{"type":18,"tag":26,"props":123,"children":124},{},[125],{"type":18,"tag":118,"props":126,"children":128},{"alt":7,"src":127},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/c98ee31e51c445f6a3ec0834572d2f05.png",[],{"type":18,"tag":26,"props":130,"children":131},{},[132],{"type":18,"tag":118,"props":133,"children":135},{"alt":7,"src":134},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/1b8efa6ee4194411881bab6123c8fa6c.png",[],{"type":18,"tag":26,"props":137,"children":138},{},[139,143,144,148,149],{"type":18,"tag":118,"props":140,"children":142},{"alt":7,"src":141},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/08b93c89fb3c4b83a4525d47adba0608.png",[],{"type":24,"value":38},{"type":18,"tag":118,"props":145,"children":147},{"alt":7,"src":146},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/3ef34405f71e4af4b29b1e2ee1412748.png",[],{"type":24,"value":38},{"type":18,"tag":118,"props":150,"children":152},{"alt":7,"src":151},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/e02dc97b859840ff81d09ac668c32059.png",[],{"type":18,"tag":26,"props":154,"children":155},{},[156],{"type":24,"value":157},"通过式(1.6), (1.7), (1.11), (1.12)我们可以去计算式(1.10) loss。至此，我们给出了diffusion模型的基本理论基础和建模思想。",{"type":18,"tag":26,"props":159,"children":160},{},[161],{"type":18,"tag":32,"props":162,"children":163},{},[164],{"type":24,"value":165},"1.2 DDPM",{"type":18,"tag":26,"props":167,"children":168},{},[169],{"type":24,"value":170},"在上一小节，我们概括性地介绍了diffusion模型的数学建模背景。这个工作[1]在2015年就已经发表，但这篇文章当时是在MNIST、cifar-10这一类的数据集上进行实验，并没有引出很大的轰动。直到2020年DDPM(Denoising Diffusion Probabilistic Models)生成了较高质量的图像，才让更多人把关注点放在了diffusion这个模型上面（从侧面反映了有的时候严格的数学推导其实并没有很多的人愿意去关注，也并不代表一定能产生好的效果）。但一个坚实的理论基础是技术发展的根本，了解背后的原理能让我们在繁杂的前沿工作中看到方向。事实上，DDPM在理论方面并没有更多的推进，而是在schedule的选取、网络架构及参数化上做出了改进。下面我们看看DDPM在此基础上到底做了什么。",{"type":18,"tag":26,"props":172,"children":173},{},[174],{"type":18,"tag":118,"props":175,"children":177},{"alt":7,"src":176},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/672e2041d6cc4f8cabec7bcab3826b5e.png",[],{"type":18,"tag":26,"props":179,"children":180},{},[181],{"type":18,"tag":118,"props":182,"children":184},{"alt":7,"src":183},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/93b3f991b6aa4ea698f3203cb428d07c.png",[],{"type":18,"tag":26,"props":186,"children":187},{},[188],{"type":18,"tag":118,"props":189,"children":191},{"alt":7,"src":190},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/362008b096714e7daf255c95f94a9749.png",[],{"type":18,"tag":26,"props":193,"children":194},{},[195],{"type":18,"tag":32,"props":196,"children":197},{},[198],{"type":24,"value":199},"1.3 Score-based生成模型",{"type":18,"tag":26,"props":201,"children":202},{},[203],{"type":24,"value":204},"斯坦福大学的宋飏教授在21年发表在ICLR上的文章[3]从理论上统一了他前期的工作Score matching with Langevin dynamics (SMLD)[4]与上一节提到的DDPM。文章[3]以Stochastic Differential Equations(SDE)为工具，从更高的视角给出了SMLD与DDPM的理论框架，也为后续diffusion系列的建模奠定了一个坚实的理论基础。这篇工作也是当年ICLR的oral，是我认为难得的好paper之一。文章[3]所使用的SDE需要的数学基础比起前两节有过之而无不及，严谨的描述会使本文过于冗长，一些细节我也并没有独立去验证。为增加本文的可读性，我尽量用一些大白话去描述这篇文章的主要思想，对理论有追求的同学强烈建议去阅读原文[3]。值得一提的是，这篇文章和一些别的AI paper不同，并没有在模型架构的设计上有创新。而把更多的篇幅用来阐述理论基础，并在算法上提出了PC sampler，提升生成图片的质量。下面我们开始聊聊这篇文章的核心思路。",{"type":18,"tag":26,"props":206,"children":207},{},[208],{"type":18,"tag":118,"props":209,"children":211},{"alt":7,"src":210},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/21c85f6bc31a460e8d5c0d2e2cb6075a.png",[],{"type":18,"tag":26,"props":213,"children":214},{},[215],{"type":18,"tag":118,"props":216,"children":218},{"alt":7,"src":217},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/5388394aa1f44edc80053d139933b3f2.png",[],{"type":18,"tag":26,"props":220,"children":221},{},[222],{"type":18,"tag":118,"props":223,"children":225},{"alt":7,"src":224},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/96db58e75fa04e88ba02990646459b51.png",[],{"type":18,"tag":26,"props":227,"children":228},{},[229],{"type":18,"tag":118,"props":230,"children":232},{"alt":7,"src":231},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/f18f21e7180b41fa8dd03e0e4dcfdb86.png",[],{"type":18,"tag":26,"props":234,"children":235},{},[236],{"type":18,"tag":118,"props":237,"children":239},{"alt":7,"src":238},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/afe6865e63124cc78ccd45bb770a48f2.png",[],{"type":18,"tag":26,"props":241,"children":242},{},[243],{"type":18,"tag":118,"props":244,"children":246},{"alt":7,"src":245},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/43feb92cfe3e456b881bcaee57dde3ef.png",[],{"type":18,"tag":26,"props":248,"children":249},{},[250],{"type":18,"tag":118,"props":251,"children":253},{"alt":7,"src":252},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/9aa7a4d652d8434a8793a6b0a37d599e.png",[],{"type":18,"tag":26,"props":255,"children":256},{},[257,259,264],{"type":24,"value":258},"对于sampling的过程，除了上述对逆向SDE进行sampling之外，作者还提出了一个probability flow ODE的概念。对于初始SDE(1.17)，我们也同样可以写出对应的逆向形式，可以参考文献[3]的Eq17. 对应的递归公式与上面Algorithm 2/3相似，在predictor中",{"type":18,"tag":118,"props":260,"children":263},{"alt":261,"src":262},"图片","https://mmbiz.qpic.cn/sz_mmbiz_png/FBnLNACvkWC1VBbowE1edFHVicFZ6dgKianRIXjYx96fEmbfQ384xuKFib4IEyMOzgKH3oYM6DrZTzNxMAUphRpDg/640?wx_fmt=png&from=appmsg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1",[],{"type":24,"value":265},"的递归公式中，网络部分前面增加1/2做为系数。",{"type":18,"tag":26,"props":267,"children":268},{},[269,271],{"type":24,"value":270},"**2、**",{"type":18,"tag":32,"props":272,"children":273},{},[274],{"type":24,"value":275},"GraphCast",{"type":18,"tag":26,"props":277,"children":278},{},[279],{"type":24,"value":280},"GraphCast[6]是DeepMind团队在2023年登上Science正刊的中期预报大模型。按个人的观点，2022年可以算做AI气象元年，如ForeCastNet、Pangu（是盘古气象大模型，而非LLM）等都是在2022年挂出来的，并引起了极大的反响。虽然用神经网络做天气预报的场景从很早之前就有，譬如2015年施行健团队提出的ConvLSTM，但Pangu让气象领域的人真正意识到大模型有希望在实际预报业务中使用。",{"type":18,"tag":26,"props":282,"children":283},{},[284],{"type":24,"value":285},"ForeCastNet、Pangu等模型主要的框架都是transformer架构，而GraphCast的主体架构是更加传统的encoder-processor-decoder架构，预报未来10天的天气，时间分辨率为6小时。值得一提的是模型的建模思路是用Graph的方式对地球建模（但实际的网络中并没有采用GNN的模块），具体如下图所示。",{"type":18,"tag":26,"props":287,"children":288},{},[289],{"type":18,"tag":118,"props":290,"children":292},{"alt":7,"src":291},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/688a0dd3cdcb4df6a42533942833c006.png",[],{"type":18,"tag":26,"props":294,"children":295},{},[296],{"type":18,"tag":118,"props":297,"children":299},{"alt":7,"src":298},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/c3cb61a90c794442952fbde4a6331ad1.png",[],{"type":18,"tag":26,"props":301,"children":302},{},[303],{"type":18,"tag":118,"props":304,"children":306},{"alt":7,"src":305},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/fe9eaaa8deb542108d173664a67273b4.png",[],{"type":18,"tag":26,"props":308,"children":309},{},[310],{"type":18,"tag":118,"props":311,"children":313},{"alt":7,"src":312},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/83259e0332054f6180030a3646c7d1a1.png",[],{"type":18,"tag":26,"props":315,"children":316},{},[317,322,323],{"type":18,"tag":32,"props":318,"children":319},{},[320],{"type":24,"value":321},"3.2",{"type":24,"value":38},{"type":18,"tag":32,"props":324,"children":325},{},[326],{"type":24,"value":327},"模型结构",{"type":18,"tag":26,"props":329,"children":330},{},[331],{"type":24,"value":332},"关于GenCast的模型结构我在这里放一下原文推理过程的模型结构图，这是一个典型的diffusion去噪的过程图。GenCast的思路是利用过去2个时间步的输入来预测下一个时刻的预报结果，然后再把下一个时刻的预报结果做为输入，滚动预报，直至预报未来15天的天气。单个时刻的预报前向20次，也就是下图中N=20，而时间分辨率是6小时，故T=15*4=60。",{"type":18,"tag":26,"props":334,"children":335},{},[336],{"type":18,"tag":118,"props":337,"children":339},{"alt":7,"src":338},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/30816a30832f429c8f5da654bb82374c.png",[],{"type":18,"tag":26,"props":341,"children":342},{},[343],{"type":18,"tag":118,"props":344,"children":346},{"alt":7,"src":345},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/a50e362ccd9e48989b9a05751f587bce.png",[],{"type":18,"tag":26,"props":348,"children":349},{},[350],{"type":18,"tag":32,"props":351,"children":352},{},[353],{"type":24,"value":354},"3.3 实验结果",{"type":18,"tag":26,"props":356,"children":357},{},[358],{"type":24,"value":359},"论文在不同的维度对比了GenCast和基线（传统的集合预报ENS）的效果。在温压湿风等44个常规要素的预报上，对比了RMSE的指标。GenCast相对于ENS在未来15天的预报中，RMSE整体优于ENS。其中预测的前2\\~3个时效，RMSE指标优于ENS 10%-20%左右，在高空的要素上劣于ENS。而后几个时效的预测中RMSE指标略优于ENS0\\~5%左右。",{"type":18,"tag":26,"props":361,"children":362},{},[363],{"type":24,"value":364},"在集合预报（GenCast的集合预报主要通过不同的随机初始噪声为起点，得到不同的Sampling的方式进行集合预报）的可靠性上，实验主要对比2米温度、10米风速u、850hPa温度、500hPa地势高度、700hPa，通过Rank histograms进行对比。GenCast相对于ENS在未来15天中不同预报时刻的曲线都相对比较平坦。",{"type":18,"tag":26,"props":366,"children":367},{},[368],{"type":24,"value":369},"在极端情况的对比中，实验主要对比极端高温、低温、强风速、海平面低气压，通过Brier skill score进行对比。在以上四种极端天气要素中，GenCast在未来15天的预报结果，Brier评分都优于ENS。",{"type":18,"tag":26,"props":371,"children":372},{},[373],{"type":24,"value":374},"此外，GenCast还预测了一个下游任务，也就是台风路径预测。论文以2019年登陆日本的Hagibis台风做为case进行预测，预测路径如下图所示。可以看出GenCast预测的台风路径随着预报时间的临近越来越“收敛”于EAR5的结果。",{"type":18,"tag":26,"props":376,"children":377},{},[378],{"type":18,"tag":118,"props":379,"children":381},{"alt":7,"src":380},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/01/17/7cc7b10dec2d4eddb57a3f626f170854.png",[],{"type":18,"tag":383,"props":384,"children":386},"h2",{"id":385},"参考文献",[387],{"type":18,"tag":32,"props":388,"children":389},{},[390],{"type":24,"value":385},{"type":18,"tag":26,"props":392,"children":393},{},[394,396,401],{"type":24,"value":395},"[1] ",{"type":18,"tag":32,"props":397,"children":398},{},[399],{"type":24,"value":400},"Deep unsupervised learning using nonequilibrium thermodynamics",{"type":24,"value":402},", Sohl-Dickstein, Jascha and Weiss, Eric A. and",{"type":18,"tag":26,"props":404,"children":405},{},[406],{"type":24,"value":407},"Maheswaranathan, Niru and Ganguli, Surya. JMLR, 2015.",{"type":18,"tag":26,"props":409,"children":410},{},[411,413,418],{"type":24,"value":412},"[2] ",{"type":18,"tag":32,"props":414,"children":415},{},[416],{"type":24,"value":417},"Denoising Diffusion Probabilistic Models",{"type":24,"value":419},", Jonathan Ho, Ajay Jain and Pieter Abbeel. NIPS, 2020.",{"type":18,"tag":26,"props":421,"children":422},{},[423,425,430],{"type":24,"value":424},"[3] ",{"type":18,"tag":32,"props":426,"children":427},{},[428],{"type":24,"value":429},"Score-Based Generative Modeling through Stochastic Differential Equations",{"type":24,"value":431},", Yang Song, Jascha Sohl-Dickstein and",{"type":18,"tag":26,"props":433,"children":434},{},[435,437],{"type":24,"value":436},"Diederik P. Kingma) et al. ",{"type":18,"tag":438,"props":439,"children":443},"a",{"href":440,"rel":441},"https://arxiv.org/abs/2011.13456",[442],"nofollow",[444],{"type":24,"value":440},{"type":18,"tag":26,"props":446,"children":447},{},[448,450,455],{"type":24,"value":449},"[4] ",{"type":18,"tag":32,"props":451,"children":452},{},[453],{"type":24,"value":454},"Generative modeling by estimating gradients of the data distribution",{"type":24,"value":456},", Yang Song and Stefano Ermon. In Advances in",{"type":18,"tag":26,"props":458,"children":459},{},[460],{"type":24,"value":461},"Neural Information Processing Systems, pp. 11895–11907, 2019.",{"type":18,"tag":26,"props":463,"children":464},{},[465,467,472],{"type":24,"value":466},"[5] ",{"type":18,"tag":32,"props":468,"children":469},{},[470],{"type":24,"value":471},"Elucidating the Design Space of Diffusion-Based Generative Models",{"type":24,"value":473},", Tero Karras, Miika Aittala, Timo Aila and Samuli",{"type":18,"tag":26,"props":475,"children":476},{},[477],{"type":24,"value":478},"Laine. NIPS, 2022.",{"type":18,"tag":26,"props":480,"children":481},{},[482,484,489],{"type":24,"value":483},"[6] ",{"type":18,"tag":32,"props":485,"children":486},{},[487],{"type":24,"value":488},"Learning skillful medium-range global weather forecasti****ng.",{"type":24,"value":490}," Remi Lam et al. Science, 2023. DOI:10.1126/",{"type":18,"tag":26,"props":492,"children":493},{},[494],{"type":24,"value":495},"science.adi2336",{"title":7,"searchDepth":497,"depth":497,"links":498},4,[499],{"id":385,"depth":500,"text":385},2,"markdown","content:technology-blogs:zh:3579.md","content","technology-blogs/zh/3579.md","technology-blogs/zh/3579","md",1776506131454]