BEDAA : B ayesian Enhanced D e BERT a for Uncertainty-Aware Authorship Attribution (2025)

Abstract: Authorship Attribution (AA) seeks to identify the author of a given text, yet existing methods often struggle with trustworthiness and interpretability, particularly across different domains, languages, and stylistic variations. These challenges arise from the absence of uncertainty quantification and the inability of current models to adapt to diverse authorship tasks. To address these limitations, we introduce BEDAA, a Bayesian-Enhanced DeBERTa framework that integrates Bayesian reasoning with transformer-based language models to enable uncertainty-aware and interpretable authorship attribution. BEDAA achieves up to 19.69% improvement in F1-score across multiple authorship attribution tasks, including binary, multiclass, and dynamic authorship detection. By incorporating confidence ranking, uncertainty decomposition, and probabilistic reasoning, BEDAA improves robustness while offering transparent decision-making processes. Furthermore, BEDAA extends beyond traditional AA by demonstrating its effectiveness in human vs. machine-generated text classification, code authorship detection, and cross-lingual attribution. These advances establish BEDAA as a generalised, interpretable, and adaptable framework for modern authorship attribution challenges.

## introduction given the increasing sophistication of natural language generation (nlg) models, their human-like text, as well as their widespread availability for everyday use, distinguishing between human-written and machine-generated text is becoming an urgent challenge. authorship attribution (aa)-the task of identifying an author from a set of candidates-has wide-reaching applications, including plagiarism detection, misinformation tracking, and forensic linguistics @xcite @xcite . the task of aa is vast and does not simply pertain to detecting the author of a text -it now includes distinguishing human vs. machine-generated text, dynamic authorship detection, multi-author analysis, cross-lingual attribution, cross-domain adaptation, and crossgenre classification @xcite . we tackle all 6 of these subtasks effectively. challenges in the application of aa models have persisted since the onset of this field @xcite , with models struggling to generalise to different texts and a significant lack of explainability posing ethical concerns. previous research has consistently emphasised these issues, with various attempts made to address them through detailed error analyses, simpler machine learning classifiers, and mathematical explanations @xcite @xcite @xcite @xcite @xcite . however, many approaches fail to effectively tackle both challenges simultaneously. methods in aa have progressed since the introduction of large language models (llm). early aa methods are primarily feature-based systems that rely on document-specific features @xcite . consequently, these methods are often tailored to specific authors, datasets, or models @xcite . recent research highlights that fine-tuning pre-trained language models can significantly outperform traditional methods regarding performance and timing @xcite . however, @xcite emphasised the limited progress achieved through transformerbased language models in aa irrespective of the high accuracies there remains a significant challenge: limited trustworthiness and a lack of interpretability. we investigate three core research questions: rq1 to what extent can bedaa generalise across multiple aa subtasks, including binary, multiclass, cross-genre, and cross-lingual attribution? rq2 can bedaa effectively distinguish authorship across different modalities and domains, including spoken vs. written text and source code authorship? rq3 how does bedaa's integration of bayesianinspired probabilistic reasoning and uncertainty quantification enhance the interpretability and trustworthiness of authorship attribution predictions? to address these questions, we introduce be-daa, a bayesian-enhanced deberta framework that integrates probabilities reasoning with transformer-based models to improve uncertainty and interoperability. bedaa: ## related work a large body of literature explores aa methods @xcite @xcite . broadly, these methods can be split into traditional approaches and those based on llms @xcite . traditional approaches report to the use of linguistic devices to create tailored feature sets specific to the individual, the data and the task at hand @xcite @xcite . despite the predictive capabilities of these models, they exhibit a significant limitation in their ability to justify or explain their decision-making processes @xcite @xcite . this opacity in reasoning is particularly problematic in critical scenarios where classification outcomes can have meaningful consequences. the absence of interpretable explanations for their predictions restricts their practical deployment, especially in contexts where transparency and accountability are essential. efforts to address this include applying general-purpose explainable techniques such as feature ranking @xcite , counterfactuals @xcite , and lime @xcite , but these approaches have yet to be fully integrated into aa workflows or tailored to domain-specific challenges. frameworks like frame semantic parsing have been explored for their interpretability, but computational trade-offs, such as runtime efficiency, present significant constraints @xcite . additionally, the advent of machine-generated texts has introduced new complexities, prompting approaches like multimodal transformers that combine stylometric and deep text features with lime-based explanations @xcite . similarly, other bayesian-based llm approaches focus on aa but reduce training requirements. these models are more streamlined by utilising bayesian methods to calculate the portability that a text entails previous writings of another author in a oneshot approach. the feasibility of this approach in a large-scale setting has not been explored @xcite . ## results and discussion compared to previous existing models, bedaa surpasses these with maximum improvements of 19.69%. bedaa consistently outperforms our baseline models: deb-ang @xcite , contra-x (ai et al., 2022), and bert-aa @xcite . we organise our results section according to the aa applications: cross-genre, crossdomain, dynamic, cross-lingual and, cross-task aa. a majority of our results are presented in ## misclassification we assess misclassification per dataset and per task to identify the most common errors in each subgroup. the adjusted calibration results reveal key insights into the model's performance across different datasets, with variations primarily influenced by dataset complexity, author overlap, and noise levels. datasets with high top-2 confidence and low entropy, such as aston domain, formai, and imdb62, exhibit strong author separability and minimal label noise, leading to highly confident and well-calibrated predictions. in contrast, datasets like blog10, urdu, and pan24 medium show lower confidence and higher entropy, reflecting increased authorial overlap, linguistic diversity, or label ambiguity, which makes attribution more challenging. pan24 medium and pan24 easy exhibit noticeable kl divergence, likely due to imbalanced author representation and the difficulty in distinguishing multi-authored texts. similarly, urdu's lower confidence scores suggest challenges associated with low-resource settings, where limited training data may impact model certainty. the reduction in overconfidence for blog10 and pan24 medium helps correct prior miscalibration, ensur-ing the model remains more trustworthy and interpretable across diverse datasets (see ## conclusion and future work in this work, we introduced bedaa, a robust and generalisable framework for authorship attribution (aa) that combines transformer-based language models with bayesian-inspired uncertainty estimation and customisable loss functions. bedaa addresses key challenges in aa-namely, generalisability, interpretability, and performance in noisy or low-resource scenarios. our model achieves state-of-the-art results across diverse aa tasks, including cross-genre, cross-lingual, cross-domain, and dynamic authorship attribution. through the integration of monte carlo dropout for uncertainty estimation and a flexible, parameterisable loss mechanism, bedaa not only delivers accurate predictions but also interpretable outputs, enhancing trustworthiness in practical applications. evaluation results show bedaa's consistent superiority over strong baselines on both clean and complex datasets. high top-2 confidence and low entropy values indicate reliable predictions, while its adaptability is demonstrated in novel applications such as code authorship and human vs. machine text classification. calibration curves further validate bedaa's ability to align predicted confidence with actual probabilities, providing deeper insights into model reliability. overall, bedaa represents a significant step forward in authorship attribution-balancing accuracy, interpretability, and adaptability. as future work, we aim to extend bedaa to detect intra-document author shifts, enabling dynamic attribution in multi-authored texts, including those generated by both humans and ai.