Source-linked AI summary
CorrFlow: Exact and Permutation-Equivariant Flow Matching on the Correlation Elliptope
Gautier Marti
TL;DR
Generating financial correlation matrices requires respecting validity and permutation symmetry while learning empirical structure relevant to risk analysis. CorrFlow combines an exact generalized Fisher transform with equivariant graph flow matching, improving aggregate structural distances in the Taiwan case study over the evaluated generators and historical lookup.
Problem
Correlation-matrix generation must respect validity and permutation symmetry while modeling empirical financial structure relevant to risk analysis.
Source: §1 · pp. 1–2Method
CorrFlow maps full-rank correlations to unconstrained generalized Fisher coordinates and learns their distribution with a permutation-equivariant graph flow.
Source: §1 · p. 2, §2.1 · p. 2Results
In the Taiwan case study, CorrFlow improves aggregate structural distances over the evaluated 20-epoch cCorrGAN and image DDPM implementations and historical lookup, though coverage remains incomplete.
Source: §6 · p. 9Takeaways & Limitations
The combination guarantees valid outputs and removes arbitrary asset order from the learned mechanism.
Source: §6 · p. 9The Taiwan target is estimated 252-day correlations from heavily overlapping windows, not independent market episodes or a full market-risk simulator.
Source: §5 · p. 8
Abstract
from arXiv · showhide
Correlation matrices combine nonlinear positive-definiteness constraints with a simultaneous row-column permutation symmetry. Their generation therefore involves two distinct problems. First, every output must remain on the correlation elliptope, irrespective of how its variables are ordered. Second, the generator must learn the domain-specific distribution occupied by empirical data inside that valid space. Existing financial image generators mix these problems: they learn ordered matrix entries and repair invalid draws afterward. We introduce CorrFlow, which separates them. A generalized Fisher transform maps full-rank correlation matrices bijectively to unconstrained coordinates, guaranteeing valid outputs without projection. A graph flow-matching network learns the empirical distribution in those coordinates and is permutation equivariant: reordering the variables only reorders the output. We compare a conditional CorrGAN reimplementation, image diffusion, and CorrFlow on $80\times80$ Taiwan equity matrices using five seeds per neural method. CorrFlow produces 100% valid draws without repair and obtains feature sliced-Wasserstein distance $.712\pm.141$, versus $4.339\pm.252$ for CorrGAN and $4.610\pm.191$ for image diffusion after their invalid outputs are projected back to the correlation space. It also improves this distance over historical lookup, while lookup retains higher local coverage. These results support the combined construction under the evaluated training budget; they do not establish superiority over fully tuned image models or isolate the contribution of each component.
1. Introduction
Correlation-matrix generation must respect both the valid matrix geometry and simultaneous row-column permutation symmetry, while learning the empirical distributions relevant to financial risk analysis. CorrFlow separates these requirements and is evaluated against financial image generators and other controls in a Taiwan case study.
1. Introduction
- Financial correlation libraries support stress testing and portfolio-risk analysis; crisis observations are scarce, and pairwise correlations grow quadratically with the asset universe.Covariance structure is also central to adaptive beamforming and source detection.Source: §1 · p. 1
- Existing financial image generators use hierarchical clustering to order matrices, making outputs order-dependent and potentially invalid, so they require nearest-correlation repair.Prior studies reported recovered empirical matrix properties and stable diffusion training in a case study.Source: §1 · p. 2
- CorrFlow applies a global-diffeomorphism pullback principle with GFT coordinates and an equivariant vector field; unlike normalized-Cholesky coordinates, its representation is permutation equivariant.The paper does not introduce a new general framework for Riemannian flow matching.Source: §1 · p. 2
- CorrFlow separates validity and distribution learning: a generalized Fisher transform maps full-rank correlations to unconstrained coordinates, where an equivariant graph network learns empirical structure.Reordering variables only reorders the generated matrix.Source: §1 · p. 2
- The controlled Taiwan case study compares conditional CorrGAN, image DDPM, a low-rank Gaussian generator, and historical lookup, using five seeds for neural models.The purpose is to generate empirical correlation matrices, not forecast returns or the next correlation matrix.Source: §1 · p. 2
2. CorrFlow
CorrFlow maps valid correlations into unconstrained generalized Fisher coordinates, where ordinary Euclidean flow matching can learn their distribution. A permutation-equivariant graph network transports noise in these coordinates, and inverse transformation yields valid, relabeling-consistent matrices.
2.1. Generalized Fisher coordinates
- The generalized Fisher transform maps the elliptope interior bijectively to unconstrained coordinates, so every finite generated vector returns one valid correlation matrix without projection.It stacks the entries strictly below the diagonal of log C; the inverse recovers the missing diagonal by fixed-point iteration before exponentiation.Source: §2.1 · p. 2
- Figure 1 contrasts independently chosen entries that can be invalid, GFT vectors that map inside the elliptope, and 900 Taiwan submatrices occupying a smaller, mostly positive region.GFT enforces the universal constraint while CorrFlow learns the domain-specific distribution within it.Source: Figure 1 · p. 3, §2.1 · p. 3
- The Euclidean inner product in GFT coordinates induces a pullback Riemannian metric, allowing ordinary Euclidean flow matching without explicit manifold-geodesic computation.Euclidean distances and paths after transformation define geometry on the original elliptope.Source: §2.1 · p. 3
- The hollow-matrix GFT representation is permutation equivariant: relabeling variables before transformation only applies the corresponding row-column relabeling to its coordinates.This avoids a privileged variable ordering, unlike order-dependent Cholesky coordinates.Source: §2.1 · p. 3
2.2. Equivariant rectified flow
- Training linearly interpolates standardized GFT samples from symmetric Gaussian edge noise; ODE transport maps fresh noise to samples before unstandardization and inverse GFT.Conditioning y is global information unchanged by variable permutation.Source: §2.2 · pp. 3–4
- Shared node and edge updates enforce equivariance, and the ODE flow map plus inverse GFT guarantees valid outputs; dense sampling costs O(Kn^2 + In^3).Here K is the number of vector-field evaluations and I the number of inverse-GFT iterations; matrix-log preprocessing costs O(n^3).Source: §2.2 · p. 4
3. Experimental Protocol
The protocol evaluates conditional correlation generation on chronological Taiwan equity data, with common test cases and five-seed neural comparisons. It compares lookup, Gaussian, and image baselines with CorrFlow using fidelity, coverage, validity, and detectability metrics.
Data
- The benchmark contains 24,408 matrices from rolling 252-session windows, split chronologically into 13,600 training, 3,920 validation, and 6,888 test matrices.The benchmark uses n = 80 for comparability with earlier cCorrGAN experiments; adjacent split boundaries still share return observations.Source: §3 · p. 5
Conditions
- Models condition on an adverse, typical, or favorable regime and a continuous performance score, which represents broad observed market states rather than a predicted quantity.Regimes are defined by the bottom 20%, middle 60%, and top 20% of training performance scores.Source: §3 · p. 5
Baselines
- The baselines include historical and score-matched replay, regime-specific PCA-Gaussian models, conditional CorrGAN, and image DDPM; image outputs are repaired before fidelity evaluation.Image methods use Ward clustering with optimal leaf ordering, whereas CorrFlow uses the matrices in their original random order and requires no repair.Source: §3 · pp. 5–6
Metrics
- Evaluation uses order-invariant summaries for feature sliced-Wasserstein distance and energy distance, plus neighborhood precision and recall, pre-repair validity, and a real-versus-generated classifier.All methods use the same 1,500 test cases, balanced across regimes; real–real resampling provides a finite-sample reference.Source: §3 · p. 6
Training
- Neural methods train for 20 passes over the same 13,600 matrices using five seeds, but equal epochs do not equalize optimization, compute, or convergence.CorrFlow uses 0.17M parameters and 25 Heun steps; longer validation-selected image-model training could change the comparison.Source: §3 · pp. 6–7
4. Results
CorrFlow is the only neural method valid before repair and has the best mean fidelity and coverage metrics among fitted generators under the reported budget. Its aggregate-distance advantage over historical lookup comes with a local-coverage trade-off, and the comparisons remain bounded by temporal shift and detectability.
Main comparison
- CorrFlow is the only neural method valid before repair and has the best mean fidelity and coverage metrics among fitted generators under the reported budget.Repair makes image outputs numerically valid, but does not explain their post-repair fidelity gap.Source: §4 · p. 7
Detectability
- AUC 1.000 in every seed shows that both repaired image models remain easily separable from real data.The result indicates that post-repair image samples still differ detectably from real samples under the classifier evaluation.Source: §4 · p. 8
Lookup comparison
- CorrFlow improves F-SWD and energy distance over historical lookup, while replay retains higher local precision and recall and preserves observed scenarios exactly.None of 7,500 CorrFlow draws duplicates a training GFT vector.Source: §4 · p. 8
Temporal reference
- AUC .499 ± .021 separates two test-period subsets, while AUC .950 ± .005 separates training- and test-period matrices, alongside a strongly spectral shift.Test matrices place more variance in leading eigenvalues and have fewer effective spectral dimensions.Source: §4 · p. 8
Scope
- The claim is limited to aggregate fidelity: lower distances do not establish recovery of the full held-out variety or joint law, and CorrFlow remains detectable at AUC .9981±.00026.A linear classifier on summaries cannot isolate joint-dependence errors from marginal mismatches.Source: §4 · p. 8
5. What the Guarantees Solve and What They Do Not
The guarantees address validity and permutation symmetry, but the experiments do not isolate the contribution of each component or establish a full market-risk simulator. The paper identifies limits in the target data and open requirements for consistency across matrix sizes.
What the comparison supports
- Table 1 changes representation and learning objective together, so it cannot assign their individual causal contributions to the observed comparison.The paper cautions against interpreting CorrFlow as evidence that flow matching is universally superior to diffusion.Source: §5 · p. 8
Target and scope
- The target is a distribution of estimated 252-day correlations that mixes latent dependence, estimator noise, and heavily overlapping windows.Correlation alone omits volatility, marginal tails, and dynamics required for a full market-risk simulator.Source: §5 · p. 8
Open requirement
- Permutation equivariance does not imply projective consistency: generating k assets directly need not match a random k × k submatrix from a larger draw.The paper identifies this as a further mathematical requirement.Source: §5 · p. 8
Future extensions
- Alternative exchangeable source laws, including heavy-tailed edge noise or regime-conditioned mixtures, could change transport difficulty and were not evaluated.Multi-size training, node attributes, and separating dependence from finite-window sampling noise are identified as extensions beyond this study.Source: §5 · pp. 8–9
6. Conclusion
CorrFlow combines exact elliptope coordinates with a permutation-equivariant flow, replacing image heuristics and post-hoc repair. Its structural evaluation uses permutation-invariant summaries.
6. Conclusion
- CorrFlow combines exact elliptope coordinates and a permutation-equivariant flow, generates new scenarios, and improves aggregate structural distances over the evaluated cCorrGAN, image DDPM, and historical lookup.Coverage remains incomplete; the conclusion presents this as a geometric framework for learning correlation-matrix distributions.Source: §6 · p. 9
Appendix A. Structural Summary Statistics
- The 21 structural summaries are used to evaluate distributional performance with F-SWD, energy distance, manifold precision and recall, and classifier AUC.The summaries include distinct off-diagonal correlations and normalized eigenvalue quantities.Source: Table 2 · p. 11, Appendix A · p. 11
Appendix B. Baseline Provenance and Scope
Appendix B documents the data and provenance behind the baseline comparisons, including audits of legacy CorrGAN artifacts and numerical repair. It distinguishes those checks from the Taiwan conditional comparison.
Appendix B. Baseline Provenance and Scope
- The Taiwan return convention reproduces all 5,534,321 panel rows, but is not an independently reconciled cash-dividend total-return series and does not imply an event-level corporate-action or delisting-proceeds audit.The arithmetic audit includes 7,877 finite raw-close fallbacks and 160 nulls.Source: Appendix B · p. 12
- The primary Taiwan comparison shares dated returns, window selection, correlation estimation, and regime construction across methods; the legacy archive and released checkpoint serve only separate implementation checks.The archived checks have missing provenance, and the legacy S&P split cannot measure temporal generalization because dates and asset identities are unavailable.Source: Appendix B · p. 12
- Float64 repair with a 1,000-iteration cap converges for all 15,000 image-model draws, changing mean F-SWD from 4.373 to 4.339 for cCorrGAN and from 4.645 to 4.610 for DDPM without changing their ranking.Table 1 and the abstract use the corrected scores; no longer-budget retraining study is included.Source: Appendix B · p. 12
- The Taiwan cCorrGAN experiment uses a new PyTorch implementation with regime and continuous-score conditioning under a fixed 20-epoch budget, so it is not a reproduction of the published S&P results.The passage says poor performance against PCA warrants auditing training and model selection, not concluding that image generators cannot learn financial correlations.Source: Appendix B · p. 12
- The archived unconditional CorrGAN checkpoint produced no positive-definite matrices among 1,800 samples, with median minimum eigenvalue −1.71, supporting the need for its documented repair.Its repaired scores are not used as a competitive baseline because overlap with the cCorrGAN archive is unknown and repair did not converge for every sample within budget.Source: Appendix B · p. 12
- Native PyTorch inference matches the released TensorFlow generators on 192,000 raw entries each, but a one-seed reference reconstruction does not reproduce the archive distribution despite converged repair of all 3,000 generated matrices.The learned checkpoints have zero measured structural precision/recall and AUC 1.000; the passage explicitly says this does not establish failure of the published CorrGAN method.Source: Appendix B · pp. 12–13
Appendix C. Exploratory Component Diagnostics
Appendix C reports exploratory coordinate, architecture, and objective diagnostics rather than a fully matched factorial ablation. The tests provide limited comparisons and do not isolate fidelity gains from equivariance.
Appendix C. Exploratory Component Diagnostics
- The archived S&P split contains 18,000 matrices divided within regime, but missing dates and asset identities mean it does not measure temporal generalization.Source: Appendix C · p. 13
- The normalized-Cholesky coordinate map guarantees valid matrices, but only GFT commutes with arbitrary simultaneous row-column permutations.The MLP control uses a standard Gaussian source and does not reproduce DiffeoCFM’s full fitted class-conditional Gaussian source implementation.Source: Appendix C · p. 13
- The archived flow comparison is a single-seed coordinate and architecture diagnostic, with differences in model capacity, training budget, and Taiwan evaluation sample size.The S&P dense flows use about 8.5M parameters and 100 epochs, while CorrFlow uses 0.17M parameters and 20 epochs; Taiwan rows use 300 pilot cases rather than the final 1,500-case holdout.Source: Appendix C · p. 13, Table 3 · p. 14
- On eight S&P inputs, relabeling gives mean relative Frobenius vector-field error 2.15 × 10−7 for CorrFlow and .625 for the dense GFT flow.This tests architectural equivariance separately from learned fidelity and does not establish an isolated fidelity benefit from equivariance.Source: Appendix C · pp. 13–14
- The objective comparison holds the equivariant network, GFT coordinates, Taiwan data, conditions, and 20-epoch budget fixed, but its single-seed results do not rank flow matching against the wider diffusion family.Velocity prediction was exploratory, tried after poor noise-prediction results; all inverses converged and all draws were valid.Source: Appendix C · p. 14, Table 4 · p. 14
Appendix D. Condition-Matched DiffeoCFM Comparison
Appendix D compares CorrFlow with an adapted DiffeoCFM, cCorrGAN, and replay controls under categorical regime conditioning. CorrFlow has lower structural and portfolio distances under the stated protocol, while other metrics and checkpoint choices qualify that comparison.
Appendix D. Condition-Matched DiffeoCFM Comparison
- The adapted DiffeoCFM comparison uses its full class-wise OAS Gaussian prior and categorical regime conditioning, with implementation components checked against the pinned code.The test periods were inspected during development, and the methods use unequal, non-exhaustive budgets rather than equal compute.Source: Appendix D · p. 14
- The comparison uses the same 1,500 Taiwan test cases, 500 per regime, but methods have declared, unequal training budgets: 20 epochs for CorrFlow and 200 each for DiffeoCFM and cCorrGAN.Five training seeds pair with five generation seeds for neural models; controls use five generation seeds from one fitted dataset.Source: Appendix D · pp. 14–15, Table 5 · p. 15
- CorrFlow has lower structural and portfolio distances under this protocol, while DiffeoCFM has slightly higher recall and replay has higher recall than both.Both learned models remain distinguishable from real data, with two-sample classifier AUCs above .996; the findings do not establish universal superiority or complete distribution recovery.Source: Table 5 · p. 15, Appendix D · p. 15
- Final-weight structural SWD is .836 ± .068 for CorrFlow and .798±.022 for DiffeoCFM, reversing the selected-checkpoint ordering.The authors retain the declared validation-selection rule rather than replacing it after observing test results.Source: Appendix D · p. 15
- Ward-order GFT distance favors DiffeoCFM (.108 versus .335), whereas distance after independent random relabeling favors CorrFlow (.077 versus .086).These metrics address different questions about coordinate order; the full five-seed cCorrGAN comparison also reports structural SWD 4.039 ± .154 and portfolio SWD 818.722±824.701 after repair.Source: Appendix D · p. 15
Appendix E. External Japan Diagnostic
The Japan diagnostic evaluates neural generators on 80-stock, 252-session matrices, but overlapping windows mean it is not evidence from observation-disjoint splits. CorrFlow retains a structural-distance advantage over matched diffusion, while neither neural generator beats historical replay.
Appendix E. External Japan Diagnostic
- Japan uses 3,848 training matrices from 2018–2019, 1,936 validation matrices from 2020, and 2,888 test matrices from 2021–2022.Each matrix contains 80 stocks and 252 sessions; returns are adjusted for splits but not cash dividends.Source: Appendix E · pp. 15–16
- The Japan splits are not observation-disjoint: adjacent boundaries share 251 return sessions, and the original training and test windows share nine.The 242-session validation endpoint period is too short to purge the first 251 endpoints while retaining a validation matrix.Source: Appendix E · p. 16
- CorrFlow retains a structural-distance advantage over matched diffusion, but neither neural generator beats historical replay in the Japan diagnostic.The evaluation used 180 cases, 60 per regime, and all neural inverses converged with valid samples.Source: Appendix E · p. 16
- Table 6 reports neural distances as means with sample standard deviations over five seeds, while precision and recall are seed means.Controls use one generation seed, and different sample counts and market-specific feature scales preclude direct distance comparisons with Taiwan.Source: Table 6 · p. 16
- Bootstrap intervals for diffusion-minus-flow differences are [.148, .373] for F-SWD and [1.108, 2.829] for energy distance, but do not establish uncertainty across independent regimes.Resampling accounts for same-date asset subsets but not all serial dependence between overlapping 252-session windows.Source: Appendix E · p. 16
Appendix F. Computational Cost and Size Limits
The appendix reports a temporal spectral shift in Taiwan test matrices, computational costs, and constraints on statistical and learned scaling. Synthetic measurements reach 1,000 assets, while larger empirical dimensions require sufficient history and separate fidelity checks.
Appendix F. Computational Cost and Size Limits
- Twenty training epochs took 919 ± 49 seconds for CorrFlow, 593±92 for cCorrGAN, and 586±71 for image DDPM on the shared GB10.These are observed training-plus-validation times, not throughput benchmarks; image sampling-plus-repair times were not recorded comparably, so no end-to-end speed ranking follows.Source: Appendix F · pp. 16–17
- At 1,000 assets, batch-size-one training used 4.93 GiB peak memory and took 0.389 s per update, demonstrating computational feasibility at that scale.The synthetic benchmark's memory excludes other processes, and its two sampling stages use different synthetic inputs rather than measuring end-to-end latency.Source: Appendix F · p. 17, Table 7 · p. 17
F.1. Statistical, computational, and learned size limits
- With 252 complete demeaned observations, full rank requires n ≤251; dimensions above that need longer histories or a regularized estimator and a revised empirical target.Preserving n/T ≈80/252 would require about 1,575 sessions at n = 500 and 3,150 at n = 1,000; these are study designs, not demonstrated results.Source: §F.1 · p. 17
- In a Japan estimator stress test, median training condition numbers rise from 306 at n = 80 to 2,746 at n = 160 and 11,550 at n = 200.These positive-definite estimates do not measure learned CorrFlow fidelity or hardware capacity.Source: §F.1 · p. 17
- Using the 80-asset checkpoint directly at n = 40 gives F-SWD 2.070 and precision/recall .128/.245 in a single-seed diagnostic, despite 100% validity.Direct 40-asset draws also differ from 40-asset principal submatrices of 80-asset draws (F-SWD 1.332).Source: §F.1 · p. 18
Appendix G. Temporal Spectral Shift
- Test matrices shift toward a larger share in the five leading eigenvalues (.382 versus .338) and lower effective rank (37.9 versus 42.9 out of 80).The spectra compare all Taiwan training and test matrices with equal matrix weighting, preserving regime frequencies within each split.Source: Appendix G · p. 18, Figure 3 · p. 18