We introduce ArrowFlow, a machine learning architecture that operates entirely in the space of permutations. Its computational units are ranking filters, learned orderings that compare inputs via Spearman's footrule distance and update through permutation-matrix accumulation, a non-gradient rule rooted in displacement evidence. Layers compose hierarchically: each layer's output ranking becomes the next layer's input, enabling deep ordinal representation learning without any floating-point parameters in the core computation. We connect the architecture to Arrow's impossibility theorem, showing that violations of social-choice fairness axioms (context dependence, specialization, symmetry breaking) serve as inductive biases for nonlinearity, sparsity, and stability. Experiments span UCI tabular benchmarks, MNIST, gene expression cancer classification (TCGA), and preference data, all against GridSearchCV-tuned baselines. ArrowFlow beats all baselines on Iris (2.7% vs. 3.3%) and is competitive on most UCI datasets. A single parameter, polynomial degree, acts as a master switch: degree 1 yields noise robustness (8-28% less degradation), privacy preservation (+0.5pp cost), and missing-feature resilience; higher degrees trade these for improved clean accuracy. ArrowFlow is not designed to surpass gradient-based methods. It is an existence proof that competitive classification is possible in a fundamentally different computational paradigm, one that elevates ordinal structure to a first-class citizen, with natural alignment to integer-only and neuromorphic hardware.
Figures & tables
Figure 1: ArrowFlow pipeline. Real-valued input x is encoded via polynomial expansion, standardization, random projection, and argsort. K independent networks receive different projections Wk . Each network (detail, right) is a stack of sort layers computing Spearman’s footrule distance to learned filters. Predictions are combined by majority vote.
Figure 2: Ranking layer forward pass. Input πx=[C,A,E,B,D] is compared to three filters. The motion mj[p]=rank(rj,πx[p])−p measures signed displacement (red = forward, blue = backward). The footrule distance Dj=∑∣mj[p]∣ totals the displacements. Filters are ranked by proximity: r2 (distance 2) is closest. The output π′ becomes the input to the next layer.
Figure 3: Permutation-matrix accumulation. (a) Accumulator starts as identity (encoding current filter [A,B,C,D] ). (b) Training input [C,A,D,B] : each item votes for its position in the input (Def. 2 ). (c) Votes sum additively (Eq. 4 ). (d) Weighted average and argsort yield the updated filter [A,C,B,D] (Eq. 5 ), which has moved toward the training data. Convergence to the mean-position ranking is guaranteed (Proposition 9 ).
Figure 4: Multi-view ensemble. A single preprocessed input is projected through K different matrices using diverse strategies (target-aware, random, calibrated). Each produces a different permutation—a different ordinal “view.” Independent ArrowFlow networks are trained per view; predictions are combined by majority vote. Projection diversity approximates the independence condition of Theorem 10 .
Figure 5: Permutation cones. The argsort encoding partitions Rd into d! convex cones (Weyl chambers), separated by hyperplanes {xi=xj} . Shown for d=3 : six orderings of three coordinates. All points within a cone map to the same permutation. The dotted circle illustrates the stability radius from Theorem 4 : perturbations smaller than δmin(x)/2 cannot cross a boundary.
Dataset
N
Feat
Cls
ArrowFlow Config
AF Err
RF
SVM
MLP
KNN
XGB
Iris
150
4
3
[64,128] e=16 p=3
2.7 ± 0.6
3.3
3.3
3.3
3.3
3.3
Wine
178
13
3
[128] e=64 p=1
2.8 ± 0.0
0.0
2.8
2.8
0.0
2.8
Breast C.
569
30
2
[64,128] e=32 p=2
2.8 ± 0.3
4.4
1.8
4.4
2.6
4.4
Wine Q.
1599
11
3
[128] e=16 p=3
35.9 ± 1.3
25.9
30.6
30.3
29.7
24.1
Vehicle
846
18
4
[64] e=32 p=2
17.4 ± 0.6
27.1
14.1
12.4
27.1
21.8
Segment
2310
19
7
[128,256] e=32 p=2
5.2 ± 0.3
2.8
3.2
3.7
4.1
2.6
Table 1: Best ArrowFlow configuration vs. GridSearchCV-tuned baselines. Test error (%), mean ± std over 5 simulations. Bold = best overall. ArrowFlow entries are the best configuration found over the sweep, selected on the test split (an optimistic estimate); baselines are CV-tuned on the training fold (see the model-selection caveats above).
Dataset
kNN 1-view
kNN 7-view
ArrowFlow
Gain
Iris
10.0%
9.3%
2.7%
3.4 ×
Wine
45.0%
31.1%
2.8%
11.1 ×
Breast C.
17.5%
12.1%
2.8%
4.3 ×
Wine Qual.
37.0%
33.4%
35.9%
0.9 ×
Vehicle
49.5%
42.8%
17.4%
2.5 ×
Segment
20.8%
14.4%
5.2%
2.8 ×
Table 2: ArrowFlow vs. kNN on the same encoded permutations (fixed config per dataset; Digits errors differ slightly from Table 1 due to different config/seed). Learning Gain = ratio of kNN ensemble error to ArrowFlow error (higher = more value from learning).
Dataset
f =64
f =128
f =256
f =512
Iris (e=16)
6.0
6.0
7.3
—
Wine (e=32)
4.4
3.3
4.4
—
Breast C. (e=32)
4.4
3.7
3.7
—
Segment (e=32)
7.1
7.1
6.8
—
Digits (e=32)
14.4
13.8
11.7
12.9
Table 3: Effect of filter count (width) on test error (%).
Dataset
d =1 [128]
d =2 [64,128]
d =2 [128,256]
Iris
6.0
2.7
4.0
Wine
3.3
6.1
4.4
Breast C.
3.7
2.8
3.5
Segment
7.1
6.2
5.2
Digits
13.8
15.9
12.8
Table 4: Effect of network depth on test error (%).
Dataset
e =8
e =16
e =32
e =64
Iris
8.0
6.0
6.7
—
Wine
—
6.7
3.3
2.8
Breast C.
—
3.9
3.7
5.4
Digits
—
16.3
13.8
5.8
Table 5: Effect of embedding dimension on test error (%).
Dataset
v =3
v =5
v =7
v =11
Iris
6.0
6.0
6.0
5.3
Segment
9.9
—
7.1
7.0
Digits
18.7
—
13.8
9.9
Table 6: Effect of ensemble views on test error (%).
Dataset
lr=0.01
lr=0.05
lr=0.1
lr=0.2
Iris [64,128]
—
4.7
2.7
4.0
Wine [128]
—
3.3
3.3
3.3
Vehicle [128]
—
18.8
18.2
37.1
Digits [128] e=64
11.7
6.2
5.8
4.6
Table 7: Effect of learning rate on test error (%).
Dataset
llu=True
llu=False
Change
Iris
6.0%
4.0%
− 33%
Wine
3.3%
3.3%
0%
Breast C.
3.7%
3.5%
− 5%
Wine Qual.
39.2%
37.0%
− 6%
Vehicle
18.2%
18.2%
0%
Segment
7.1%
6.6%
− 7%
Table 8: Effect of freezing the output layer. Sort-only [128] config, 5 simulations.
Dataset
Sort-Only Best
Hybrid llu=F
Degradation
Iris
2.7%
11.3%
4 ×
Wine
2.8%
30.6%
11 ×
Breast C.
2.8%
14.6%
5 ×
Wine Qual.
35.9%
50.0%
1.4 ×
Vehicle
17.4%
51.2%
3 ×
Segment
5.2%
34.2%
7 ×
Table 9: Hybrid tensor → sort vs. pure sort-only. Test error (%).
Component
Iris
Wine
Breast C.
Digits
Baseline (single net)
21.3
13.3
6.8
17.8
+ Polynomial expansion
14.7
8.3
5.2
17.8
+ Multi-view ensemble (7v)
7.3
5.6
4.0
5.4
+ Diverse projection cycling
7.3
5.6
3.3
5.4
+ Per-dataset tuning
2.7
2.8
2.8
4.6
Table 10: Cumulative error reduction (%) as components are added.
Method
σ =0
σ =0.1
σ =0.25
σ =0.5
σ =1.0
σ =2.0
ArrowFlow
4.6
5.0
5.7
7.8
13.9
29.1
SVM-RBF
2.8
2.8
5.6
6.7
29.4
59.4
RF
0.0
0.0
1.7
7.2
10.6
31.1
MLP
2.8
2.8
3.3
6.1
10.6
25.6
XGBoost
2.8
2.8
6.7
12.2
18.3
36.7
KNN
0.0
0.6
1.7
5.6
10.6
25.0
Table 11: Noise robustness on Wine ( pol_deg =1). Error (%) at each noise level.
Method
σ =0
σ =0.1
σ =0.25
σ =0.5
σ =1.0
σ =2.0
ArrowFlow
4.8
4.4
5.8
10.0
25.8
54.6
SVM-RBF
1.7
1.7
1.9
3.9
17.2
87.3
RF
2.8
2.7
3.3
6.6
18.0
49.7
MLP
1.9
2.3
2.3
5.2
14.6
46.8
XGBoost
4.2
4.7
7.2
12.9
30.5
58.4
KNN
2.2
2.1
2.4
3.9
10.9
41.0
Table 12: Noise robustness on Digits ( pol_deg =1). Error (%) at each noise level.
Dataset
pol_deg
AF
SVM
RF
MLP
XGB
KNN
Avg BL
Wine
1
24.5
56.6
31.1
22.8
33.9
25.0
33.9
Digits
1
49.8
85.6
46.9
44.9
54.2
38.8
54.1
Iris
3
46.7
48.7
47.4
48.7
47.4
43.4
47.1
Breast C.
2
20.0
18.9
18.8
18.8
26.5
16.5
19.9
Vehicle
2
49.1
58.7
38.6
52.2
42.8
29.6
44.4
Segment
2
74.1
55.4
61.1
59.7
63.6
50.6
58.1
Table 13: Noise degradation analysis: absolute error increase (pp) from σ =0 to σ =2.0. Lower = more robust. pol_deg =1 datasets highlighted.
Dataset
Method
Raw
Ranked
Δ
Iris
ArrowFlow
4.4
2.2
− 2.2
RF
3.3
3.3
+0.0
SVM-RBF
3.3
3.3
+0.0
KNN
3.3
6.7
+3.3
Segment
ArrowFlow
4.8
5.3
+0.4
SVM-RBF
3.2
3.0
− 0.2
Table 14: Privacy via rank transform: error on raw vs. ranked features. Δ = degradation in pp.
Method
m =0%
m =10%
m =30%
m =50%
ArrowFlow
4.4
11.8
16.0
24.7
RF
3.3
9.3
10.0
29.3
SVM-RBF
3.3
10.7
15.3
36.0
MLP
3.3
15.3
20.7
33.3
KNN
3.3
10.7
14.0
37.3
XGBoost
3.3
15.3
14.7
34.7
Table 15: Missing features on Iris (4 features). Error (%) at each masking level.
Method
m =0%
m =10%
m =30%
m =50%
ArrowFlow
4.8
6.5
13.1
23.7
SVM-RBF
1.7
2.3
7.3
25.0
RF
2.8
4.2
12.2
34.7
MLP
1.9
3.3
6.3
13.4
KNN
2.2
2.7
5.8
16.6
XGBoost
4.2
7.8
19.4
38.9
Table 16: Missing features on Digits (64 features). Error (%) at each masking level.
Dataset
Feat
AF
RF
SVM
MLP
XGB
Avg BL
Iris
4
20.3
26.0
32.7
30.0
31.4
30.8
Wine
13
6.5
7.2
8.9
9.4
7.2
8.8
Breast C.
30
3.8
1.6
3.3
1.4
5.3
2.6
Vehicle
18
42.2
27.0
36.8
35.7
27.5
29.4
Segment
19
46.5
37.6
45.9
36.7
36.8
38.1
Digits
64
18.9
31.9
23.3
11.5
34.7
23.2
Table 17: Missing-feature degradation: absolute error increase (pp) from m =0% to m =50%.
Method
N =20
N =50
N =100
N =200
N =455
ArrowFlow
8.8
7.3
4.7
3.5
2.9
SVM-RBF
6.1
7.9
3.5
3.5
1.8
RF
7.0
8.8
8.8
8.8
4.4
MLP
9.7
7.0
2.6
7.9
4.4
XGBoost
7.9
7.0
7.9
11.4
4.4
KNN
7.9
6.1
5.3
6.1
1.8
Table 18: Sample efficiency on Breast Cancer ( Nfull =455). Error (%).
Table 20: Sushi preference classification. Error (%). ArrowFlow native = rankings fed directly as permutations; ArrowFlow projection = standard pipeline.
Method
Encoding
10 genes
15 genes
20 genes
RF
raw
1.2
0.6
0.6
SVM-RBF
raw
1.9
0.6
0.0
MLP
raw
2.5
1.2
0.0
KNN
raw
1.9
1.2
0.0
XGBoost
raw
1.2
1.2
2.5
RF
ranked
3.7
1.9
0.0
Table 21: Gene expression cancer classification. Test error (%) on TCGA PANCAN (161 test samples). “Raw” = original expression values; “Ranked” = within-sample rank transform; “AF native” = rank-transform fed directly as permutations; “AF proj” = standard ArrowFlow projection pipeline.
Transform
SVM (raw)
RF (raw)
SVM (ranked)
AF native
None
0.6
0.6
2.5
2.5
log(1+x)
82.6
45.3
2.5
2.5
∣x∣
82.6
45.3
2.5
2.5
x2 (signed)
82.6
20.5
2.5
2.5
×0.01 global
82.6
62.7
2.5
2.5
×100 global
82.6
55.9
2.5
2.5
Table 22: Batch effect Type 1: monotone per-sample transforms applied to test data. All methods trained on clean data (15 genes). Rank-based methods (ArrowFlow native, SVM-ranked) are perfectly invariant; raw-input methods catastrophically fail.
σ
SVM (raw)
RF (raw)
SVM (ranked)
RF (ranked)
AF native
0.0 (clean)
0.6
0.6
2.5
1.2
2.5
0.3 (mild)
0.0
1.2
1.2
1.2
2.9
0.5 (moderate)
16.8
9.3
0.6
1.9
2.5
0.7 (cross-pl.)
59.0
7.5
9.3
8.1
10.3
1.0 (severe)
71.4
16.8
9.3
20.5
12.7
1.5 (extreme)
82.6
51.5
43.5
34.2
60.8
Table 23: Batch effect Type 2: per-gene log-normal scaling. Error (%) on 15 genes. σ=0 is clean; σ=0.3 is routine batch variation; σ=0.7 is cross-platform; σ≥1.0 is severe/unrealistic. Rank-based methods degrade gracefully; raw-input methods fail early.
PCA
Method
N=1,000
N=5,000
N=10,000
16
Best baseline (SVM/MLP)
11.2
6.9
6.0
ArrowFlow best
15.9 ± 0.3
12.2 ± 0.2
9.8 ± 0.1
Gap
4.7pp
5.3pp
3.8pp
32
Best baseline (MLP/SVM)
10.5
5.7
4.6
ArrowFlow best
15.6 ± 0.2
11.4 ± 0.0
9.3 ± 0.1
Gap
5.1pp
5.7pp
4.7pp
Table 24: MNIST via PCA: test error (%). Best baseline and best ArrowFlow config per setting. ArrowFlow best = [1024,128] 3-layer, 7-view ensemble. Iterations scale with training size (100/200/400).
Architecture
Views
Error (%)
Params (filters)
[128] 2L
1
18.7 ± 0.4
128
[128] 2L
7
13.3 ± 0.1
7×128
[256] 2L
7
12.5 ± 0.1
7×256
[512] 2L
7
12.6 ± 0.1
7×512
[256,128] 3L
7
11.0 ± 0.1
7×384
[512,64] 3L
7
10.2 ± 0.1
7×576
Table 25: ArrowFlow architecture scaling on MNIST (PCA=64, N =10,000). Error (%) ± SE.
Property
pol_deg=1
pol_deg > 1
Clean accuracy
− (magnitude lost)
+ (3 × on low-dim)
Noise robustness
+ (8–28% less degrad.)
− (noise amplified)
Rank-only (rank transform)
+ ( < 0.5pp cost)
− (up to 7pp cost)
Missing features
+ (beats BL on Iris)
− (poly amplifies zeros)
Batch-effect invariance
+ (perfect, monotone)
− (poly breaks ranks)
Sample efficiency
∘
+ (richer features)
Table 26: The polynomial trade-off. Each cell shows whether ArrowFlow has a structural advantage ( + ), disadvantage ( − ), or is neutral ( ∘ ) relative to baselines.
Figure 6: The polynomial trade-off. At degree 1 (left), features are well-separated: large gaps yield a wide stability region, but limited capacity. At degree >1 (right), cross-terms create small gaps: higher capacity but noise amplified by Bk−1 , shrinking stability. This parameter is a master switch between robustness and accuracy.
Operation
Energy (pJ)
Used by
8-bit integer ADD
0.03
ArrowFlow
32-bit integer ADD/CMP
0.1
ArrowFlow
32-bit integer MUL
3.1
—
32-bit FP ADD
0.9
MLP
32-bit FP MUL
3.7
MLP
32-bit FP MAC
4.6
MLP
Table 27: Energy per operation at 45nm CMOS ( Horowitz, 2014 ) . ArrowFlow uses only operations in the top group; standard neural networks use operations in both groups.
Operations
Energy (pJ)
Op type
ArrowFlow sort layer
Displacement (3NV)
24,576
2,458
INT32 @ 0.1 pJ
Argsort ( Nlog2N )
896
90
INT32 @ 0.1 pJ
Total
25,472
2,547
MLP layer
Matrix multiply ( NV MACs)
8,192
37,683
FP32 @ 4.6 pJ
Table 28: Energy per layer, single data point. ArrowFlow [128] ( V=64 , N=128 ) vs. MLP ( 64→128 ). All energies at 45nm CMOS.
Component
ArrowFlow (pJ)
MLP (pJ)
Hidden, dist.+sort ( × 7)
7(49,152+2,048)(0.1)=35,840
8,192(4.6)=37,683
Output, dist.+ argmin ( × 7)
7×7,690(0.1)=5,383
1,280(4.6)=5,888
Majority vote
∼ 70
—
Total arithmetic
41,293
43,571
Ratio
≈1.05× in favor of ArrowFlow
Table 29: Full inference energy comparison on Digits. ArrowFlow: 7-view [256] , V=64 . MLP: 64→128→10 . Arithmetic energy only (45nm CMOS).
Learning permutations is fundamental to sorting, ranking, and matching, but existing differentiable methods based on entropy-regularized Sinkhorn produce a single softened solution and collapse under ambiguity. We present PermFlow, a conditional flow matching framework that operates directly on the affine subspace of matrices with unit row and column sums. A closed-form tangent-space projector preserves these constraints exactly along every trajectory, by construction rather than through iterative correction, and a nearest-target coupling routes distinct noisy initializations toward distinct valid permutations. The result is a model that captures multimodal permutation distributions rather than collapsing them to a single mode. On a range of problems, PermFlow achieves high accuracy on unambiguous inputs and recovers both valid permutations under ambiguity.
Yimeng Min, Carla P. Gomes
Department of Computer Science, Cornell University, Ithaca, NY, USA
We introduce Arrow, a foundation model for zero-shot causal discovery on observational tabular data. Arrow factorizes a directed acyclic graph into an undirected skeleton and a topological order, guaranteeing acyclicity by construction. Given a new dataset, it uses a transformer-based architecture to contextualize variables within and across observations, then predicts skeleton edge probabilities and node order scores that together define a graph. Arrow is trained in a supervised fashion on synthetic datasets with ground-truth graphs, using an end-to-end differentiable directed edge composite likelihood induced by the skeleton-order factorization. The training distribution spans diverse graph families, functional forms, noise models, and dataset shapes. Across in- and out-of-distribution synthetic, semi-synthetic, and real datasets, Arrow matches or outperforms existing causal discovery methods at substantially lower inference cost than competitive alternatives. Our results demonstrate that large-scale pretraining on diverse synthetic data can yield zero-shot causal discovery models that are fast, accurate, and reusable on new datasets.
In a controlled experiment on modular arithmetic (p=9973), varying only example ordering while holding all else constant, two fixed-ordering strategies achieve 99.5% test accuracy by epochs 487 and 659 respectively from a training set comprising 0.3% of the input space, well below established sample complexity lower bounds for this task under IID ordering. The IID baseline achieves 0.30% after 5{,}000 epochs from identical data. An adversarially structured ordering suppresses learning entirely. The generalizing model reliably constructs a Fourier representation whose fundamental frequency is the Fourier dual of the ordering structure, encoding information present in no individual training example, with the same fundamental emerging across all seeds tested regardless of initialization or training set composition. We discuss implications for training efficiency, the reinterpretation of grokking, and the safety risks of a channel that evades all content-level auditing.