NeFut Logo NeFut
Admin Login

[CS.AI] Geometry-Guided Constraint Learning for LLM Safety Classification

Published at: 2026-07-23 22:00 Last updated: 2026-07-26 07:44
#algorithm #AI #Machine Learning

Safety as Polytope (SaP) learns linear half-space constraints in LLM hidden space but requires per-category tuning of the constraint count K. We show that sparse autoencoder (SAE) feature extraction resolves this: K=2 becomes optimal for 12/14 categories on Qwen3.5-9B, achieving 96-99% accuracy per category on our BeaverTails classification benchmark, largely eliminating the need for exhaustive sweeps (K=4-25 with random initialization). This convergence to two planes is consistent with the Linear Representation Hypothesis, providing suggestive evidence that safety boundaries in this setting admit a low-dimensional linear description in the SAE feature space. Building on this geometric perspective, we introduce a cone constraint whose learnable aperture adapts to each category's cluster concentration, stabilized by a three-phase training.

Blogger's Review: The proposed geometry-guided constraint learning method significantly enhances the safety classification performance of LLMs by optimizing the parameter K. This approach not only reduces complexity but also provides a new geometric perspective for understanding safety boundaries, which is of great theoretical and practical significance. Future research could further explore the application of this method in more complex scenarios.

Original Source: https://arxiv.org/abs/2607.19366

[h] Back to Home