icj-citation-graph / docs /methods.md
Chulinz's picture
Tighten dataset card wording
e932705 verified
|
Raw History Blame Contribute Delete
3.68 kB

Release verification method

Snapshot release-20261005T012547Z was prepared on 2026-10-05.

The production database was stopped for an offline dump and then restarted. The dump was loaded into a separate Neo4j 5.26 database. Every export was read from this fixed copy so later production updates cannot mix into the release.

snapshot-audit.json records the exact graph queries (Cypher is Neo4j's query language) and their results. Node counts use MATCH (n) and labels. Document layers and courts use stored properties and IN_CASE relationships. Resolution coverage checks only that text is non-empty. Citation totals count stored relationships and are not validated citations. Counts include cited nodes without text and do not measure how complete the source archives are.

The exporter writes vector properties to float16 NumPy matrices and drops them from the JSONL rows. It reads in key order and saves checkpoints so an interrupted export resumes against the same source ID. Packaging sorts each chunk JSONL and applies the same permutation to its vector matrix. Parquet is built from these final files.

Resolution number values mix integers and strings in the source graph. Parquet stores them as strings and JSONL keeps the originals. The values themselves are unchanged. Chunk para values are also strings in Parquet.

Validation checks each Parquet table's row count against the snapshot along with unique IDs, parent references and citation endpoints. It fails if any PCIJ or other-court document carries a citation. For the chunk, resolution-chunk and provision tables every vector must be finite and non-zero. In each of those three tables 25 evenly spaced rows are compared with the restored graph on text, metadata and float16 vectors. This is a sample and does not prove every exported value equals the database. Case-name and resolution-title vectors are checked only by how many are present. File hashes verify later copies against the validated package.

The card's counts and layer breakdowns come from the stored queries and are checked against manifest.json where it applies. docs/validation.json records the checks that ran and the observed vector norms. Restore validation shows the dump loads. It does not show the source data or citation extraction is correct.

Only the Neo4j dump and Parquet tables are published, together with metadata, documentation, the Docker runtime and a Parquet walkthrough. The JSONL and NumPy files above are intermediate artifacts kept locally. SHA256SUMS covers the published files. backend/tools/export_dataset.py writes the export and backend/tools/release assembles the package from the kit under release/. Both live in the code repository so the card, runtime and checks are versioned with the code that produced them.

The Neo4j dump was made by copying nodes and relationships into a fresh Neo4j 5.26 database without the embedding, name_embedding and title_embedding properties. Every batch was read back and compared on labels, other properties, relationship types and endpoints. Ordinary constraints and indexes were recreated and vector indexes were left out. Temporary copy IDs were removed and the final label and relationship counts compared. See dump-validation.json.

Case-name and resolution-title vectors were read from the same fixed snapshot, converted to float16 and added to their Parquet tables. Missing source vectors stay null.

The *_scanned markers and pending_* counts on the card come from the backlog query in snapshot-audit.json. They record what the weekly pipeline has processed and do not show whether a scan found every citation in a document.