| name | gnosis-llm-self-awareness |
| title | Can LLMs Predict Their Own Failures? Self-Awareness via Internal Circuits |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2512.20578 |
| keywords | ["LLM Reliability","Self-Awareness","Uncertainty","Internal States","Interpretability"] |
| description | Enable frozen LLMs to predict their own correctness by decoding signals from internal hidden states and attention patterns, achieving reliable self-verification without external judges—adding only 5M parameters while reducing inference cost and improving calibration. |
Overview
Gnosis is a lightweight self-awareness mechanism enabling frozen LLMs to perform intrinsic self-verification by inspecting internal computation states. It addresses a critical problem: LLMs generate confident but incorrect outputs, and detecting failures typically requires expensive external judges or multiple inference passes.
Core Innovation: Rather than relying on external verification, extract correctness prediction signals directly from the LLM's internal states—the hidden representations and attention patterns that encode the model's confidence and reasoning process.
Architecture
State Extraction Layer
Capture internal states at each layer of the transformer:
Hidden States:
- Extract final token's hidden representations from each transformer layer
- Retain information about accumulated computation and reasoning
Attention Patterns:
- Track attention weights across heads and layers
- Reveal what model attends to when reasoning
- Indicate confidence through attention concentration
Multi-Layer Analysis:
- Early layers encode syntactic/surface information
- Middle layers perform semantic reasoning
- Later layers prepare for output generation
- Different layers provide complementary correctness signals
State Compression
Compress extracted states into fixed-budget descriptors:
def compress_internal_states(hidden_states, attention_patterns):
"""Compress multi-layer states to fixed-size descriptor."""
descriptors = []
for layer_idx, (hidden, attn) in enumerate(
zip(hidden_states, attention_patterns)
):
mean_activation = hidden.mean(dim=-1)
activation_variance = hidden.var(dim=-1)
attention_entropy = calculate_entropy(attn)
attention_concentration = attn.max()
activation_change = (hidden[:, -] - hidden[:, -]).norm()
layer_descriptor = {
: layer_idx,
: mean_activation,
: activation_variance,
: attention_entropy,
: attention_concentration,
: activation_change,
}
descriptors.append(layer_descriptor)
descriptors