Bayesian Network Fusion of Large Language Models for Sentiment Analysis

Rasoul Amirzadeh, Dhananjay Thiruvady, Fatemeh Shiri · 2025

Read Bayesian Network Fusion of Large Language Models for Sentiment Analysis by Rasoul Amirzadeh, Dhananjay Thiruvady, Fatemeh Shiri (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-26484.txt.

Introduction

Rasoul Amirzadeh, Dhananjay Thiruvady, and Fatemeh Shiri blend several language models to judge the mood of financial text. Sentiment analysis sorts writing into positive or negative views, which traders and analysts track closely. Single models can be unclear about their reasons, costly to tune, and uneven across topics.

Amirzadeh and his two co-authors fuse three models, FinBERT, RoBERTa, and BERTweet, inside a Bayesian network. That network treats each model's call as a node with odds attached, then weighs them together. Across three hand-labelled financial collections with different styles, the blend beat each single model by about six percent in accuracy. The authors present the gain as steady across data sets, with a clearer, more open route to each final call.

Catalog record

CREATORRasoul Amirzadeh, Dhananjay Thiruvady, Fatemeh Shiri
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE50 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2510-26484

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Bayesian Network Fusion of Large Language Models for Sentiment Analysis Rasoul Amirzadeh, Dhananjay Thiruvady, Fatemeh Shiri Abstract Large language models (LLMs) continue to advance, with an increasing number of domain-specific variants tailored for specialised tasks. However, these models often lack transparency and explainability, can be costly to fine-tune, require substantial prompt engineering, yield inconsistent results across domains, and impose significant adverse environmental impact due to their high computational demands. To address these challenges, we propose the Bayesian network LLM fusion (BNLF) framework, which integrates predictions from three LLMs, including FinBERT, RoBERTa, and BERTweet, through a probabilistic mechanism for sentiment analysis. BNLF performs late fusion by modelling the sentiment predictions from multiple LLMs as probabilistic nodes within a Bayesian network. Evaluated across three human-annotated financial corpora with distinct linguistic and contextual characteristics, BNLF demonstrates consistent gains of about six percent in accuracy over the baseline LLMs, underscoring its robustness to dataset variability and the effectiveness of probabilistic fusion for interpretable sentiment classification. † † highlights: Proposes a Bayesian Network fusion framework for integrating multiple LLMs in financial sentiment analysis. Models probabilistic dependencies among LLM predictions to enhance interpretability. BNLF improves accuracy across diverse financial sentiment datasets by up to 6%. 1 Introduction Advancements in deep learning, computational power, and large-scale corpora have enabled the development of LLMs. LLMs with billions of parameters, trained through self-supervised learning, achieve state-of-the-art performance in tasks such as text generation, summarization, and sentiment analysis ( Raiaan et al. 2024 ) . Unlike earlier methods requiring labelled data and manual feature engineering, LLMs leverage prompt-based instructions and pretrained knowledge to classify sentiment with minimal supervision, improving both accuracy and accessibility, especially in zero and few-shot settings ( Krugmann and Hartmann 2024 ) . Sentiment analysis identifies and interprets opinions in text to assess the author’s attitude toward an entity ( Ali et al. 2025 ) . It is typically performed at three levels of document level, sentence level, and aspect level, which focuses on the sentiment toward specific attributes or components mentioned in the text ( Wijayanto and Khodra 2018 ) . Recent advances in transformer-based LLMs such as BERT and GPT-3 have significantly enhanced sentiment classification by capturing richer contextual information, leading to the development of domain-adapted models fine-tuned on specific data to better reflect the vocabulary and tone of domains ( Mughal et al. 2024 ) . There are various domain-specific models, such as SciBERT ( Beltagy et al. 2019 ) for scientific literature and BioBERT ( Lee et al. 2020 ) for biomedical and healthcare-related texts. Although domain-specific LLMs have shown considerable potential, important challenges persist ( Pattnayak et al. 2025 ) . They often underperform compared to general-purpose LLMs in complex tasks, particularly those requiring reasoning or interaction with external tools such as scientific software ( Liu et al. 2025 ) . Additionally, domain-specific LLMs are prone to overfitting on the narrow vocabulary and stylistic patterns, which may hinder generalisation and reduce robustness on noisy or heterogeneous inputs ( Balaskas et al. 2025 ; Narashiman and Chandrachoodan 2024 ) . Another key challenge, particularly in financial applications, is the misalignment between informal, user-generated content and structured reference data. Social media posts, such as tweets, often include sarcasm, slang, or fragmented language, complicating interpretation compared to formal texts such as news articles or reports ( Kong et al. 2024 ) . Beyond these data and structural challenges, scalability and energy efficiency represent major bottlenecks, as modern LLMs demand extensive GPU resources and even domain-specific fine-tuning incurs substantial overhead. 1 1 1 For example, training costs for GPT-4 were reported at over $100M, while a single fine-tuning run of BLOOMZ-7B consumed 7571 kW, roughly the annual electricity use of an average U.S. household. These costs raise concerns about the practicality of deploying LLMs in inference-only or resource-constrained settings ( Gogineni et al. 2025 ; Xia et al. 2024 ) . Furthermore, prompt-based interaction with LLMs is often proposed as a lightweight alternative to fine-tuning. However, the performance of domain-specific LLMs remains highly sensitive to prompt phrasing, with minor variations leading to inconsistent outputs ( Asadi et al. 2025 ) . While fine-tuning can improve adaptation, it introduces trade-offs in as domain-specific gains often reduce generalisation and degrade performance on out-of-domain tasks ( Jeong 2024 ) .These limitations further emphasise the need for trustworthy AI principles, particularly non-maleficence through resource efficiency and explicability through interpretable models ( Thiebes et al. 2021 ) . To address these challenges, we introduce the Bayesian network LLM fusion (BNLF) framework, which uses predictions from three different LLMs, incluing FinBERT, RoBERTa, and BERTweet, to perform sentiment analysis across various curated financial corpora. BNLF leverages the complementary strengths of individual LLMs and dynamically adjusts their influences on sentiment prediction based on the probabilistic dependencies learned through a Bayesian network (BN). While fusion approaches offer a promising direction, the use of BNs for this purpose remains underexplored. BNs are particularly appropriate for this task, as they provide a principled approach for probabilistic reasoning, naturally handle uncertainty and bias, adapt to heterogeneous data sources, and offer interpretable graphical structures for analysing model behaviour ( Amirzadeh et al. 2023a ) . The main contributions of this work are as follows: 1. We propose a novel framework, called BNLF, that integrates sentiment predictions from multiple LLMs through probabilistic modelling. It is a modular and scalable framework that enhances interpretability and transparent reasoning. 2. BNLF is designed to be lightweight, leveraging medium-sized LLMs without requiring additional fine-tuning or large-scale GPU resources, making it practical for inference-only sentiment classification tasks. 3. We provide a transparent mechanism to analyse and interpret the behaviour of multiple LLMs through inference analysis and influence strength analysis. 4. We provide empirical evidence that LLMs trained on particular datasets produce different predictions across data sources, and show how BNLF captures and reveals these effects through probabilistic inference. The remainder of the paper is structured as follows: Section 2 reviews related work, and Section 3 outlines the fundamental methods used in the study. Section 4 introduces BNLF framework. Section 5 describes the experimental setup and data. Section 6 presents and discusses the results. Finally, Section 7 concludes the paper and outlines future research directions. 2 Related Work Recent studies have systematically benchmarked LLMs against traditional and domain-specific transformers to assess their effectiveness in sentiment analysis. Krugmann and Hartmann 2024 benchmark GPT-3.5, GPT-4, and Llama 2 against transfer-learning models such as SiEBERT and RoBERTa on 3 900 annotated texts, examining prompting strategies and explainability via human evaluation. Their findings show that LLMs can achieve accurate sentiment classification without fine-tuning but struggle with noisy social-media data, and exhibit systematic biases such as GPT-3.5’s positivity and Llama 2’s tendency to reject offensive content. In another study, Miah et al. 2024 compare GPT-4 and GPT-3.5 with domain-specific transformers (FinBERT, RoBERTa, DistilBERT) across five annotated corpora in finance, healthcare, and social media. The results show that GPT-4 matches fine-tuned models in finance and healthcare, but underperforms on noisy social media data. The study concludes that LLMs provide an alternative to fine-tuning, while still exhibiting biases such as overconfidence and positivity. Recent work investigates hybrid strategies that combine domain-specific models, LLMs, and traditional classifiers for sentiment analysis. Bratić et al. 2024

Read the complete text