File size: 3,225 Bytes
acc5244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84e0469
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
dataset_info:
  features:
  - name: n
    dtype: int32
  - name: m
    dtype: int32
  - name: dim
    dtype: int32
  - name: cost_type
    dtype:
      class_label:
        names:
          '0': sqeuclidean
          '1': euclidean
          '2': cityblock
          '3': chebyshev
          '4': minkowski
          '5': canberra
  - name: family_src
    dtype: string
  - name: family_tgt
    dtype: string
  - name: coords_src
    list:
      list: float64
  - name: coords_tgt
    list:
      list: float64
  - name: a
    list: float64
  - name: b
    list: float64
  - name: plan_rows
    list: int32
  - name: plan_cols
    list: int32
  - name: plan_vals
    list: float64
  - name: ot_cost
    dtype: float64
  - name: seed
    dtype: int64
  splits:
  - name: train
    num_bytes: 7726587624
    num_examples: 2000000
  - name: val
    num_bytes: 19319664
    num_examples: 5000
  - name: test_id
    num_bytes: 38642112
    num_examples: 10000
  - name: test_extrap
    num_bytes: 58005664
    num_examples: 5000
  - name: test_ood
    num_bytes: 7863344
    num_examples: 1728
  download_size: 6896350978
  dataset_size: 7850418408
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: val
    path: data/val-*
  - split: test_id
    path: data/test_id-*
  - split: test_extrap
    path: data/test_extrap-*
  - split: test_ood
    path: data/test_ood-*
---

# ToR-OT v2 synthetic optimal-transport corpus

Discrete Kantorovich instances with exact sparse optimal plans, generated by
`python -m torot.data.generate` from the ToR-OT code release
("Learning Optimal Transport Plans Via Autoregressive Token Regression", NeurIPS 2026).

Each record is one instance:

| field | description |
|---|---|
| `n`, `m` | number of source / target bins |
| `dim` | support dimension (1) |
| `cost_type` | one of `sqeuclidean`, `euclidean`, `cityblock`, `chebyshev`, `minkowski`, `canberra` |
| `coords_src`, `coords_tgt` | bin centres of a regular grid on [0,1], canonical order |
| `a`, `b` | marginals (float64, sum to 1); uniformly random weights for the random splits |
| `plan_rows`, `plan_cols`, `plan_vals` | COO of the optimal plan returned by POT's network simplex (`ot.emd`) |
| `ot_cost` | optimal cost with the max-normalised cost matrix |
| `family_src`, `family_tgt` | `uniform_random`, or the named density for the OOD evaluation split |
| `seed` | per-instance seed (instances are fully reproducible) |

The cost matrix is not stored; it is `torot.data.cost.cost_matrix(coords_src, coords_tgt, cost_type)`.

## Splits

| split | instances |
|---|---|
| `train` | 2000000 |
| `val` | 5000 |
| `test_id` | 10000 |
| `test_extrap` | 5000 |
| `test_ood` | 1728 |

## Generation configuration

```json
{
  "n_min": 5,
  "n_max": 100,
  "extrap_n_min": 120,
  "extrap_n_max": 200,
  "equal_sizes": true,
  "cost_types": [
    "sqeuclidean",
    "euclidean",
    "cityblock",
    "chebyshev",
    "minkowski",
    "canberra"
  ],
  "ood_sizes": [
    30,
    100
  ]
}
```

Command:

```
python -m torot.data.generate --out_dir ./otdata_v2 --train 2000000 --val 5000 --test_id 10000 --test_extrap 5000 --seed 0 --workers 12 --repo_id ivanjaenm/torot_data_2M --push
```