Comparison of FFT and cosine similarity for classifying offensive language in text, suggesting LLMs encode verbal aggression signals.
Recent advances in large language models (LLMs) have demonstrated remarkable capabilities in text generation and understanding. However, how these models internally represent and distinguish offensive or abusive language remains underexplored. This study investigated whether such language can be detected using only the internal hidden states of LLMs, without relying on the model's output. We compared two approaches: (1) a frequency-based method that applied fast Fourier transform (FFT) to the hidden state to extract high-frequency features, and (2) a semantics-based method that averaged all token hidden states into a single vector and classified sentences via cosine similarity. The frequency-based method yielded low classification performance; however, the semantics-based approach exhibited clear separation between classes, suggesting that LLMs encode implicit signals of verbal aggression in their internal representations. This study highlights the intersection between signal processing and semantic representation analysis, providing new perspectives for socially sensitive language classification.
No takes yet. Share an insight, caveat, or question.
Hwang et al. (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: