In Machina N400: Pinpointing Where a Causal Language Model Detects Semantic Violations
- URL: http://arxiv.org/abs/2511.19232v1
- Date: Mon, 24 Nov 2025 15:43:56 GMT
- Title: In Machina N400: Pinpointing Where a Causal Language Model Detects Semantic Violations
- Abstract summary: We evaluate the causal language model (phi-2) using a carefully curated corpus, with sentences that concluded plausibly or implausibly.<n>To investigate how violations are encoded, we conducted a per-layer detection using a linear probe.
- Score: 0.11458853556386796
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: How and where does a transformer notice that a sentence has gone semantically off the rails? To explore this question, we evaluated the causal language model (phi-2) using a carefully curated corpus, with sentences that concluded plausibly or implausibly. Our analysis focused on the hidden states sampled at each model layer. To investigate how violations are encoded, we utilized two complementary probes. First, we conducted a per-layer detection using a linear probe. Our findings revealed that a simple linear decoder struggled to distinguish between plausible and implausible endings in the lowest third of the model's layers. However, its accuracy sharply increased in the middle blocks, reaching a peak just before the top layers. Second, we examined the effective dimensionality of the encoded violation. Initially, the violation widens the representational subspace, followed by a collapse after a mid-stack bottleneck. This might indicate an exploratory phase that transitions into rapid consolidation. Taken together, these results contemplate the idea of alignment with classical psycholinguistic findings in human reading, where semantic anomalies are detected only after syntactic resolution, occurring later in the online processing sequence.
Related papers
- Bypass Observation: A Conceptual Design of a Non-Intrusive Layer-Wise Semantic Extraction Architecture [2.8943395720203386]
We introduce Bypass Observation, a non-intrusive layer-wise readout architecture.<n>We derive a closed-form overhead approximation governed primarily by V/(12d)<n>We argue that Bypass Observation can make model iteration more observable while remaining only a partial, potentially misleading projection of hidden states.
arXiv Detail & Related papers (2026-09-12T08:35:45Z) - Divergent large language model predictions from convergent representations in ambiguous word pairs [2.4087148947930634]
We investigate how decoder-only transformers resolve lexical ambiguity through layer-by-layer analysis.<n>For both homonyms and polysemes, we find that representations become maximally distinct in middle layers, then partially reconverge in late layers.
arXiv Detail & Related papers (2026-08-03T07:26:45Z) - Deeper is Not Always Better: Mitigating the Alignment Tax via Confident Layer Decoding [92.1521161575198]
We introduce Confident Decoding, a training-free decoding strategy that dynamically selects the most reliable near-final layer.<n> Experiments across dense and Mixture-of-Experts LLMs demonstrate consistent gains on challenging reasoning benchmarks.
arXiv Detail & Related papers (2026-06-20T07:03:26Z) - When and How Long? The Readout-Mediator Angle in Temporal Reasoning [1.0195618602298682]
linear probe can decode a representation almost perfectly and yet be completely irrelevant to how the model uses it.<n> ablating a four-dimensional subspace found by Distributed Alignment Search (DAS) at the same layer collapses performance entirely.<n>We reverse-engineering the circuit reveals why: attention heads month-grained context through learned QK offsets at $pm30$ and $pm61$ days.
arXiv Detail & Related papers (2026-05-27T21:38:17Z) - Laplacian Score Sharpening for Mitigating Hallucination in Diffusion Models [4.878587790802629]
We propose a post-hoc adjustment to the score function during inference that leverages the Laplacian (or hallucination) of the score to reduce mode sharpness.<n>We show that this correction significantly reduces the rate of hallucinated samples across toy 1D/2D distributions and a high-dimensional image dataset.
arXiv Detail & Related papers (2025-11-10T14:16:31Z) - GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features [68.14842693208465]
GeneralAD is an anomaly detection framework designed to operate in semantic, near-distribution, and industrial settings.
We propose a novel self-supervised anomaly generation module that employs straightforward operations like noise addition and shuffling to patch features.
We extensively evaluated our approach on ten datasets, achieving state-of-the-art results in six and on-par performance in the remaining.
arXiv Detail & Related papers (2024-07-17T09:27:41Z) - The Remarkable Robustness of LLMs: Stages of Inference? [5.346230590800585]
We investigate the robustness of Large Language Models (LLMs) to structural interventions by deleting and swapping adjacent layers during inference.<n>Surprisingly, models retain 72-95% of their original top-1 prediction accuracy without any fine-tuning.
arXiv Detail & Related papers (2024-06-27T17:57:03Z) - Domain Adaptive Synapse Detection with Weak Point Annotations [63.97144211520869]
We present AdaSyn, a framework for domain adaptive synapse detection with weak point annotations.
In the WASPSYN challenge at I SBI 2023, our method ranks the 1st place.
arXiv Detail & Related papers (2023-08-31T05:05:53Z) - STAR Loss: Reducing Semantic Ambiguity in Facial Landmark Detection [80.04000067312428]
We propose a Self-adapTive Ambiguity Reduction (STAR) loss by exploiting the properties of semantic ambiguity.
We find that semantic ambiguity results in the anisotropic predicted distribution, which inspires us to use predicted distribution to represent semantic ambiguity.
We also propose two kinds of eigenvalue restriction methods that could avoid both distribution's abnormal change and the model's premature convergence.
arXiv Detail & Related papers (2023-06-05T10:33:25Z) - DQS3D: Densely-matched Quantization-aware Semi-supervised 3D Detection [6.096961718434965]
We study the problem of semi-supervised 3D object detection, which is of great importance considering the high annotation cost for cluttered 3D indoor scenes.
We resort to the robust and principled framework of selfteaching, which has triggered notable progress for semisupervised learning recently.
We propose the first semisupervised 3D detection algorithm that works in the singlestage manner and allows spatially dense training signals.
arXiv Detail & Related papers (2023-04-25T17:59:54Z) - Are we certain it's anomalous? [57.729669157989235]
Anomaly detection in time series is a complex task since anomalies are rare due to highly non-linear temporal correlations.
Here we propose the novel use of Hyperbolic uncertainty for Anomaly Detection (HypAD)
HypAD learns self-supervisedly to reconstruct the input signal.
arXiv Detail & Related papers (2022-11-16T21:31:39Z) - Self-Supervised Training with Autoencoders for Visual Anomaly Detection [61.62861063776813]
We focus on a specific use case in anomaly detection where the distribution of normal samples is supported by a lower-dimensional manifold.
We adapt a self-supervised learning regime that exploits discriminative information during training but focuses on the submanifold of normal examples.
We achieve a new state-of-the-art result on the MVTec AD dataset -- a challenging benchmark for visual anomaly detection in the manufacturing domain.
arXiv Detail & Related papers (2022-06-23T14:16:30Z) - Reference-based Defect Detection Network [57.89399576743665]
The first issue is the texture shift which means a trained defect detector model will be easily affected by unseen texture.
The second issue is partial visual confusion which indicates that a partial defect box is visually similar with a complete box.
We propose a Reference-based Defect Detection Network (RDDN) to tackle these two problems.
arXiv Detail & Related papers (2021-08-10T05:44:23Z) - Delving into Localization Errors for Monocular 3D Object Detection [85.77319416168362]
Estimating 3D bounding boxes from monocular images is an essential component in autonomous driving.
In this work, we quantify the impact introduced by each sub-task and find the localization error' is the vital factor in restricting monocular 3D detection.
arXiv Detail & Related papers (2021-03-30T10:38:01Z) - Anomalous entities detection using a cascade of deep learning models [2.9005223064604078]
This paper presents a new approach to detect anomalous entities in complex situations of examination halls.
The proposed method uses a cascade of deep convolutional neural network models.
Our results show that the proposed method can detect anomalous entities and warrant unusual behavior with high accuracy.
arXiv Detail & Related papers (2021-03-09T01:23:19Z) - Unsupervised phase discovery with deep anomaly detection [0.0]
We demonstrate how to explore phase diagrams with automated and unsupervised machine learning.
We employ deep neural networks to determine the entire phase diagram in a completely unsupervised and automated fashion.
Our method allows us to reveal a phase-separated region between supersolid and superfluid parts with unexpected properties.
arXiv Detail & Related papers (2020-03-22T14:20:04Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.