NAICS Hyperbolic Embedding System

The project serves three artifacts over the 2,125 North American Industry Classification System (NAICS) 2022 codes, each judged only on evidence for its own use (user adjudication Q3, recorded in the repository's specs/naics-representation-split.md): the hierarchy itself, text→code retrieval, and low-dimensional economic coordinates for downstream models.

The trained text model learns a shared space for NAICS codes and activity queries. One LoRA-adapted transformer reads marked text fields, masked fusion combines each code's present channels, and one linear map produces a direction and a live radius on the unit-curvature Lorentz hyperboloid. An optional HGCN stage refines the code graph.

Text Training

The reference configuration uses dimension 16, masked-mean fusion and three terms: task-query cross-entropy, code-to-code soft-target cross-entropy, and radial error against taxonomy level. Every epoch visits two streams, each once: all code anchors and all eligible training queries. A detached code cache supplies candidates; the current step's code anchors remain live.

The outcome validation panel's MRR selects the earliest best epoch. Each read is recorded in monitor_reads.jsonl, and epoch_summary.jsonl records MRR, losses, logit scales and radius health. CUDA uses bf16-mixed for the backbone; geometry and losses remain float32. CPU and MPS use 32-true, and the text Trainer uses one device.

Evaluation and Decisions

A seed sweep reads the outcome panel and both regressor regimes from each run's kept checkpoint. The arm record carries every epoch's monitor reads. Margins are fixed before candidate reads, and decisions use the three panels under Req 5. The economic artifact's decision reads its own two growth panels against the reference covariates+ancestors (Req 24). Structural metrics describe an arm through tools diagnostics; they do not select the text checkpoint or schedule its learning rate.

Guides