<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roysegal on Medium]]></title>
        <description><![CDATA[Stories by Roysegal on Medium]]></description>
        <link>https://medium.com/@roysegal123?source=rss-ee624c20876e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JUSxWIT2nJ1DlWfg</url>
            <title>Stories by Roysegal on Medium</title>
            <link>https://medium.com/@roysegal123?source=rss-ee624c20876e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:11:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roysegal123/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Forecasting Real Fluid Flows: Second Place in Both RealPDE Tracks]]></title>
            <link>https://medium.com/@roysegal123/forecasting-real-fluid-flows-second-place-in-both-realpde-tracks-0d9436ceae58?source=rss-ee624c20876e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d9436ceae58</guid>
            <category><![CDATA[fluid-dynamics]]></category>
            <category><![CDATA[dynamic-systems]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[dep]]></category>
            <dc:creator><![CDATA[Roysegal]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 11:46:03 GMT</pubDate>
            <atom:updated>2026-10-19T11:55:45.975Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Our approach to representation, augmentation, uncertainty, and learning from a recording’s history.</em></p><p>Our team, Pistachio, finished second in both tracks of the RealPDE competition.</p><p>The task was to forecast real fluid motion: given 20 observed velocity frames, predict the next 20, together with uncertainty bounds. Each frame contains horizontal and vertical velocity on a spatial grid.</p><p>Our final solution combined a spatiotemporal forecasting model with carefully designed inputs, flow-aware augmentation, separate prediction and uncertainty paths, and lightweight learned postprocessing.</p><p>I’ve put together an <a href="https://seroy123.github.io/work/realpde/">interactive walkthrough</a> with forecasting examples, augmentation demos, and experimental evidence. This article explains the main decisions behind the solution.</p><p><strong>The problem</strong></p><p>Fluid recordings contain both persistent structure and rapidly changing motion. A model needs to understand where the flow currently is, how it has been moving, and which changes are plausible next.</p><p>The two competition tracks differed in the information available at prediction time:</p><ul><li><strong>Track 1:</strong> use the current observation window.</li><li><strong>Track 2:</strong> also use earlier observations from the recording.</li></ul><p>We built on <a href="https://arxiv.org/abs/2211.12509">SimVPv2/gSTA</a>, which combines spatial encoding, temporal processing, and spatial decoding. Much of our development focused on the information entering that model and the objectives guiding its predictions.</p><p><strong>Give the model a reference state</strong></p><p>The last observed frame is a useful starting point for forecasting. We made that reference explicit in two ways.</p><p>First, we repeated the last frame’s velocity channels alongside every observed timestep. Earlier frames describe the motion leading up to the present; the repeated last frame anchors the current state.</p><p>Second, we trained the model to predict a residual relative to that frame:</p><p><strong>Future prediction = last observed frame + predicted change</strong></p><p>We scaled that change using local flow statistics. A zero residual therefore corresponds to a persistence forecast: the flow stays where it was.</p><p>Local normalization helped handle differences in velocity magnitude and variability across the field. We also supplied the normalization statistics as input channels, allowing the model to retain information about physical scale.</p><p>Residual prediction and normalization are established techniques. Our work was in adapting them to this forecasting problem and combining them with useful local statistics.</p><p><a href="https://seroy123.github.io/work/realpde/#representation">Explore the input representation →</a></p><p><strong>Cropping to address overfitting</strong></p><p>We observed overfitting and introduced spatial cropping to vary the views seen during training.</p><p>The raw recordings have a 64 × 128 spatial grid. Our model operates on 32 × 64 inputs, which gave us two ways to construct a training example:</p><ul><li>Subsample the entire field with stride two.</li><li>Take a native-resolution 32 × 64 crop.</li></ul><p>Both produce the same tensor shape, but they expose different information. The subsampled view retains the full scene. The crop shows finer local structure while retaining only 25% of the original area.</p><p><em>The same input shape can represent global context or a smaller region with greater spatial detail.</em></p><p>We used native crops in half of the training samples, keeping inputs and future targets spatially aligned.</p><p>In our crop experiments, this recipe performed better than the milder resized crops we tested. Those alternatives retained 80–100% or 40–70% of the original area.</p><p>The useful finding was the combination: small native-resolution crops, interleaved with full-field views. Crop size and resampling changed together in these experiments, so the result concerns the complete recipe.</p><p><a href="https://seroy123.github.io/work/realpde/#augmentation">Try the crop explorer and inspect the ablation →</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CyR0jAPiDaeOatL5g-tE5g.png" /></figure><p><strong>Augment the velocity field consistently</strong></p><p>We also used mixup between two non-overlapping windows from the same recording. One mixing coefficient blended both the observations and their future targets.</p><p>Keeping both windows within a recording preserved the underlying recording condition while varying the temporal patterns presented to the model.</p><p>Vertical reflection required another detail. Velocity is a vector: reflecting an image vertically also requires negating its vertical velocity component. The same transformation must apply to the targets and, in Track 2, the history features.</p><p>These details are easy to overlook when treating scientific fields like ordinary images.</p><p><strong>Give uncertainty its own final layers</strong></p><p>The model needed to produce both a point forecast and uncertainty bounds.</p><p>We shared most of the network, then separated the final gSTA block and decoder into two paths. This gave each objective dedicated capacity while retaining a shared representation of the flow.</p><p>We also included fluctuation-energy terms in the forecasting objective. Pixelwise losses can encourage overly smooth predictions; the additional terms helped preserve temporal variation.</p><p>Finally, small learned postprocessing networks refined the forecast’s fluctuation energy and uncertainty intervals.</p><p><em>One validation location across 20 future frames: measured velocity, point forecast, and final predicted interval.</em></p><p><a href="https://seroy123.github.io/work/realpde/#architecture">Explore the architecture</a> and <a href="https://seroy123.github.io/work/realpde/#postprocessing">postprocessing</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LsG5D3agIo21k--cMkTVdg.png" /></figure><p><strong>Track 2: summarize what the model has already observed</strong></p><p>For Track 2, we retained our strongest Track 1 architecture and added seven features describing earlier observations:</p><ul><li>Two mean-difference maps.</li><li>Two log-scale-difference maps.</li><li>One history-confidence map.</li><li>Two fluctuation-energy-difference maps.</li></ul><p>The intuition was straightforward: the current window tells us what is happening now; the recording’s history tells us what has been typical.</p><p>Comparing the two provides context about changes in mean flow, variability, and fluctuation energy.</p><p>We maintained these statistics incrementally and injected the resulting maps into the spatial encoder through a small projection. This added just <strong>3,537 parameters</strong>, approximately <strong>0.018%</strong> of the Track 1 model.</p><p>The history was causal. It used previously observed inputs, reset at recording boundaries, and never included future targets. Model weights remained fixed during inference.</p><p>Across the same 16 validation recordings, the complete Track 2 package achieved approximately <strong>2.1% lower velocity MAE</strong> than the Track 1 package. That comparison includes the accompanying training and postprocessing changes; it is a comparison of the final systems.</p><p><a href="https://seroy123.github.io/work/realpde/#history">See the seven history features →</a></p><p><strong>Make the complete pipeline efficient</strong></p><p>Inference included more than the main neural network: reflected views, postprocessing, and history updates all contributed to runtime.</p><p>We packed the original and reflected views together, used BF16 for neural computation, and applied CUDA Graphs to reduce launch overhead. Running statistics kept history storage fixed as recordings grew.</p><p>The final Docker pipeline trained the forecaster, fitted fresh postprocessing components, exported the model, and checked the prediction interface.</p><p><strong>What we learned</strong></p><p>The most useful experiments often changed the model’s view of the problem: providing a reference frame, predicting locally scaled changes, varying spatial context, and making historical statistics explicit.</p><p>The final result came from combining those choices into a consistent training and inference pipeline.</p><p>To see how that translates into actual forecasts, visit the <a href="https://seroy123.github.io/work/realpde/#forecasts">interactive solution walkthrough</a>. It shows two of our best and two of our worst validation conditions, with measured flow, predictions, and errors side by side — and Reynolds number and angle of attack for context.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d9436ceae58" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>