tensorust-studio commited on
Commit
520017c
·
verified ·
1 Parent(s): d4a6b26

v1.0.1: per-split Parquet files mapped to train/validation/test, leaderboard rule, fixture_pairs config fixed

Browse files
README.md CHANGED
@@ -19,15 +19,27 @@ configs:
19
  default: true
20
  data_files:
21
  - split: train
22
- path: data/pairs.parquet
 
 
 
 
23
  - config_name: records
24
  data_files:
25
  - split: train
26
- path: data/records.parquet
 
 
 
 
27
  - config_name: fixture_pairs
28
  data_files:
29
  - split: train
30
- path: fixture/pairs.csv
 
 
 
 
31
  ---
32
 
33
  # USORG-Bench
@@ -38,13 +50,15 @@ registration number, USAC billed-entity or service-provider number, or state bus
38
  number, and do not match when they carry different values of the same identifier.
39
 
40
  * 62,497 labelled pairs (26,149 matches, 36,348 non-matches) over 96,642 records and 71,783
41
- organizations, from 15 public sources: USAspending (FPDS contracts, recipient profiles, DoD
42
  subawards), SEC EDGAR, CMS hospital data, FCC ULS and LMS, USAC E-Rate, and the Colorado,
43
  Connecticut, New York and Oregon business registries.
44
  * Organizations only: sole proprietorships and person names are removed.
45
  * Identifier values are masked (`entity_id` is a keyed HMAC); names and business addresses are
46
  as the sources print them.
47
- * Entity-disjoint `train` / `dev` / `test` splits (31,199 / 6,123 / 25,175 pairs).
 
 
48
  * `difficulty` strata (renames and reworded names are hard matches; near-identical names of
49
  different organizations are hard non-matches) and a `label_confidence` column.
50
  * A 300-pair audit (`audit/audit_300.csv`).
@@ -52,13 +66,35 @@ number, and do not match when they carry different values of the same identifier
52
  Code, loader, metrics, baselines and the build scripts: https://github.com/Mattbusel/usorg-bench
53
  (`pip install usorg-bench` once published; until then `pip install git+https://github.com/Mattbusel/usorg-bench`).
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ## Files
56
 
57
  | path | contents |
58
  |---|---|
59
  | `data/records.{csv,parquet}` | one row per source record |
60
  | `data/pairs.{csv,parquet}` | labelled pairs with split, difficulty, confidence, categories |
61
- | `fixture/` | the 5,000-pair subset bundled with the Python package |
 
62
  | `audit/audit_300.csv` | 300 audited test pairs with verdicts |
63
  | `baselines/` | baseline scores (`pair_id,score`) and `results.json` |
64
  | `exports/name_bench/` | 300 rows in nomenklatura's `contrib/name_bench/cases.csv` format |
@@ -71,12 +107,21 @@ Datasheet: [docs/datasheet.md](https://github.com/Mattbusel/usorg-bench/blob/mai
71
 
72
  ## Quick start
73
 
 
 
 
 
 
 
 
 
74
  ```python
75
  import pandas as pd
76
- pairs = pd.read_parquet("hf://datasets/tensorust/usorg-bench/data/pairs.parquet")
77
- records = pd.read_parquet("hf://datasets/tensorust/usorg-bench/data/records.parquet").set_index("record_id")
78
- test = pairs[pairs.split == "test"]
79
- left, right = records.loc[test.left_id], records.loc[test.right_id]
 
80
  ```
81
 
82
  or with the package:
@@ -84,13 +129,12 @@ or with the package:
84
  ```python
85
  import usorg_bench
86
  data = usorg_bench.load("full") # downloads and checks this revision
87
- test = data.select("test")
88
- for pair, a, b in test.iter_named_pairs():
89
  ...
90
  ```
91
 
92
  Score each pair from 0 to 1, pick the threshold on `dev`, report F1 and average precision on
93
- `test` (`usorg-bench eval scores.csv` does this).
94
 
95
  ## Baselines (test split, threshold chosen on dev)
96
 
@@ -100,11 +144,12 @@ Score each pair from 0 to 1, pick the threshold on `dev`, report F1 and average
100
  | logicv2_full | name + address | 0.624 | 0.561 | 0.703 | 0.628 | 0.6989 |
101
  | logicv2 | name | 0.588 | 0.416 | 1.000 | 0.510 | 0.0000 |
102
  | rapidfuzz | name | 0.588 | 0.416 | 1.000 | 0.498 | 0.0000 |
 
103
 
104
  Name similarity alone does not separate the classes by design: hard non-matches are
105
  organizations with the same or nearly the same name (two towns called Springfield), and hard
106
  matches are renamed or reworded organizations. A method that reads the address fields can tell
107
- many of the same-name pairs apart.
108
 
109
  ## Audit
110
 
@@ -113,6 +158,14 @@ many of the same-name pairs apart.
113
  The release filters written after that review remove the 5 error patterns (503 pairs in all); of
114
  the 293 audited pairs left in the release, 285 agree and 8 are unclear. Details in the datasheet.
115
 
 
 
 
 
 
 
 
 
116
  ## License and citation
117
 
118
  CC BY 4.0. The underlying federal records are public domain; state registry records are public
 
19
  default: true
20
  data_files:
21
  - split: train
22
+ path: data/pairs-train.parquet
23
+ - split: validation
24
+ path: data/pairs-dev.parquet
25
+ - split: test
26
+ path: data/pairs-test.parquet
27
  - config_name: records
28
  data_files:
29
  - split: train
30
+ path: data/records-train.parquet
31
+ - split: validation
32
+ path: data/records-dev.parquet
33
+ - split: test
34
+ path: data/records-test.parquet
35
  - config_name: fixture_pairs
36
  data_files:
37
  - split: train
38
+ path: fixture/pairs-train.parquet
39
+ - split: validation
40
+ path: fixture/pairs-dev.parquet
41
+ - split: test
42
+ path: fixture/pairs-test.parquet
43
  ---
44
 
45
  # USORG-Bench
 
50
  number, and do not match when they carry different values of the same identifier.
51
 
52
  * 62,497 labelled pairs (26,149 matches, 36,348 non-matches) over 96,642 records and 71,783
53
+ distinct identifiers (one organization can hold several), from 15 public sources: USAspending (FPDS contracts, recipient profiles, DoD
54
  subawards), SEC EDGAR, CMS hospital data, FCC ULS and LMS, USAC E-Rate, and the Colorado,
55
  Connecticut, New York and Oregon business registries.
56
  * Organizations only: sole proprietorships and person names are removed.
57
  * Identifier values are masked (`entity_id` is a keyed HMAC); names and business addresses are
58
  as the sources print them.
59
+ * `train` / `dev` / `test` splits disjoint by identifier (31,199 / 6,123 / 25,175 pairs). In
60
+ `datasets.load_dataset` they are `train`, `validation` and `test`; records of a split are the
61
+ ones its pairs reference.
62
  * `difficulty` strata (renames and reworded names are hard matches; near-identical names of
63
  different organizations are hard non-matches) and a `label_confidence` column.
64
  * A 300-pair audit (`audit/audit_300.csv`).
 
66
  Code, loader, metrics, baselines and the build scripts: https://github.com/Mattbusel/usorg-bench
67
  (`pip install usorg-bench` once published; until then `pip install git+https://github.com/Mattbusel/usorg-bench`).
68
 
69
+ ## Leaderboard rule: allowed inputs
70
+
71
+ A reported result may read only `name`, `address`, `city`, `state` and `zip5` (and the ids as
72
+ opaque keys). `source`, `id_type`, `entity_id`, `name_kind` and the pair columns (`difficulty`,
73
+ `categories`, `name_sim`, `label_confidence`) follow from how the pairs were built and predict the
74
+ label without reading a name. Measured on the test split with a lookup table fit on `train` and
75
+ the threshold picked on `dev`:
76
+
77
+ | key looked up | test F1 | test AP |
78
+ |---|---|---|
79
+ | `id_type` + the two records' `source` | 0.927 | 0.908 |
80
+ | the same + state equal + names identical | 0.973 | 0.980 |
81
+ | `difficulty` + `categories` | 0.923 | 0.976 |
82
+ | state equal (an allowed field) | 0.800 | 0.680 |
83
+
84
+ The last line is a property of the sampling: the build drops same-state near-name non-matches,
85
+ so "same state" alone is worth F1 0.800. Read record-level results against that, not against the
86
+ name-only all-match F1 of 0.588. Also by construction: every pair whose names are identical after
87
+ case and punctuation folding is a non-match (2,113 pairs, all but one in different states).
88
+ Details: [docs/metrics.md](https://github.com/Mattbusel/usorg-bench/blob/main/docs/metrics.md#allowed-inputs).
89
+
90
  ## Files
91
 
92
  | path | contents |
93
  |---|---|
94
  | `data/records.{csv,parquet}` | one row per source record |
95
  | `data/pairs.{csv,parquet}` | labelled pairs with split, difficulty, confidence, categories |
96
+ | `data/pairs-{train,dev,test}.parquet`, `data/records-{train,dev,test}.parquet` | the same rows, one file per split (since `v1.0.1`) |
97
+ | `fixture/` | the 5,000-pair subset bundled with the Python package (CSV, and Parquet per split) |
98
  | `audit/audit_300.csv` | 300 audited test pairs with verdicts |
99
  | `baselines/` | baseline scores (`pair_id,score`) and `results.json` |
100
  | `exports/name_bench/` | 300 rows in nomenklatura's `contrib/name_bench/cases.csv` format |
 
107
 
108
  ## Quick start
109
 
110
+ ```python
111
+ from datasets import load_dataset
112
+ pairs = load_dataset("tensorust/usorg-bench", "pairs", revision="v1.0.1") # train / validation / test
113
+ records = load_dataset("tensorust/usorg-bench", "records", revision="v1.0.1")
114
+ ```
115
+
116
+ or with pandas:
117
+
118
  ```python
119
  import pandas as pd
120
+ base = "hf://datasets/tensorust/usorg-bench@v1.0.1/data"
121
+ test = pd.read_parquet(f"{base}/pairs-test.parquet")
122
+ records = pd.read_parquet(f"{base}/records.parquet").set_index("record_id")
123
+ allowed = ["name", "address", "city", "state", "zip5"]
124
+ left, right = records.loc[test.left_id, allowed], records.loc[test.right_id, allowed]
125
  ```
126
 
127
  or with the package:
 
129
  ```python
130
  import usorg_bench
131
  data = usorg_bench.load("full") # downloads and checks this revision
132
+ for pair_id, a, b in data.select("test").iter_feature_pairs(): # allowed fields only
 
133
  ...
134
  ```
135
 
136
  Score each pair from 0 to 1, pick the threshold on `dev`, report F1 and average precision on
137
+ `test` (`usorg-bench eval scores.csv` does this; include the dev scores in the file).
138
 
139
  ## Baselines (test split, threshold chosen on dev)
140
 
 
144
  | logicv2_full | name + address | 0.624 | 0.561 | 0.703 | 0.628 | 0.6989 |
145
  | logicv2 | name | 0.588 | 0.416 | 1.000 | 0.510 | 0.0000 |
146
  | rapidfuzz | name | 0.588 | 0.416 | 1.000 | 0.498 | 0.0000 |
147
+ | reference: state equal | state | 0.800 | 0.696 | 0.941 | 0.680 | 0.6966 |
148
 
149
  Name similarity alone does not separate the classes by design: hard non-matches are
150
  organizations with the same or nearly the same name (two towns called Springfield), and hard
151
  matches are renamed or reworded organizations. A method that reads the address fields can tell
152
+ many of the same-name pairs apart, but part of that is the same-state sampling effect above.
153
 
154
  ## Audit
155
 
 
158
  The release filters written after that review remove the 5 error patterns (503 pairs in all); of
159
  the 293 audited pairs left in the release, 285 agree and 8 are unclear. Details in the datasheet.
160
 
161
+ ## Revisions
162
+
163
+ * `v1.0` (2026-11-17): first release.
164
+ * `v1.0.1` (2026-11-17): the same rows; adds one Parquet file per split and maps them to
165
+ `train` / `validation` / `test` (in `v1.0` every pair sat in one `train` split of the viewer),
166
+ fixes the `fixture_pairs` config, and adds the leaderboard rule above. `usorg-bench` 0.1.1
167
+ loads this revision.
168
+
169
  ## License and citation
170
 
171
  CC BY 4.0. The underlying federal records are public domain; state registry records are public
data/pairs-dev.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bff12e848ce503e63c99be8d1df2d6e01e1f1c704749e7702c686b39a4520ad
3
+ size 267294
data/pairs-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f76a6005d6d1d1d7e332c390178c840e9752ad49d08f416c43829688e008e6b
3
+ size 1072851
data/pairs-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5078ddc36fa880bc2110d7ba186d17b46177e3332fdcd761a58ebaa45ae4ee2
3
+ size 1326782
data/records-dev.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c1b1912d1dba6c8359d1029a63d12e544a11864752fce59d9e795f3203e6f1d
3
+ size 664232
data/records-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a381103136fb8f2e8017f1c0945f75b2fb826e4caba25e224efb3ba7f5bf70a9
3
+ size 2638606
data/records-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b771fa9251ada74ec9d6eaf97df953b02027dc079689239862c5889b7540c07d
3
+ size 3261005
fixture/pairs-dev.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:036e6595703405a69bc83bd108e3db9cd2c4f96e463e935aeb22dedf650ce747
3
+ size 29614
fixture/pairs-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c12ca7e13d1f6e36c7463a123e87a6e7ca9991f1de1d8dd4e3493e7053c7153
3
+ size 99890
fixture/pairs-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7cad39dff83500c385ebfd9d8303890f7f019f9d32623b746efa82f6bb1557b
3
+ size 122808
fixture/records-dev.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06425c445618fef7123a6760ec8278f15724417c44b8234890d871fe24f75a0d
3
+ size 77320
fixture/records-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1a646b98cde75797dd3a59738f87349fc4556519ec74a1aaea52e9ed84d74de
3
+ size 287641
fixture/records-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5e2f70c76653ee01872af7fdcf76894c9bb8dc7baa67659697780c272f90915
3
+ size 353562