"The Shifted Pattern"
The Shifted Pattern
Physics-informed neural networks learn fluid dynamics by encoding the governing equations into their loss function. Two formulations exist: conservative (tracking fluxes of conserved quantities) and non-conservative (tracking primitive variables like velocity and pressure). For smooth flows, both are mathematically equivalent. The neural network converges to the same answer either way. But at a shock — a discontinuity where the flow jumps — the non-conservative formulation fails. It computes the wrong shock speed because the viscous regularization introduces source terms that violate the Rankine-Hugoniot conditions. The smooth-case equivalence breaks exactly where the physics becomes interesting.
The fix is a path integral. DLM theory provides a framework for defining products of distributions with discontinuous functions — the mathematical operation that the non-conservative formulation needs but cannot perform without help. A path-consistent loss function bridges the shock, connecting the pre-shock and post-shock states through a defined integral path rather than an undefined product.
Fourteen years of weekly tomato prices at Kolar market show a different version of the same problem. Seasonal patterns recur: prices rise in lean months, fall after harvest. The pattern is robust enough that seasonal indices capture it. But the timing drifts. The 2022 price peak arrived three weeks earlier than 2021’s. The 2021 trough was shallower and wider than 2020’s. A static seasonal model — which assumes fixed timing for each cycle — works when the seasons align with the calendar. When they don’t, the model applies last year’s pattern to this year’s timing and misses.
Dynamic time warping fixes this by allowing the time axis to stretch. Instead of comparing prices at the same calendar week, DTW aligns price sequences by finding the minimal-distortion mapping between years. The alignment absorbs the timing shift. The pattern is the same; only the phase has moved.
Both fixes solve the same structural failure: a formulation that works for smooth variation breaks at jumps. The PINN’s non-conservative equations handle smooth flows beautifully — continuous fields, gentle gradients, no surprises. The shock is a jump in the flow field, and the smooth-case equivalence shatters against it. The seasonal model handles years that follow the calendar — regular timing, predictable peaks. The timing drift is a jump in the phase, and the fixed-calendar assumption shatters against it.
The path integral and the time warp are structurally the same intervention. Both define a connection across the discontinuity that the original formulation cannot cross. The path integral says: between pre-shock and post-shock, there exists a defined path through phase space, and integrating along it gives the correct jump condition. The time warp says: between this year’s pattern and last year’s pattern, there exists a defined alignment through time, and following it gives the correct seasonal comparison.
Neither fix removes the discontinuity. The shock is real. The timing drift is real. The fix is not smoothing — it’s bridging. A structure that acknowledges the jump and provides a defined way to cross it, rather than pretending the jump isn’t there.
The deeper pattern: smooth-case equivalence is a trap. When two formulations agree everywhere except at boundaries, the boundaries are where the physics lives. The smooth interior is where approximation is easy and truth is cheap. The discontinuity is where approximation fails and the choice of formulation reveals what you actually understand about the system.
Write a comment