Skip to content

Compare independent n-gram rows with matched hashing and complete quality evidence - #55

Merged
initial-d merged 3 commits into
mainfrom
codex/exact-ngram-identity
Nov 7, 2026
Merged

initial-d merged 3 commits into
mainfrom
codex/exact-ngram-identity

Conversation

@initial-d

@initial-d initial-d commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Hash-bucketed n-grams share row updates, so changing bucket capacity does not directly test independent learned identities. This change adds a training-only canonical n-gram registry and independent rows, with a matched hash control that has identical row parameters, effective initial vectors, training exposures and frozen Qwen backbone. Both variants use zero embeddings for unseen keys in the primary comparison; the same trained hash checkpoint is separately evaluated with ordinary open-vocabulary lookup.

The experiment is complete: 24 final models cover Qwen3-0.6B/Qwen3.5-4B, 1,024/20,877 edits and three seeds. At 20,877 edits, exact rows improve the seed/case-pooled harmonic ES/PS/NS score by 0.41/1.24 percentage points versus matched-coverage hashing and 2.29/4.05 versus native open-vocabulary hashing. All four pointwise 95% intervals are positive and locality improves. Two small-grid comparisons have intervals crossing zero and remain in the report. This is frozen-backbone MultiCounterFact editing; it does not establish pretraining, native serving/compression superiority or naturally occurring 99% cosine similarity.

The source-qualified archive includes all 24 reports, four vocabulary reports, two real-model preflights, runtime snapshots, paired test arrays, exact commands and complete bundle costs. A dependency-free verifier checks provenance, budgets and point estimates; an optional NumPy-only CPU check reproduces all eight bootstrap intervals. CI runs both. Model deltas, canonical token-key dictionaries and raw loss-level files remain outside the repository, with hashes retained.

Validation:

  • Both real-model preflights passed, including every training key's initial vectors, 16 question prefixes per model, masked replay/gradients, gradient pooling and unchanged backbone hashes.
  • All 24 training/evaluation runs completed successfully.
  • python3 -m unittest discover -s tests: 250 tests, 125 passed and 125 optional-dependency skips locally.
  • python3 -S docs/ngram_identity_evidence_20261107/verify.py: passed.
  • python docs/ngram_identity_evidence_20261107/verify.py --bootstrap: all eight intervals reproduced on local CPU.
  • Four archive-corruption, unmatched-budget and unsupported-positive-claim checks passed; git diff --check passed.

@initial-d initial-d changed the title Compare collision-free n-gram rows against matched hash buckets Compare independent n-gram rows with matched hashing and complete quality evidence Nov 7, 2026
@initial-d
initial-d marked this pull request as ready for review November 7, 2026 08:59
@initial-d
initial-d merged commit e5127ff into main Nov 7, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant