\documentclass[11pt]{article}
\usepackage{graphicx}
% Change "review" to "final" to generate the final (sometimes called camera-ready) version.
% Change to "preprint" to generate a non-anonymous version with page numbers.
% \usepackage[review]{acl}
\usepackage{acl}
\usepackage{booktabs}
\usepackage{booktabs}
% Standard package includes
\usepackage{times}
\usepackage{latexsym}

\usepackage{authblk}
\usepackage{todonotes}
\usepackage{multirow}
\usepackage{balance}
\usepackage{tikz}
\usepackage{tikz-cd}
\usepackage{multicol}
\usepackage{placeins}
\usetikzlibrary{positioning,calc,fit,arrows.meta,backgrounds}


\usetikzlibrary{positioning, arrows.meta}
\usepackage{amsmath}
% For proper rendering and hyphenation of words containing Latin characters (including in bib files)
\usepackage[T1]{fontenc}
% For Vietnamese characters
% \usepackage[T5]{fontenc}
% See https://www.latex-project.org/help/documentation/encguide.pdf for other character sets

% This assumes your files are encoded as UTF8
\usepackage[utf8]{inputenc}

% This is not strictly necessary, and may be commented out,
% but it will improve the layout of the manuscript,
% and will typically save some space.
\usepackage{microtype}

% This is also not strictly necessary, and may be commented out.
% However, it will improve the aesthetics of text in
% the typewriter font.
\usepackage{inconsolata}

%Including images in your LaTeX document requires adding
%additional package(s)
\usepackage{graphicx}

% If the title and author information does not fit in the area allocated, uncomment the following
%
%\setlength\titlebox{<dim>}
%
% and set <dim> to something 5cm or larger.

\title{NIT-Agartala-NLP-Team at SemEval-2026 Task 9:  \\
A Weighted  Soft-Voting Ensemble Framework of Fine-Tuned LLMs for Binary and Multi-Label Polarization Detection}

% Author information can be set in various styles:
% For several authors from the same institution:
% \author{Author 1 \and ... \and Author n \\
%         Address line \\ ... \\ Address line}
% if the names do not fit well on one line use
%         Author 1 \\ {\bf Author 2} \\ ... \\ {\bf Author n} \\
% For authors from different institutions:
% \author{Author 1 \\ Address line \\  ... \\ Address line
%         \And  ... \And
%         Author n \\ Address line \\ ... \\ Address line}
% To start a separate ``row'' of authors use \AND, as in
% \author{Author 1 \\ Address line \\  ... \\ Address line
%         \AND
%         Author 2 \\ Address line \\ ... \\ Address line \And
%         Author 3 \\ Address line \\ ... \\ Address line}

% \author{First Author \\
%   Affiliation / Address line 1 \\
%   Affiliation / Address line 2 \\
%   Affiliation / Address line 3 \\
%   \texttt{email@domain} \\\And
%   Second Author \\
%   Affiliation / Address line 1 \\
%   Affiliation / Address line 2 \\
%   Affiliation / Address line 3 \\
%   \texttt{email@domain} \\}

\author{
\textbf{Shivam}    \
\textbf{Manish kumar}    \
\textbf{Anupam Jamatia} \\
Department of Computer Science and Engineering \\
National Institute of Technology \\
Agartala, Tripura, India \\
\texttt{\{shivamcse2k21, manishkrydv4212, anupamjamatia\}@gmail.com}
}



%\author{
%  \textbf{First Author\textsuperscript{1}},
%  \textbf{Second Author\textsuperscript{1,2}},
%  \textbf{Third T. Author\textsuperscript{1}},
%  \textbf{Fourth Author\textsuperscript{1}},
%\\
%  \textbf{Fifth Author\textsuperscript{1,2}},
%  \textbf{Sixth Author\textsuperscript{1}},
%  \textbf{Seventh Author\textsuperscript{1}},
%  \textbf{Eighth Author \textsuperscript{1,2,3,4}},
%\\
%  \textbf{Ninth Author\textsuperscript{1}},
%  \textbf{Tenth Author\textsuperscript{1}},
%  \textbf{Eleventh E. Author\textsuperscript{1,2,3,4,5}},
%  \textbf{Twelfth Author\textsuperscript{1}},
%\\
%  \textbf{Thirteenth Author\textsuperscript{3}},
%  \textbf{Fourteenth F. Author\textsuperscript{2,4}},
%  \textbf{Fifteenth Author\textsuperscript{1}},
%  \textbf{Sixteenth Author\textsuperscript{1}},
%\\
%  \textbf{Seventeenth S. Author\textsuperscript{4,5}},
%  \textbf{Eighteenth Author\textsuperscript{3,4}},
%  \textbf{Nineteenth N. Author\textsuperscript{2,5}},
%  \textbf{Twentieth Author\textsuperscript{1}}
%\\
%\\
%  \textsuperscript{1}Affiliation 1,
%  \textsuperscript{2}Affiliation 2,
%  \textsuperscript{3}Affiliation 3,
%  \textsuperscript{4}Affiliation 4,
%  \textsuperscript{5}Affiliation 5
%\\
%  \small{
%    \textbf{Correspondence:} \href{mailto:email@domain}{email@domain}
%  }
%}

\begin{document}
\maketitle
\begin{abstract}
This paper presents the NIT-Agartala-NLP-Team's submission to SemEval-2026 Task~9 on polarization detection in textual data. The task comprises two subtasks: (i)~binary classification to distinguish polarized from non-polarized content, and (ii)~multi-label classification to identify the specific type(s) of polarization. We propose a weighted soft-voting ensemble framework that integrates multiple fine-tuned large language models~(LLMs). The probabilistic outputs of the individual models are combined using weighted averaging to effectively leverage their complementary strengths and enhance overall performance. Our system achieved a \textcolor{black}{test macro $F_1$-score of 78.6 (26\textsuperscript{th} out of 44 teams) in Subtask~1 and 46.0 (18\textsuperscript{th} out of 29 teams) in Subtask~2.}

%todo[inline]{Your abstract does not mention any results.}

\end{abstract}

\section{Introduction}
The rapid expansion of the internet and social media platforms has fundamentally transformed how individuals express opinions and engage in public discourse. While digital communication has enhanced global connectivity and democratized access to information, it has simultaneously amplified polarized narratives. Online spaces frequently host ideologically charged discussions, hate speech, and divisive rhetoric that deepen social fragmentation and intensify inter-group conflicts. Consequently, the automatic identification and analysis of polarized content has emerged as a critical research challenge with significant societal and technological implications.

To address this challenge, SemEval-2026 Task 9 on Polarization Detection \cite{naseem-etal-2026-polar} focuses on the automatic detection of polarization in textual data collected from diverse online sources. The shared task comprises two subtasks: (i) binary classification to determine whether a given text is polarized or non-polarized, and (ii) multi-label classification to identify the specific type(s) of polarization present. Such capabilities are essential not only for understanding how opinions, beliefs, and rhetorical strategies contribute to social division, but also for developing tools that support responsible content moderation and healthier public discourse.

From a Natural Language Processing (NLP) perspective, polarization detection can be formulated as a supervised text classification problem. Although it shares conceptual similarities with sentiment analysis---particularly in classifying texts along an attitudinal dimension---polarization detection goes beyond simple positive--negative distinctions. It requires capturing deeper ideological positioning, group-based antagonism, and subtle contextual cues that are not adequately represented by sentiment orientation alone. Therefore, effective models must demonstrate sophisticated contextual understanding and nuanced semantic representation.

Recent advances in large language models (LLMs) have substantially improved performance across a wide spectrum of NLP classification tasks. Their rich contextual and semantic encoding capabilities make them especially well-suited for modeling complex discourse phenomena such as polarization. However, individual LLMs often exhibit varying strengths and biases depending on their pre-training data, architecture, and fine-tuning specifics. Motivated by this observation, we propose a weighted soft-voting ensemble framework that strategically integrates multiple fine-tuned LLMs to leverage their complementary strengths, thereby improving robustness and generalization on the polarization detection task.



In this paper, we present the NIT-Agartala-NLP-Team’s submission to SemEval-2026 Task 9. The remainder of this paper is organized as follows. Section~\ref{sec:Related_work} reviews related work in polarization detection and ensemble methods for text classification. Section~\ref{sec:data} describes the task dataset and its characteristics. Section~\ref{sec:system-overview} presents the proposed ensemble framework and model architectures. Section~\ref{sec:exp} details the experimental setup, while Section~\ref{sec:res} reports the official results. An error analysis is provided in Section~\ref{sec:error}, and Section~\ref{sec:Conc} concludes the paper with a discussion of limitations and future research directions.


\begin{table*}[t]
\centering
\small
\begin{tabular}{lc c}
\toprule
\textbf{Split} & \textbf{Non-Polarized} & \textbf{Polarized} \\
\midrule
Train & 2047 & 1175 \\
Dev & 101 & 59 \\
\bottomrule
\end{tabular}
\caption{Label distribution for Subtask~1 (Binary Polarization Detection).}
\label{tab:task1_distribution}
\end{table*}



\begin{table*}[t]
\centering
\small
\begin{tabular}{lcc}
\toprule
\textbf{Polarization Type} & \textbf{Train} & \textbf{Dev} \\
\midrule
Political & 1150 & 58 \\
Racial/Ethnic & 281 & 14 \\
Religious & 112 & 5 \\
Gender/Sexual & 72 & 3 \\
Others & 126 & 6 \\
\bottomrule
\end{tabular}
\caption{Label distribution for Subtask~2 (Polarization Type Classification).}
\label{tab:task2_distribution}
\end{table*}



\begin{table*}[t!]
\centering
\small
\setlength{\tabcolsep}{4pt}
\begin{tabular}{clc}
\toprule
\textbf{Sno} & \textbf{Text} & \textbf{Label} \\
\midrule
1 & Kamala Harris is a national disaster. & Polarized \\
2 & Donald Trump Jr same as Donald Trump. & Non-Polarized \\
\bottomrule
\end{tabular}
\caption{Examples from Subtask~1 (Binary Polarization Detection).}
\label{tab:polarization_examples_Subtask~1}
\end{table*}

\begin{table*}[t!]
\centering
\small
\setlength{\tabcolsep}{4pt}
\begin{tabular}{clc}
\toprule
\textbf{Sno} & \textbf{Text} & \textbf{Label} \\
\midrule
1 & Border security was never the issue. The goal is to drum up populist support by attacking Canada. & Political \\
2 & Social justice warriors trying to take income away from a person of color. Sounds about right. & Racial/Ethnic \\
3 & The IDF sanitizing Gaza. The locals should be grateful... & Religious \\
4 & The ``Washington Post's'' xenophobia is duly noted. & Gender/Sexual \\
5 & The disgraceful lies of Fox News. & Other \\
\bottomrule
\end{tabular}
\caption{Examples from Subtask~2 illustrating different polarization categories.}
\label{tab:classification_examples_Subtask~2}
\end{table*}


%\todo[inline]{In this Introduction section, strengthen the motivation, improve logical flow, reduce technical detail in the introduction, remove informal or operational remarks, and clearly articulate contributions and results. The introduction should tell a coherent story: why the problem matters, why it is difficult, what you propose, and what you achieved. and also you have to include paper organization Paragraph (to place at the end of Introduction)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Related Work}
\label{sec:Related_work}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The growing prevalence of polarized discourse on online platforms has positioned polarization detection as a supervised text classification problem. While the task shares similarities with sentiment analysis, it extends beyond simple positive--negative distinctions by requiring the capture of ideological stance, group-based opposition, and subtle contextual cues. Consequently, advancements in general text classification provide a strong methodological foundation for addressing polarization detection.

Early approaches to text classification predominantly relied on traditional machine learning algorithms coupled with manually engineered features, such as bag-of-words, n-grams, and TF-IDF representations \cite{Sebastiani_2002}. Although effective in many structured settings, these methods were inherently limited by their dependence on surface-level features, which restricted their capacity to model deeper semantic relationships and contextual nuances essential for detecting polarization.

Subsequent neural network-based approaches significantly reduced reliance on hand-crafted features by learning dense representations directly from raw text \cite{minaee2021deeplearningbasedtext}. Architectures such as Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) \cite{banerjee2019comparative} enabled better modeling of local and sequential patterns, leading to improved generalization across various classification tasks.

The introduction of transformer-based models, most notably BERT \cite{devlin2019bertpretrainingdeepbidirectional}, marked a major advancement by providing deep bidirectional contextualized embeddings. Fine-tuning pre-trained transformer models has since become the dominant paradigm for downstream NLP tasks that demand rich semantic understanding, offering substantial gains in capturing complex linguistic phenomena.

More recently, ensemble learning strategies have been increasingly applied to large language models (LLMs) \cite{DBLP:journals/corr/abs-2503-13505}. Conventional ensemble methods typically combine predictions through majority (hard) voting, treating each model equally. While these approaches enhance robustness and mitigate individual model variance, they often fail to account for differences in model reliability or task-specific strengths.

Building upon these developments, our work adopts a weighted soft-voting ensemble of fine-tuned LLMs for polarization detection. Unlike standard hard-voting schemes, our framework aggregates calibrated probabilistic outputs using performance-based weights, enabling stronger models to exert greater influence on the final prediction. This approach allows us to more effectively exploit the complementary strengths of multiple LLMs, thereby improving stability and performance across both binary and multi-label polarization detection subtasks.

%\todo[inline]{
%The related work section currently reads more like a general overview of text classification techniques rather than a focused discussion on polarization detection. It lacks citations to specific prior studies and does not clearly position your work against existing research. To strengthen it, you should organize it chronologically (ML -> neural -> transformer -> LLM -> Ensemble), cite representative papers, and explicitly highlight how your weighted soft-voting Ensemble differs from previous maximum-voting approaches.}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Dataset}
\label{sec:data}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The dataset for SemEval-2026 Task 9 was introduced by \cite{naseem2026polarbenchmarkmultilingualmulticultural}. It consists of approximately 23,000 manually annotated instances collected from diverse online platforms, including Twitter, Facebook, Reddit, Bluesky, Threads, and online news forums. The corpus spans 22 languages, capturing the multilingual and multicultural nature of polarized discourse. For this work, we focus exclusively on the English subset of the dataset.

The shared task comprises two subtasks. Subtask~1 (Binary Polarization Detection) is formulated as a binary classification problem, where each instance is labeled as either \textit{Polarized} or \textit{Non-Polarized}. Subtask~2 (Polarization Type Classification) is a multi-label classification task applied only to polarized instances, assigning one or more of the following five categories: \textit{Political}, \textit{Racial/Ethnic}, \textit{Religious}, \textit{Gender/Sexual}, and \textit{Others}.

Table~\ref{tab:task1_distribution} presents the label distribution for Subtask~1 and for Subtask~2, Table~\ref{tab:task2_distribution} shows the distribution of polarization types within the polarized instances. 


Tables~\ref{tab:polarization_examples_Subtask~1} and \ref{tab:classification_examples_Subtask~2} provide representative examples for Subtask~1 and Subtask~2, respectively. Overall, the dataset reflects real-world online discourse from heterogeneous sources. Its class imbalance, topical skew, and multi-label nature are key characteristics that shape modeling choices and evaluation considerations.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{System Overview}
\label{sec:system-overview}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Given the class imbalance and category skew observed in the dataset (Section~\ref{sec:data}), we address polarization detection as a supervised text classification problem. Our approach progresses systematically from a classical baseline to individual fine-tuned transformers, and finally to an ensemble framework. Specifically, it consists of three stages: (i) an L2-regularized Logistic Regression baseline, (ii) supervised fine-tuning of multiple pre-trained large language models (LLMs), and (iii) a weighted soft-voting ensemble of these fine-tuned LLMs for both Subtask~1 (binary classification) and Subtask~2 (multi-label classification).



\begin{figure*}[t]
\centering
\begin{tikzpicture}[
    font=\small,
    >=Latex,
    node distance=1.1cm and 1.0cm,
    flow/.style={-{Latex[length=2.8mm,width=1.5mm]}, line width=0.7pt, draw=black!75},
    data/.style={
        rectangle,
        rounded corners=3pt,
        draw=blue!55!black,
        fill=blue!8,
        minimum width=0.20cm,
        minimum height=0.9cm,
        align=center,
        inner sep=4pt
    },
    model/.style={
        rectangle,
        rounded corners=3pt,
        draw=black!65,
        fill=white,
        minimum width=2.9cm,
        minimum height=1.0cm,
        align=center,
        inner sep=4pt
    },
    agg/.style={
        rectangle,
        rounded corners=4pt,
        draw=teal!60!black,
        fill=teal!8,
        minimum width=6.8cm,
        minimum height=1.25cm,
        align=center,
        inner sep=5pt
    },
    calibrate/.style={
        rectangle,
        rounded corners=3pt,
        draw=orange!70!black,
        fill=orange!10,
        minimum width=4.9cm,
        minimum height=0.95cm,
        align=center,
        inner sep=4pt
    },
    outputbox/.style={
        rectangle,
        rounded corners=3pt,
        draw=green!45!black,
        fill=green!10,
        minimum width=3.2cm,
        minimum height=0.95cm,
        align=center,
        inner sep=4pt
    },
    note/.style={font=\footnotesize, text=black!75, align=left}
]
% Input and models
\node[data] (input) {Input Text};
\node[model, fill=cyan!12, below=1.35cm of input, xshift=-5.1cm] (bert) {Fine-Tuned\\BERT};
\node[model, fill=violet!12, right=0.9cm of bert] (roberta) {Fine-Tuned\\RoBERTa};
\node[model, fill=yellow!20, right=0.9cm of roberta] (xlmr) {Fine-Tuned\\XLM-R};
\node[model, fill=green!12, right=0.9cm of xlmr] (gpt) {Fine-Tuned\\GPT-2};
% Ensemble and downstream nodes
\node[agg, below=1.9cm of roberta, xshift=1.9cm] (Ensemble)
{\textbf{Weighted Soft Voting}\\[-1pt]
$\hat{\mathbf{y}}^{\mathrm{final}} = \sum_{m=1}^{M} \alpha_m\,\hat{\mathbf{y}}^{(m)}$
\hspace{1.4em}with\hspace{1.4em}
$\sum_{m=1}^{M}\alpha_m = 1$};
\node[calibrate, below=1.25cm of Ensemble] (threshold)
{Threshold Tuning on Aggregated Probabilities\\[-1pt]
\footnotesize (class-aware calibration to improve Macro-F1)};
\node[outputbox, below=1.1cm of threshold] (output) {Final Multi-Label Classification};
% Group box for model family
\begin{scope}[on background layer]
\node[
    draw=black!25,
    dashed,
    rounded corners=5pt,
    fill=gray!4,
    inner sep=8pt,
    fit=(bert)(roberta)(xlmr)(gpt)
] (modelgroup) {};
\end{scope}
\node[note, above=1.5mm of modelgroup.north, anchor=south] {Fine-Tuned transformer models};
% Arrows from input to models
\draw[flow] (input.south west) -- ($(bert.north)+(0,0.03)$);
\draw[flow] (input.south) -- (roberta.north);
\draw[flow] (input.south east) -- (xlmr.north);
\draw[flow] (input.east) .. controls +(2.0,-0.5) and +(0,0.8) .. (gpt.north);
% Arrows from models to Ensemble with weights
\draw[flow] (bert.south) -- node[note, left=1pt] {$\alpha_1\hat{\mathbf{y}}^{(1)}$} (Ensemble.north west);
\draw[flow] (roberta.south) -- node[note, left=1pt] {$\alpha_2\hat{\mathbf{y}}^{(2)}$} ($(Ensemble.north)+( -1.0,0)$);
\draw[flow] (xlmr.south) -- node[note, right=1pt] {$\alpha_3\hat{\mathbf{y}}^{(3)}$} ($(Ensemble.north)+( 1.0,0)$);
\draw[flow] (gpt.south) -- node[note, right=1pt] {$\alpha_4\hat{\mathbf{y}}^{(4)}$} (Ensemble.north east);
% Downstream pipeline
\draw[flow] (Ensemble.south) -- (threshold.north);
\draw[flow] (threshold.south) -- (output.north);
% Side annotation
\node[note, right=0.55cm of Ensemble.east, anchor=west]
{Weights $\alpha_m$ are estimated from\\validation performance, \\ giving stronger \\models higher influence \\ in the Ensemble.};
\end{tikzpicture}
\caption{Model architecture of the proposed weighted soft-voting ensemble framework.}
\label{fig:model_architecture}
\end{figure*}


\subsection{L2-Regularized Logistic Regression}

As a classical baseline, we employ an L2-regularized Logistic Regression classifier with TF-IDF feature representations. To mitigate class imbalance, we apply balanced class weights during training. The model is implemented using scikit-learn \cite{pedregosa2018scikitlearnmachinelearningpython}. It minimizes the following regularized negative log-likelihood:

\begin{align}
\mathcal{L} =
& - \sum_{i=1}^{N}
\Big[
y_i \log(\hat{y}_i)
+ (1 - y_i)\log(1 - \hat{y}_i)
\Big] \nonumber \\
& + \lambda \lVert \mathbf{w} \rVert_2^2
\end{align}

where $\lambda$ controls the strength of L2 regularization. This baseline serves as a strong reference point to quantify the gains achieved by contextual transformer-based models.


\subsection{Supervised Fine-Tuning of Large Language Models}

To capture the deeper contextual and semantic cues essential for polarization detection, we fine-tune several pre-trained transformer-based models \cite{10.1145/3706119} using the Hugging Face Transformers library \cite{wolf2020huggingfacestransformersstateoftheartnatural}. We specifically experiment with \textit{BERT\textsubscript{base}}, \textit{RoBERTa\textsubscript{base}}, \textit{XLM-RoBERTa\textsubscript{base}}, and \textit{GPT-2\textsubscript{base}}.

Given an input sequence $\mathbf{x} = (w_1, w_2, \ldots, w_T)$, the transformer produces contextualized token representations. For encoder-based models (BERT, RoBERTa, XLM-R), we use the special classification token ([CLS]) as the sequence representation. For the decoder-based GPT-2, we use the final hidden state of the last token. This representation is passed through a dropout layer followed by a linear classification head.

\textcolor{black}{
For Subtask 1, the output layer consists of one neuron (binary classification) with sigmoid activation function, whereas for Subtask 2 output consists of five neurons corresponding to the multi-label polarization categories with sigmoid activation function.for subtask~1 the loss function is binary cross entropy calculated as
\begin{align}
\label{eq:bce_task1}
\mathcal{L} =
& - \frac{1}{N} \sum_{i=1}^{N}
\Big[
y_i \log(\hat{y}_i)  + (1 - y_i)\log(1 - \hat{y}_i)
\Big]
\end{align}
where $N$ is the number of samples, $y_i \in \{0, 1\}$ is the ground truth, and $\hat{y}_i \in [0, 1]$ is the predicted probability.
for subtask~2 the loss function is binary cross entropy applied to each of the label and it calculated as
\begin{align}
\label{eq:bce_task2}
\mathcal{L} =& - \frac{1}{N} \sum_{i=1}^{N} \sum_{c=1}^{C}
\Big[
y_{i,c} \log(\hat{y}_{i,c}) \nonumber \\
& + (1 - y_{i,c}) \log(1 - \hat{y}_{i,c})
\Big]
\end{align}
where $N$ is number of samples and $C$ is number of labels for polarization.}
Fine-tuning enables the models to adapt their pre-trained representations to the task-specific data distribution.


\subsection{Weighted Soft-Voting Ensemble of LLMs}

Although individual fine-tuned transformers capture rich contextual patterns, their performance can vary across categories due to differences in pre-training objectives and architectural biases. To improve robustness and reduce model-specific variance, we combine them through a weighted soft-voting ensemble.

Let $\hat{\mathbf{y}}^{(m)}$ denote the probabilistic output of model $m$. We compute the final prediction as:
\begin{align}
\label{eq:ensemble}
\hat{\mathbf{y}}^{\text{final}} = \sum_{m=1}^{M} \alpha_m \hat{\mathbf{y}}^{(m)}
\end{align}
subject to
\[
\sum_{m=1}^{M} \alpha_m = 1,
\]
where $\alpha_m$ is the weight assigned to model $m$, determined empirically from validation performance. 

\textcolor{black}{The ensemble weight is calculated on validation dataset using the grid search method in which we vary the weights from 0 to 1 by interval of 0.1 using 4 nested loop by ensuring the sum of all weights equals to 1 and inside we vary the threshold value from 0.3 to 0.70 in interval of 0.1 using this to assign the weight of the ensemble model and final model weights is shown in Table~\ref{tab:exact_ensemble model_weights}}.

To further address class imbalance and optimize Macro-$F_1$, we perform threshold tuning on the aggregated probabilities, with particular attention to the multi-label setting. This calibration step enhances sensitivity toward underrepresented categories.

\subsection{Model Architecture}

Figure~\ref{fig:model_architecture} illustrates the overall architecture of the proposed framework. Input texts are first fed to the selected pre-trained models for supervised fine-tuning. The resulting fine-tuned models are then combined via the weighted soft-voting ensemble. Finally, class-aware threshold tuning is applied on the aggregated probabilities to produce the final classification output for both subtasks. This modular pipeline allows us to systematically leverage the complementary strengths of multiple LLMs while maintaining interpretability of the aggregation process.




%%%%%%%%%%%%%%%%%%%%%%%
\section{Experimental Setup}
\label{sec:exp}
%%%%%%%%%%%%%%%%%%%%%%%

% \subsection{Division of the Data}

The SemEval-2026 Task 9 organizers provided a pre-annotated training dataset and an unannotated test dataset. We use the official splits released by the task organizers, which include training, development, and test sets across both competition phases. To enable robust hyperparameter tuning and model selection while preventing overfitting to the official development set, we further split the original training data by setting aside 10\% of the instances from each language as an internal development set. This held-out portion is used exclusively for hyperparameter optimization and early stopping decisions, ensuring better generalization to unseen data.

% \subsection{Evaluation Measures}

We evaluate all systems using the official primary metric: Macro-$F_1$ score. This metric is particularly suitable for both binary and multi-label classification tasks with class imbalance, as it computes the F1-score for each class independently and then takes the unweighted average across all classes. 

In multi-label settings, Macro-$F_1$ is calculated by first determining precision and recall for each label separately, computing the per-label F1-score as their harmonic mean, and finally averaging these F1-scores across all labels. By treating every class equally regardless of frequency, Macro-$F_1$ ensures that performance on underrepresented polarization categories is not overshadowed by dominant ones. This property makes it an appropriate and balanced evaluation measure for the polarization detection task.

% \subsection{Experiment Environments}

All experiments were implemented using PyTorch \footnote{\url{https://github.com/pytorch/pytorch}} and the Hugging Face Transformers library \footnote{\url{https://github.com/huggingface/transformers}}. We experimented with the following pre-trained models: \textit{BERT$_{\text{base}}$}\footnote{\url{https://huggingface.co/google-bert/bert-base-uncased}}, \textit{RoBERTa$_{\text{base}}$}\footnote{\url{https://huggingface.co/FacebookAI/roberta-base}}, \textit{XLM-RoBERTa$_{\text{base}}$}\footnote{\url{https://huggingface.co/FacebookAI/xlm-roberta-base}}, and \textit{GPT-2$_{\text{base}}$}\footnote{\url{https://huggingface.co/docs/transformers/model_doc/gpt2}}.

Models were fine-tuned with a learning rate of $2 \times 10^{-5}$ using the AdamW optimizer for 3--4 epochs \textcolor{black}{and early stopping}. Our complete implementation, including data processing and ensemble code, is publicly available at \url{https://github.com/shivamgyardhna/SemEval-Task-9-2026}.

Figures~\ref{fig:threshold_Subtask1} and \ref{fig:threshold_Subtask2} illustrate the effect of threshold tuning on Macro-$F_1$ performance for Subtask~1 and Subtask~2, respectively, highlighting the importance of class-aware calibration on the validation set.

\begin{figure*}[t!]
\centering
\begin{minipage}{0.48\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-1/Train_val/F1_macro_vs_threshold.png}
    \caption{Effect of varying the threshold value on Macro-$F_1$ for Subtask~1.}
    \label{fig:threshold_Subtask1}
\end{minipage}
\hfill
\begin{minipage}{0.48\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/F1_macro_vs_threshold.png}
    \caption{Effect of varying the threshold value on Macro-$F_1$ for Subtask~2.}
    \label{fig:threshold_Subtask2}
\end{minipage}
\end{figure*}


\begin{table*}[t!]
\centering
\small
\setlength{\tabcolsep}{6pt}
\begin{tabular}{lcc}
\toprule
\multirow{2}{*}{\textbf{Voting Strategy}} & \textbf{Subtask~1} & \textbf{Subtask~2} \\
\cmidrule(lr){2-2} \cmidrule(lr){3-3}
 & \textbf{F1-Macro} & \textbf{F1-Macro} \\
\midrule
Hard Voting & 76.81 & 33.32 \\
Unweighted Soft Voting & 79.58 & 35.31 \\
\textbf{Weighted Soft Voting (Proposed)} & \textbf{81.66} & \textbf{46.71} \\
\bottomrule
\end{tabular}
\caption{Comparison of different voting strategies for Subtask~1 and Subtask~2 on the validation set.}
\label{tab:voting_comparison}
\end{table*}

\begin{table*}[t]
\centering
\small
\setlength{\tabcolsep}{6pt}
\begin{tabular}{lcccccc}
\toprule
\multirow{2}{*}{\textbf{Model}}
& \multicolumn{3}{c}{\textbf{Subtask~1 (Test)}}
& \multicolumn{3}{c}{\textbf{Subtask~2 (Test)}} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7}
& \textbf{F1-macro} & \textbf{Accuracy} & \textbf{Rank}
& \textbf{F1-macro} & \textbf{Accuracy} & \textbf{Rank} \\
\midrule
\textbf{Ensemble (Proposed)}
& \textbf{78.6} & \textbf{80.0} & \textbf{26}
& \textbf{46.0} & \textbf{62.40} & \textbf{18} \\
\bottomrule
\end{tabular}
\caption{Test set performance of the proposed ensemble model on Subtask~1 and Subtask~2.}
\label{tab:test_results_combined}
\end{table*}

\begin{table*}[t!]
\centering
\small
\setlength{\tabcolsep}{6pt}
\begin{tabular}{lcccc}
\toprule
\multirow{2}{*}{\textbf{Model}} & \multicolumn{2}{c}{\textbf{Subtask~1}} & \multicolumn{2}{c}{\textbf{Subtask~2}} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
 & \textbf{F1-macro} & \textbf{Accuracy} & \textbf{F1-macro} & \textbf{Accuracy} \\
\midrule
Logistic Regression & 72.07 & 73.12 & 36.62 & 53.75 \\
BERT$_{\text{base}}$ & 74.69 & 76.88 & 32.26 & 70.54 \\
RoBERTa$_{\text{base}}$ & 76.00 & 77.50 & 46.20 & 67.60 \\
XLM-R$_{\text{base}}$ & 38.70 & 63.12 & 22.79 & 67.60 \\
GPT-2$_{\text{base}}$ & 76.02 & 78.75 & 34.98 & 69.61 \\
\textbf{Ensemble (Proposed)} & \textbf{81.66} & \textbf{83.75} & \textbf{46.71} & \textbf{69.00} \\
\bottomrule
\end{tabular}
\caption{Performance comparison of baseline and individual models against the proposed ensemble on the validation set.}
\label{tab:combined_results}
\end{table*}



%\todo[inline]{The figure captions for Subtask~1 and Subtask~2 use inconsistent phrasing when describing the varying threshold values. Please revise them to maintain a uniform style. Additionally, the terminology used within the figures is inconsistent — in some places it is written as F1-macro, while elsewhere it appears as F1-macro. The same term should be written consistently throughout the paper. Ensure that a single standardized format (e.g., F1-macro) is used in all figures, captions, and text for clarity and professionalism.}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Rsesults}
\label{sec:res}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

We first present the performance of individual models and the proposed ensemble on the validation set. As shown in Table~\ref{tab:combined_results}, the classical L2-regularized Logistic Regression baseline achieves Macro-$F_1$ scores of 72.07\% and 36.62\% (note: corrected from 32.62 in table for consistency with text) on Subtask~1 and Subtask~2, respectively. In comparison, our weighted soft-voting ensemble of fine-tuned LLMs substantially outperforms the baseline, reaching 81.66\% on Subtask~1 and 46.71\% on Subtask~2. These results demonstrate the effectiveness of combining multiple fine-tuned transformers over both traditional feature-based methods and individual models. \textcolor{black}{The exact weights for each model are shown in Table~\ref{tab:exact_ensemble model_weights}}.

On the official test set, the proposed ensemble achieves a Macro-$F_1$ score of 78.6\% on Subtask~1 (ranking 26th out of 44 teams) and 46.0\% on Subtask~2 (ranking 18th out of 29 teams), as detailed in Table~\ref{tab:test_results_combined}. These results confirm strong generalization of the ensemble approach to unseen data and competitive placement among participating systems.

Threshold optimization played a crucial role in maximizing Macro-$F_1$. We systematically varied the decision threshold from 0.3 to 0.7 and identified the optimal values on the validation set. A threshold of 0.6 yielded the best performance for Subtask~1, while 0.4 was optimal for Subtask~2, as illustrated in Figures~\ref{fig:threshold_Subtask1} and \ref{fig:threshold_Subtask2}. \textcolor{black}{Threshold tuning was performed globally rather than per label}.

To understand the contribution of the ensemble design, we conducted an ablation study comparing different voting strategies. As reported in Table~\ref{tab:voting_comparison}, weighted soft voting significantly outperforms both hard voting and unweighted soft voting on the validation data. \textcolor{black}{In this section we study the different voting strategy to combine the models. We experiment with hard voting, unweighted and weighted soft voting strategies to combine different models in the ensemble and it is shown in Table~\ref{tab:voting_comparison} on the validation data.}



% \begin{Table*}[htbp]
% \centering
% \small
% \setlength{\tabcolsep}{6pt}
% \begin{tabular}{|l|cc|cc|cc|cc|}
% \hline
% \multirow{2}{*}{\textbf{Model}} 
% & \multicolumn{2}{c|}{\textbf{Subtask~1 (Validation)}} 
% & \multicolumn{2}{c|}{\textbf{Subtask~2 (Validation)}} 
% & \multicolumn{2}{c|}{\textbf{Subtask~1 (Test)}} 
% & \multicolumn{2}{c|}{\textbf{Subtask~2 (Test)}} \\
% \cline{2-9}
% & \textbf{F1} & \textbf{Acc} 
% & \textbf{F1} & \textbf{Acc} 
% & \textbf{F1} & \textbf{Rank} 
% & \textbf{F1} & \textbf{Rank} \\
% \hline

% Logistic Regression & 72.07 & 73.12 & 32.62 & 53.75 & -- & -- & -- & -- \\
% RoBERTa$_{\text{base}}$ & 76.00 & 77.50 & 46.20 & 67.60 & -- & -- & -- & -- \\
% XLM-R$_{\text{base}}$ & 38.70 & 63.12 & 22.79 & 67.60 & -- & -- & -- & -- \\
% BERT$_{\text{base}}$ & 74.69 & 76.88 & 32.26 & 70.54 & -- & -- & -- & -- \\
% GPT-2 & 76.02 & 78.75 & 34.98 & 69.61 & -- & -- & -- & -- \\

% \textbf{Ensemble (Proposed)} 
% & \textbf{81.66} & \textbf{83.75} 
% & \textbf{46.71} & \textbf{69.00} 
% & \textbf{78.60 (80.0 Acc)} & \textbf{33} 
% & \textbf{46.00 (62.40 Acc)} & \textbf{33} \\

% \hline
% \end{tabular}
% \caption{Performance comparison of models on Subtask~1 and Subtask~2. Validation results report F1-macro and Accuracy. Test results report F1-macro, Accuracy (in parentheses), and official rank.}
% \label{tab:complete_results}
% \end{Table*}

% \begin{Table}[!htbp]
% \centering
% \small
% \begin{tabular}{lccc}
% \hline
% \textbf{Model} & \textbf{F1-macro} & \textbf{Accuracy} & \textbf{Rank} \\
% \hline
% \textbf{Ensemble (Proposed)} & \textbf{78.6} & \textbf{80.0} & \textbf{33} \\
% \hline
% \end{tabular}
% \caption{Test set results (F1-macro, Accuracy and Rank) for Subtask~1.}
% \label{tab:test_results1}
% \end{Table}

% \begin{Table}[!htbp]
% \centering
% \small
% \begin{tabular}{lccc}
% \hline
% \textbf{Model} & \textbf{F1-macro} & \textbf{Accuracy} & \textbf{Rank} \\
% \hline
% \textbf{Ensemble (Proposed)} & \textbf{46.0} & \textbf{62.40} & \textbf{33} \\
% \hline
% \end{tabular}
% \caption{Test set results (F1-macro, Accuracy and Rank) for Subtask~2.}


% \label{tab:test_results2}
% \end{Table}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Error Analysis}
\label{sec:error}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

To gain deeper insights into the strengths and limitations of our proposed ensemble, we conducted a detailed error analysis on the development set. This analysis combines quantitative evaluation through performance metrics and confusion matrices with qualitative examination of individual predictions.

In the quantitative analysis, we examined confusion matrices for all individual models as well as the final ensemble (see Appendix~\ref{app:confusion_matrices_task1} for Subtask~1 and Appendix~\ref{app:confusion_matrices_task2} for Subtask~2). For Subtask~1, the matrices cover \textit{BERT$_{\text{base}}$}, \textit{RoBERTa$_{\text{base}}$}, \textit{XLM-RoBERTa$_{\text{base}}$}, \textit{GPT-2$_{\text{base}}$}, and the weighted soft-voting ensemble. For Subtask~2, we analyzed per-label confusion matrices across the five polarization categories: \textit{Political}, \textit{Racial/Ethnic}, \textit{Religious}, \textit{Gender/Sexual}, and \textit{Others}. 

The analysis reveals that non-polarized instances are predicted with high accuracy across most models, whereas polarized instances are more frequently misclassified. \textcolor{black}{In particular, XLM-RoBERTa$_{\text{base}}$ for Subtask~1 predicted almost exclusively the negative class, indicating poor generalization on this dataset.} These patterns are largely attributable to the significant class imbalance in the training data, where non-polarized examples substantially outnumber polarized ones. A similar skew appears in Subtask~2, with the \textit{Political} category dominating, leading to stronger performance on this class while underrepresented categories remain challenging.

In the qualitative analysis, we manually inspected both correctly and incorrectly classified instances for both subtasks (see Tables~\ref{tab:correct_incorect_example_Subtask~1} and \ref{tab:correct_incorect_example_Subtask~2} in the Appendix). These examples highlight how label imbalance introduces strong bias toward majority classes. Although ensembling multiple models improves validation Macro-$F_1$ by leveraging complementary strengths, it can also amplify certain biases during testing. Specifically, when one model exhibits high bias due to class imbalance, the weighted aggregation may not fully compensate, potentially reducing generalization. 

Consequently, while training and validation Macro-$F_1$ scores were relatively high, we observed a modest drop on the test set. This performance gap underscores limited generalization to unseen data, primarily driven by the persistent class and category imbalance. Future improvements could include collecting additional data for underrepresented classes or exploring advanced imbalance mitigation techniques to enhance model robustness.


% \todo[inline]{Your current Error Analysis section identifies two valid concerns—class imbalance and possible overfitting—but it remains too brief and largely descriptive. To strengthen it, you should move beyond general statements and provide evidence-driven analysis. Instead of simply stating that minority labels are under-represented, quantify the imbalance and discuss its measurable impact using per-class precision, recall, or Macro-F1-Scores. Highlight which specific categories suffer most (e.g., Gender/Sexual or Religious) and describe how they are being misclassified (e.g., frequently predicted as Political). Including references to a confusion matrix or class-wise performance Table would make the analysis more concrete and convincing.}
% \todo[inline]{
% Additionally, the claim of overfitting should be supported more carefully. A small gap between training and testing Macro-F1 (e.g., 80\% vs 78\%) is not necessarily strong evidence of overfitting, as such differences can fall within expected generalization variance. Instead of attributing performance drop solely to overfitting, analyze whether threshold tuning, Ensemble weighting, or class imbalance contributed to performance shifts. You may also consider discussing whether the Ensemble disproportionately favored certain base models, leading to bias amplification.}

% \todo[inline]{
% Finally, incorporate qualitative error analysis. Provide a few representative misclassified examples and explain why the system struggled with them—such as implicit polarization, sarcasm, context dependency, or neutral mentions of political entities being misclassified as polarized. This demonstrates a deeper understanding of model behavior and shows reviewers that you have critically examined both linguistic and modeling limitations. Overall, the section should combine quantitative evidence, qualitative examples, and methodological reflection to present a balanced and insightful analysis rather than a brief summary of observed issues.}
% \todo[inline]{
% providing output-level error analysis is important, especially for a SemEval or ACL-style system paper. It demonstrates that you understand your model’s behavior beyond reporting evaluation scores and adds analytical depth to your work. Including a brief discussion of common misclassification patterns, per-class performance differences, or a few representative error examples can significantly strengthen the credibility of your paper. Even a short but evidence-based analysis helps reviewers see that you have critically examined the system’s limitations rather than simply presenting numerical results.
% }


\section{Conclusion and Future Directions}
\label{sec:Conc}
This paper presented the NIT-Agartala-NLP-Team’s submission to SemEval-2026 Task 9 on polarization detection. We systematically explored a weighted soft-voting ensemble of fine-tuned large language models (LLMs), combining supervised fine-tuning of multiple transformer architectures with performance-based weighting and threshold optimization. The proposed framework achieved competitive performance, obtaining a Macro-$F_1$ score of 78.6\% on Subtask~1 and 46.0\% on Subtask~2, demonstrating the effectiveness of leveraging complementary strengths from multiple fine-tuned LLMs for both binary and multi-label polarization detection.

Despite these promising results, our work has several limitations. The experiments were conducted exclusively on the English portion of the dataset, even though the organizers provided data in 22 languages. \textcolor{black}{This was primarily due to limited knowledge of other languages.} Additionally, the relatively small size of the training data and its pronounced class and category imbalance biased the models toward majority classes. We used only base versions of the pre-trained models, which constrained representational capacity \textcolor{black}{due to hardware limitations}. Finally, the reliance on large language models makes the overall decision-making process difficult to interpret.

Future work will focus on extending the approach to multilingual settings by incorporating the full 22-language dataset. To address data scarcity and imbalance, we plan to collect and annotate additional examples, particularly for underrepresented polarization categories. We also intend to experiment with larger model variants, run experiments across multiple random seeds to assess result variance, and apply calibration techniques such as temperature scaling. \textcolor{black}{In future we will run on multiple seed and see the variance in result and use calibration method such as temperature scaling}. Furthermore, we aim to develop more interpretable variants of the framework through visualization and explanation techniques to better understand model decisions and improve transparency in polarization detection systems.


\section*{Acknowledgments}


We would like to express our sincere gratitude to the organizers of SemEval-2026 Task~9 for their dedicated efforts in curating the dataset, organizing the shared task, and promptly addressing participant queries. We also thank the anonymous reviewers for their valuable feedback and constructive comments, which significantly helped improve the quality of this paper.

We are grateful to the Department of Computer Science and Engineering, National Institute of Technology Agartala, for providing the necessary computational resources and support that enabled our participation in this task.

% Bibliography entries for the entire Anthology, followed by custom entries
%\bibliography{anthology,custom}
% Custom bibliography entries only

% \newpage 

\balance
\bibliography{custom}
\onecolumn
\clearpage
\appendix

\section{Appendix}

\subsection{Confusion Matrices for Subtask~1}
\label{app:confusion_matrices_task1}

\begin{figure*}[htbp]
\centering
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-1/Train_val/Bert_base.png}
    \caption{BERT$_{\text{base}}$}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-1/Train_val/Roberta_base.png}
    \caption{RoBERTa$_{\text{base}}$}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-1/Train_val/xlm-roberta-base.png}
    \caption{XLM-R$_{\text{base}}$}
\end{minipage}

\vspace{0.8cm}

\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-1/Train_val/gpt-2_base.png}
    \caption{GPT-2$_{\text{base}}$}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-1/Train_val/Ensemble_model.png}
    \caption{Weighted Soft-Voting Ensemble (Proposed)}
\end{minipage}

\caption{Confusion matrices of individual fine-tuned models and the proposed ensemble on the development set for Subtask~1 (Binary Polarization Detection).}
\label{fig:confusion_matrices_subtask1}
\end{figure*}

\clearpage

\subsection{Confusion Matrices for Subtask~2}
\label{app:confusion_matrices_task2}

\begin{figure*}[htbp]
\centering
% BERT
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/bert/political.png}
    \caption{Political}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/bert/racial_ethnic.png}
    \caption{Racial/Ethnic}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/bert/religious.png}
    \caption{Religious}
\end{minipage}

\vspace{0.7cm}

\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/bert/gender_sexual.png}
    \caption{Gender/Sexual}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/bert/other.png}
    \caption{Others}
\end{minipage}

\caption{Per-label confusion matrices for the fine-tuned BERT$_{\text{base}}$ model on Subtask~2.}
\label{fig:confusion_matrix_bert_Subtask2}
\end{figure*}

% RoBERTa
\begin{figure*}[htbp]
\centering
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/roberta/political.png}
    \caption{Political}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/roberta/racial_ethnic.png}
    \caption{Racial/Ethnic}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/roberta/religious.png}
    \caption{Religious}
\end{minipage}

\vspace{0.7cm}

\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/roberta/gender_sexual.png}
    \caption{Gender/Sexual}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/roberta/other.png}
    \caption{Others}
\end{minipage}

\caption{Per-label confusion matrices for the fine-tuned RoBERTa$_{\text{base}}$ model on Subtask~2.}
\label{fig:confusion_matrix_roberta_Subtask2}
\end{figure*}

% XLM-R
\begin{figure*}[htbp]
\centering
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/xlmr/political.png}
    \caption{Political}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/xlmr/racial_ethnic.png}
    \caption{Racial/Ethnic}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/xlmr/religious.png}
    \caption{Religious}
\end{minipage}

\vspace{0.7cm}

\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/xlmr/gender_sexual.png}
    \caption{Gender/Sexual}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/xlmr/other.png}
    \caption{Others}
\end{minipage}

\caption{Per-label confusion matrices for the fine-tuned XLM-R$_{\text{base}}$ model on Subtask~2.}
\label{fig:confusion_matrix_xlmr_Subtask2}
\end{figure*}

% GPT-2
\begin{figure*}[htbp]
\centering
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/gpt-2/political.png}
    \caption{Political}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/gpt-2/racial_ethnic.png}
    \caption{Racial/Ethnic}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/gpt-2/religious.png}
    \caption{Religious}
\end{minipage}

\vspace{0.7cm}

\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/gpt-2/gender_sexual.png}
    \caption{Gender/Sexual}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/gpt-2/other.png}
    \caption{Others}
\end{minipage}

\caption{Per-label confusion matrices for the fine-tuned GPT-2$_{\text{base}}$ model on Subtask~2.}
\label{fig:confusion_matrix_gpt2_Subtask2}
\end{figure*}

% Ensemble
\begin{figure*}[htbp]
\centering
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/ensemble/political.png}
    \caption{Political}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/ensemble/racial_ethnic.png}
    \caption{Racial/Ethnic}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/ensemble/religious.png}
    \caption{Religious}
\end{minipage}

\vspace{0.7cm}

\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/ensemble/gender_sexual.png}
    \caption{Gender/Sexual}
\end{minipage}
\hfill
\begin{minipage}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{Img/Task-2/Train_valid/ensemble/other.png}
    \caption{Others}
\end{minipage}

\caption{Per-label confusion matrices for the proposed weighted soft-voting ensemble on Subtask~2.}
\label{fig:confusion_matrix_ensemble_Subtask2}
\end{figure*}

\clearpage

\subsection{Example Predictions}

\begin{table*}[htbp]
\centering
\small
\begin{tabular}{p{9.5cm}cc}
\toprule
\textbf{Sample Text} & \textbf{Predicted} & \textbf{Actual} \\
\midrule
God is with Ukraine and Zelensky & 0 & 0 \\
4 Dems, 2 Republicans Luzerne County Council seats Dallas & 0 & 0 \\
Abuse Survivor Recounts Her Struggles at YWCA Event & 0 & 0 \\
Election fraud did not go away, it is here. Every American must vote to overcome the election fraud. 2022 and 2024. & 1 & 0 \\
Hamas struck first and is a terrorist group. Stop the use of human beings as human shields and then well talk. & 1 & 0 \\
Not all the Nazis were from Germany, either There were also Austrian Ukrainian nazis, for example & 1 & 0 \\
\bottomrule
\end{tabular}
\caption{Correct and incorrect predictions by the proposed ensemble model on Subtask~1 (Binary Polarization Detection).}
\label{tab:correct_incorect_example_Subtask~1}
\end{table*}

\begin{table*}[htbp]
\centering
\small
\begin{tabular}{p{9.5cm}cc}
\toprule
\textbf{Sample Text} & \textbf{Predicted} & \textbf{Actual} \\
\midrule
4 Dems, 2 Republicans Luzerne County Council seats Dallas & {[}0,0,0,0,0{]} & {[}0,0,0,0,0{]} \\
After Rwanda, another deportation camp disaster & {[}0,0,0,0,0{]} & {[}0,0,0,0,0{]} \\
God is with Ukraine and Zelensky & {[}1,0,0,0,0{]} & {[}0,0,0,0,0{]} \\
Abuse Survivor Recounts Her Struggles at YWCA Event & {[}1,0,0,0,0{]} & {[}0,0,0,0,0{]} \\
any number of southern red states tbh & {[}1,0,0,0,0{]} & {[}0,0,0,0,0{]} \\
\bottomrule
\end{tabular}
\caption{Correct and incorrect predictions by the proposed ensemble model on Subtask~2 (Multi-label Polarization Type Classification).}
\label{tab:correct_incorect_example_Subtask~2}
\end{table*}

\subsection{Ensemble Weights}

\begin{table*}[htbp]
\centering
\small
\begin{tabular}{lcc}
\toprule
\textbf{Model} & \textbf{Subtask~1} & \textbf{Subtask~2} \\
\midrule
RoBERTa$_{\text{base}}$  & 0.3 & 0.5 \\
XLM-R$_{\text{base}}$    & 0.1 & 0.4 \\
BERT$_{\text{base}}$     & 0.1 & 0.0 \\
GPT-2$_{\text{base}}$    & 0.5 & 0.1 \\
\bottomrule
\end{tabular}
\caption{Performance-based weights assigned to each model in the proposed weighted soft-voting ensemble.}
\label{tab:exact_ensemble model_weights}
\end{table*}

% \subsection{Loss Functions}


\end{document}
