Is Flow Matching Just Trajectory Replay for Sequential Data?
Organizations: Department of Mathematics, KTH Royal Institute of Technology · Nordita, KTH Royal Institute of Technology and Stockholm University · Department of Statistics, University of California at Berkeley · International Computer Science Institute · Lawrence Berkeley National Laboratory
Abstract
Flow matching (FM) is increasingly used in scientific domains for time series generation and forecasting, where data often arise from underlying dynamical systems. However, it is not well-understood whether it learns transferable dynamical structure or simply performs an effective ''trajectory replay''. We study this question by deriving the optimal velocity field targeted by the empirical FM objective on sequential data. For the Gaussian conditional paths commonly used in practice, we show that the resulting sampler is an ODE whose dynamics describe a nonparametric, memory-augmented continuous-time dynamical system. The driving velocity field admits a closed-form expression as a weighted mixture of instantaneous velocities determined by observed transitions. This characterization provides an interpretable view of neural FM models as parametric estimation of an underlying nonparametric target and naturally leads to FreeFM: a closed-form, training-free realization of this target. FreeFM provides a transparent reference for studying sequential FM while yielding effective probabilistic forecasts directly from historical transitions.
Figures & tables
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Method family | Local | Nonparametric | Cont-time | Probabilistic | Neural |
|---|---|---|---|---|---|
| EDM ( Sugihara and May, 1990 ) | ✔ | ✔ | |||
| KAF ( Zhao and Giannakis, 2016 ) | ✔ | ✔ | |||
| KCE | ✔ | ✔ | × | × | |
| Diffusion map ( Coifman and Lafon, 2006 ) | ✔ | ✔ | × | × | × |
| CNF/FM models ( Lim et al., 2025 ) | × | × | ✔ | ✔ | ✔ |
| Retrieval-based models ( Tire et al., 2024 ) | ✔ | × |
| FreeFM | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Systems | dense | top- | VanillaFM | TiDE | LSTM | Trans. | N-BEATS | Linear | ESN |
| All | 225.4 | 128.4 | 90.7 | 14.1 | 61.4 | 177.0 | 294.4 | 0.3 | 0.4 |
| 227.3 | 129.4 | 90.6 | 14.1 | 61.4 | 177.0 | 291.7 | 0.3 | 0.4 | |
| 212.0 | 118.8 | 90.0 | 14.1 | 61.2 | 176.8 | 295.9 | 0.3 | 0.4 | |
| 214.8 | 125.0 | 91.2 | 14.3 | 61.2 | 176.5 | 310.3 | 0.4 | 0.4 | |
| 221.3 | 121.9 | 88.5 | 14.0 | 61.4 | 176.3 | 303.8 | 0.4 | 0.4 | |
| Model | Aus. E. ( ) | Exchange ( ) | Bitcoin ( ) | Solar ( ) | Elec. ( ) | Traffic ( ) |
|---|---|---|---|---|---|---|
| FreeFM | ||||||
| VanillaFM | ||||||
| LSTM | ||||||
| NBEATS | ||||||
| TiDE | ||||||
| Transformer |
| Model | Aus. E. ( ) | Exchange ( ) | Bitcoin ( ) | Solar ( ) | Elec. ( ) | Traffic ( ) |
|---|---|---|---|---|---|---|
| FreeFM | ||||||
| VanillaFM | ||||||
| LSTM | ||||||
| NBEATS | – | |||||
| TiDE | ||||||
| Transformer |
| Dataset | FreeFM | VanillaFM | TiDE | LSTM | Trans. | N-BEATS |
|---|---|---|---|---|---|---|
| Aus. Elec. | 82.2 | 580.0 | 12.6 | 25.3 | 171.5 | 333.5 |
| Exchange | 57.2 | 528.0 | 11.3 | 22.4 | 139.1 | 317.2 |
| Bitcoin | 74.1 | 552.2 | 11.6 | 23.2 | 140.3 | 320.4 |
| Solar | 125.3 | 843.2 | 14.8 | 30.2 | 155.7 | 943.9 |
| Electricity | 229.7 | 1263.5 | 17.3 | 41.0 | 155.7 | 1730.8 |
| Traffic | 574.6 | 4814.0 | 32.3 | 87.6 | 156.4 | 5223.5 |
| sMAPE (%) | VPT | MSE | CRPS | |
|---|---|---|---|---|
| 0.001 | 42.02 0.27 | 0.730 0.008 | 2.8521 0.0436 | 0.3417 0.0023 |
| 0.005 | 42.12 0.28 | 0.733 0.007 | 2.8988 0.0535 | 0.3423 0.0025 |
| 0.010 | 42.37 0.27 | 0.728 0.007 | 2.9214 0.0611 | 0.3456 0.0025 |
| 0.020 | 43.51 0.26 | 0.707 0.007 | 3.0479 0.0373 | 0.3561 0.0014 |
| 0.050 | 53.88 0.29 | 0.614 0.005 | 8.0008 0.1510 | 0.5295 0.0038 |
| 0.100 | 105.86 0.35 | 0.404 0.005 | 22.4631 0.1591 |
| Aus. Elec. | Exchange | Bitcoin | Solar | Electricity | Traffic | |
|---|---|---|---|---|---|---|
| 0.001 | 0.0295 0.0021 | 0.0084 0.0004 | 5.1512 0.0170 | 0.0006 0.0005 | 1.0829 0.0008 | 0.1084 0.0004 |
| 0.005 | 0.0295 0.0021 | 0.0084 0.0004 | 5.1423 0.0175 | 0.0006 0.0005 | 1.0829 0.0008 | 0.1085 0.0005 |
| 0.010 | 0.0295 0.0021 | 0.0084 0.0004 | 5.1132 0.0167 | 0.0006 0.0005 | 1.0832 0.0008 | 0.1090 0.0006 |
| 0.050 | 0.0273 0.0019 | 0.0099 0.0004 | 4.6111 0.0139 | 0.0006 0.0005 | 1.0899 0.0007 | 0.1226 0.0003 |
| 0.100 | 0.0235 0.0016 | 0.0167 0.0005 | 4.6349 0.0146 | 0.0006 0.0006 | 1.1020 0.0008 | 0.1321 0.0002 |
| Aus. Elec. | Exchange | Bitcoin | Solar | Electricity | Traffic | |
|---|---|---|---|---|---|---|
| 0.001 | 0.0931 0.0051 | 0.0528 0.0012 | 1.6828 0.0031 | 0.0131 0.0007 | 0.7526 0.0003 | 0.1846 0.0009 |
| 0.005 | 0.0930 0.0051 | 0.0529 0.0012 | 1.6816 0.0034 | 0.0131 0.0007 | 0.7526 0.0003 | 0.1850 0.0010 |
| 0.010 | 0.0930 0.0051 | 0.0530 0.0012 | 1.6780 0.0028 | 0.0132 0.0007 | 0.7527 0.0003 | 0.1860 0.0010 |
| 0.050 | 0.0884 0.0047 | 0.0589 0.0013 | 1.6318 0.0027 | 0.0134 0.0007 | 0.7550 0.0003 | 0.2002 0.0002 |
| 0.100 | 0.0804 0.0035 | 0.0787 0.0014 | 1.7000 0.0046 | 0.0139 0.0007 | 0.7594 0.0003 | 0.2102 0.0001 |
| MSE | |||||
|---|---|---|---|---|---|
| Dataset | |||||
| Electricity | 1.082710 0.001030 | 1.084720 0.001040 | 1.086580 0.001070 | 1.088400 0.001070 | 1.089880 0.001020 |
| Exchange Rate | 0.008701 0.000462 | 0.008715 0.000462 | 0.008728 0.000463 | 0.008742 0.000463 | 0.008755 0.000463 |
| Solar Energy | 0.000268 0.000098 | 0.000292 0.000128 | 0.000294 0.000129 | 0.000294 0.000129 | 0.000303 0.000127 |
| Traffic | 0.108113 0.000520 | 0.108292 0.000428 | 0.108414 0.000376 | 0.108606 0.000347 | 0.108796 0.000339 |
| Bitcoin | 5.155820 0.013000 | 5.147300 0.012800 | 5.136480 0.012100 | 5.127580 0.012200 | 5.118460 0.012200 |
| CRPS | |||||
|---|---|---|---|---|---|
| Dataset | |||||
| Electricity | 0.752643 0.000450 | 0.753326 0.000438 | 0.753950 0.000455 | 0.754562 0.000473 | 0.755057 0.000454 |
| Exchange Rate | 0.054103 0.001580 | 0.054160 0.001580 | 0.054218 0.001580 | 0.054276 0.001580 | 0.054334 0.001580 |
| Solar Energy | 0.012725 0.000144 | 0.012762 0.000175 | 0.012764 0.000175 | 0.012766 0.000175 | 0.012780 0.000153 |
| Traffic | 0.183996 0.001220 | 0.184448 0.001120 | 0.184820 0.001080 | 0.185137 0.000981 | 0.185689 0.001030 |
| Bitcoin | 1.683860 0.001710 | 1.682560 0.001810 | 1.681220 0.001600 | 1.680110 0.001720 | 1.678980 0.001480 |
| Metric | FreeFM | TFM |
|---|---|---|
| sMAPE (%) | 23.52 0.02 | 76.42 0.79 |
| VPT | 1.192 0.003 | 0.370 0.012 |
| MSE | 1.4397 0.0082 | 6.6982 0.4929 |
| CRPS | 0.2238 0.0004 | 1.1108 0.0283 |
| sMAPE (%) | CRPS | MSE | ||||
|---|---|---|---|---|---|---|
| Dataset | FreeFM | TFM | FreeFM | TFM | FreeFM | TFM |
| Aus. Elec. | 34.08 0.09 | 33.88 1.23 | 0.1211 0.0006 | 0.1633 0.0115 | 0.0415 0.0002 | 0.0582 0.0054 |
| Exchange | 9.16 0.05 | 9.37 0.68 | 0.0685 0.0006 | 0.0712 0.0054 | 0.0120 0.0002 | 0.0134 0.0018 |
| Bitcoin | 61.66 0.17 | 71.53 3.17 | 0.7821 0.0005 | 0.8940 0.0569 | 1.6334 0.0016 | 2.0112 0.2558 |
| Solar E | 8.82 2.14 | 5.54 0.45 | 0.0194 0.0027 | 0.0241 0.0022 | 0.0060 0.0026 | 0.0017 0.0002 |
| Elec. | 119.99 0.03 | 98.31 0.84 | 1.5216 0.0003 | 0.7252 0.0089 | 4.1381 0.0008 | 0.9880 0.0217 |
| Metric | FreeFM | KCE | KAF |
|---|---|---|---|
| MSE | 1.7092 0.0201 | 2.9089 0.0225 | 5.3139 |
| sMAPE (%) | 26.845 0.029 | 26.795 0.123 | 39.564 |
| VPT | 1.1522 0.0068 | 1.0059 0.0094 | 0.8278 |
| Dataset | FreeFM | KCE | KAF |
|---|---|---|---|
| Horizon 5 | |||
| Electricity | 1.0900 | 1.5439 | 1.3538 |
| Exchange | 0.0085 | 1.1770 | 3.2789 |
| Solar | 0.000361 | 0.006683 | |
| Traffic | 0.1090 | 0.0744 | 0.0709 |
| Bitcoin | 5.1263 | 14.8034 | 14.0718 |