The HARP Reasoning Subspace - Unsupervised Detection Matching Supervised Baselines
Research Team
The domain manifold uses the Hidden Activation Reasoning Projection (HARP) of Hu et al. (2025, arXiv 2509.11536) to decompose the unembedding matrix into a token-prediction surface and an orthogonal reasoning subspace. At each transformer layer, hidden states are projected into this subspace and a per-layer Gaussian with full precision matrix is fitted on calibration corpus paragraphs.
The domain-drift score for a generated text is the Mahalanobis squared distance from the calibration mean, aggregated across selected layers. This purely unsupervised signal correlates with factual correctness. On the LongFact evaluation set (100 samples per vendor) the Pearson correlation against Natural Language Inference (NLI) factuality is 0.21, 0.22, and 0.38 for Qwen 2.5 7B Instruct, Llama 3.1 8B Instruct, and Gemma 2 9B Instruct. These match the supervised baseline (PD-LLR v3, Pearson 0.20 to 0.24). An unsupervised method built from first principles does what the supervised method does.

Three confounds were systematically ruled out. The memorisation check confirmed generalisation to held-out Constitution paragraphs not seen during calibration. The format check confirmed insensitivity to surface prompt templates. The mode-transfer check confirmed that manifold scores on encoding-mode hidden states correlate with scores on autoregressive generation-mode text.

The cross-corpus reproduction built a second manifold on 100 Wikipedia articles (wikimedia/wikipedia) and repeated the evaluation. Wikipedia per-layer Pearson reached 0.29 (Qwen), 0.22 (Llama), and 0.38 (Gemma), matching or exceeding the Constitution values. The framework generalises to a different corpus without re-engineering. Per-token resolution was tested and refuted. At every layer and every aggregation granularity the area under the receiver operating characteristic curve (AUROC) stays near 0.50 (chance). The domain manifold is a response-level signal.