torot_data_2M / README.md
ivanjaenm's picture
Upload README.md with huggingface_hub
84e0469 verified
|
Raw History Blame Contribute Delete
3.23 kB
---
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
```