code wiki / _hdl_build / nx_dr_densejudge.nx
nx_dr_densejudge.nx
buildroot/runtime/_hdl_build/nx_dr_densejudge.nx
about
nx_dr_densejudge.nx -- TRAINED DENSE representation for the judge (DR-13).
Three measured rejections (§10 vocabulary, §12 term weighting, §14 learned fusion) localised
the ceiling to the FEATURES themselves: sparse PPMI co-occurrence carries only ~65% pairwise
signal on insight-vs-distractor, so no amount of reweighting or fusing fixes it. The
remaining move is a DIFFERENT REPRESENTATION.
This uses the ecosystem's TRAINED dense embeddings (knowledge/index/embed_v1.bin, Q10,
nv x DIM), produced by nx_embed_train factorising the PPMI matrix (Levy & Goldberg 2014:
factorising PPMI == word2vec/SGNS). On the known-hard pair the trained dense vectors ordered
far more confidently than raw counts (607 vs 559, where sparse counts gave 86 vs 25), which
is exactly the kind of representational change the diagnosis calls for.
Vocabulary: embed_v1.bin rows are indexed by the SAME ids as semppmi_v1.bin (the trainer read
that vocab), so word resolution still goes through nx_ppmi_lib -- BOTH models are loaded.
on-disk: 24B header [magic "NXEMB1", i64 nv, i64 DIM] then nv*DIM Q10 i64 (block-padded tail
is ignored -- we read exactly nv*DIM).
Every func <=6 params (NAS nx_cc >6-arg skew, seq239). No hardware writes (Rule 26).
module: nishi-core.research.dr_densejudge
depends: nx_ppmi_lib.nx
genealogy_id: levy_goldberg_2014_sgns + colbert_late_interaction
dependencies 1 imports · 2 importers
imports: nx_ppmi_lib.nx
imported by: nx_dr_densejudge_cli.nxnx_lawsearch.nx
structs
| none |
consts
| 23 | const K_MAGIC_536870912: i64 = 536870912 |
| 24 | const K_MAGIC_4096: i64 = 4096 |
| 25 | const K_MAGIC_262144: i64 = 262144 |
functions
| 28 | func dj_load_embed(g: *i64, path: *u8) -> i64 |
| 69 | func dj_cos(g: *i64, a: i64, b: i64) -> i64 |
| 108 | func dj_build_mean(g: *i64) -> i64 |
| 130 | func dj_cos_centered(g: *i64, a: i64, b: i64) -> i64 |
| 166 | func dj_maxsim_centered(g: *i64, a: *i64, na: i64, b: *i64, nb: i64) -> i64 |
| 185 | func dj_maxsim(g: *i64, a: *i64, na: i64, b: *i64, nb: i64) -> i64 |