Skip to content
Open access

Context-Aware Probabilistic Bias Detection Using Large Language Models

Sep 2026 · Computer and Decision Making: An International Journal · 0 citations

Abstract

Social media platforms generate large volumes of text where bias, hate speech, and offensive language are often context-dependent; the same expression can carry different connotations depending on the topic being discussed. Existing bias detection methods based on sentiment analysis or surface-level lexical features fail to account for this topical variability. In this work, we propose a context-aware framework for probabilistic bias detection in social media text, built around LLM-driven topic assignment and two complementary scoring strategies. The first approach constructs topic-specific log-likelihood dictionaries ℒt, enabling fine-grained, domain-conditioned bias scoring. The second approach uses a single global log-likelihood dictionary ℒ modulated by a topic-weighted log-prior, offering a scalable and memory-efficient alternative. Both approaches use a predefined taxonomy of 60 topics assigned automatically by a locally-hosted large language model via Ollama. Evaluation on three benchmark datasets covering partisan content, hate speech, and offensive language shows consistent accuracy gains and F1 improvements on two of three datasets; the best configurations achieve F1 scores of 0.8792, 0.9562, and 0.5745 respectively. The results indicate that topic-aware probabilistic modeling can improve sensitivity to context-dependent bias while remaining computationally tractable.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.