\documentclass[11pt]{article}
\usepackage[final]{acl}
\usepackage{booktabs}
\usepackage{algorithmic}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{float}
\usepackage{pdflscape}

% Standard package includes
\usepackage{times}
\usepackage{latexsym}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{inconsolata}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{url}

\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,
    urlcolor=cyan,
}

\title{Ajman University at SemEval-2026 Task 2: Overcoming Scale Collapse in Temporal Emotion Modeling via Residual Learning}

\author{
  \begin{tabular}{c}
    Haseebullah Jumakhan, Soud Asaad Alhazba, \\
    Seyed Abdullah, and Mahmoud Al-Ayyoub
  \end{tabular} \\
  Artificial Intelligence Research Center (AIRC) \\
  College of Engineering and Information Technology, Ajman University \\
  \texttt{\{202320029, 202420468, 202412068\}@ajmanuni.ac.ae} \\
  \texttt{m.alshboul@ajman.ac.ae}
}

\begin{document}
\maketitle
\begin{abstract}
The Ajman University Team developed specialized architectures for longitudinal affective forecasting for SemEval-2026 Task 2~\citep{soni-etal-2026-semeval}. We established a reliable performance floor with a hybrid contextual-recurrent model in Subtask 1 (ranked 14th). In Subtask 2A (ranked 5th) and Subtask 2B (ranked 6th), our primary contribution is mitigating scale collapse. To achieve this, we introduce a novel ``bifurcated leviathan'' architecture that combines explicit residual learning with target scaling. We further counteract regression-to-the-mean by optimizing covariance via specialized objective functions (CCC and Huber)~\citep{huber1964robust, lin1989ccc}. Finally, we analyze our official leaderboard metrics to empirically demonstrate that while explicit residual learning excels at intra-subject memorization, it poses severe vulnerabilities to zero-shot cross-subject generalization. To support reproducibility, our code is publicly available at \url{https://github.com/Soudk21/NLP_Project/tree/main}.
\end{abstract}

\noindent\textbf{Keywords:} Valence-Arousal-Dominance (VAD), Longitudinal Modeling, Temporal Affect, Bifurcated Leviathan, Explicit Residual Learning, SemEval.

\section{Introduction}
\label{sec:intro}

Human emotion is widely represented mathematically via the Circumplex Model of Affect \citep{russell1980}, which maps continuous emotional states across a 2-dimensional space utilizing Valence (Positive/Negative) and Arousal (High Energy/Low Energy). SemEval-2026 Task 2 challenges systems to predict these temporal dynamics from naturalistic longitudinal essays, representing weeks or months of a user's affective experience.

Temporal affective modeling in longitudinal text necessitates a delicate trade-off between intra-subject specificity and zero-shot cross-subject generality, particularly when constrained by strict hardware limits (i.e., 8 GB VRAM). Unlike traditional static sentiment classifiers, we focus on architectural optimizations for continuous, autoregressive emotion forecasting. 

In this paper, we detail our baseline approach for Subtask 1 and our core methodological contributions for Subtasks 2A and 2B. Specifically, we address ``scale collapse'' in temporal forecasting by utilizing explicit residual learning, target scaling, and a ``bifurcated leviathan'' architecture to actively preserve predicted distributional variance across sequences.

\section{Subtask 1: Evaluating the Variation in Valence and Arousal}
\label{sec:subtask1}

We established a reliable performance floor using a robust hybrid architecture combining a pre-trained transformer backbone with user-specific embeddings.

\subsection{Data Processing and Architecture}
\label{subsec:t1_architecture}

Our approach uses a \texttt{SingleTextDataset} to process the input texts sequentially. The first matrix row is explicitly reserved for unknown/unseen users to enable zero-shot inference, while all subsequent rows are mapped to corresponding training User IDs. 

We utilize a combination of trainable user embeddings ($\mathbb{R}^{32}$) and 768-dimensional DistilBERT \citep{sanh2019distilbert} text embeddings to simultaneously model both the user's inherent baseline disposition and the semantic content of the current text. The concatenated embeddings are passed through a single-layer \texttt{BiLSTM} \citep{hochreiter1997lstm} (hidden units = 128) to aggregate temporal context. Finally, two isolated Multi-Layer Perceptron (MLP) networks (utilizing ReLU activations and dropout $p=0.3$) regress the continuous Valence and Arousal values. Specific error constraints regarding this continuous formulation are detailed in Appendix \ref{sec:appendix_error_sub1}.

\section{Subtask 2A: Forecasting Emotional State Changes}
\label{sec:subtask2a}

Unlike the continuous trajectory tracking in Subtask 1, Subtask 2A requires predicting immediate, step-wise affective shifts based on newly authored text. We frame the incoming essay as a semantic catalyst acting upon the user's current emotional baseline, necessitating a fusion strategy that balances high-dimensional text representations with low-dimensional scalar states.


\subsection{Preprocessing and Feature Engineering}
\label{subsec:s2a_data}

Data was chronologically ordered by \texttt{user\_id} and \texttt{timestamp}. To strictly prevent longitudinal data leakage, we utilized \texttt{GroupShuffleSplit} from the \textit{scikit-learn} toolkit \citep{scikit-learn} to isolate 10\% of users as an independent hold-out validation set. Furthermore, the current state inputs $(V_t, A_t)$ were Z-score normalized ($\mu, \sigma$ derived strictly from the training split) prior to network ingestion to prevent scale disparity.

\subsection{Model Architecture}
\label{subsec:s2a_model}

We propose a Hybrid Fusion architecture (illustrated in Figure \ref{fig:Flowchart2a}) designed to bridge the dimensional gap between high-capacity contextualized textual representations and low-dimensional scalar state inputs.

\subsubsection{The Drowning Problem}
Initially, we observed that simply concatenating the 768-dimensional textual representation with the 2-dimensional state representation caused the numeric signal to be ``overwhelmed'' during backpropagation; the network viewed the scalars as negligible noise. To alleviate this, we engineered a \textbf{Feature Projection} module to synthetically expand the numeric footprint.

\subsubsection{Components of the Model}

\begin{enumerate}
\item \textbf{Text Encoder:} A \texttt{microsoft/deberta-v3-base} encoder maps the essay $x_t$ into a dense vector $h_{text} \in \mathbb{R}^{768}$ utilizing the [CLS] token \citep{he2021debertav3}.

\item \textbf{State Projection and Fusion:} The normalized current state is projected onto a 64-dimensional space via an MLP (Linear $\rightarrow$ GELU $\rightarrow$ Dropout). This projected numeric representation $h_{num}$ is concatenated with $h_{text}$. The 832-dimensional fused representation is regulated via LayerNorm to stabilize variance before being routed through a final regression head to yield $[\Delta \hat{V}, \Delta \hat{A}]$.
\end{enumerate}

\begin{figure}[htbp]
\centering
  \includegraphics[width=\linewidth]{latex/mermaid_subtask2a.png}
  \caption{Proposed Framework for Subtask 2A showing the Feature Projection path to solve the ``Drowning'' problem.}
  \label{fig:Flowchart2a}
\end{figure}

\subsection{Experimental Design and Ablation Study}
\label{subsec:s2a_experiments}

\subsubsection{Phase 1: Stabilization}
Our initial model employed a Weighted MSE loss. However, it suffered from \textbf{Gradient Explosions}. We transitioned to \textbf{Huber Loss} (SmoothL1) and applied gradient norm clipping. While training stabilized, the model lazily predicted near-zero changes for all inputs, yielding poor correlation ($r \approx 0.31$).

\subsubsection{Phase 2: Feature Engineering}
We introduced the 64-dimensional projection MLP (Section \ref{subsec:s2a_model}) and applied LayerNorm. Correlation increased to $r \approx 0.39$, allowing the model to utilize numeric context, though predictions remained overly conservative.

\subsubsection{Phase 3: Optimization via CCC Loss}
Euclidean losses inherently cause regression to the mean; minimizing MSE incentivizes predicting the dataset average (zero change). We replaced the loss function with \textbf{Concordance Correlation Coefficient (CCC) Loss}, forcing the model to optimize for covariance matching:
$$\mathcal{L}_{CCC} = 1 - \frac{2 \sigma_{y\hat{y}}}{\sigma_y^2 + \sigma_{\hat{y}}^2 + (\mu_y - \mu_{\hat{y}})^2}$$
where $\sigma_{y\hat{y}}$ is the covariance, $\sigma_y^2$ and $\sigma_{\hat{y}}^2$ are the respective variances, and $\mu_y$ and $\mu_{\hat{y}}$ are the means. This transition, combined with differential learning rates, culminated in a massive internal performance leap to an average correlation of $r = 0.642$.

\subsection{Qualitative Error Analysis}
\label{subsec:s2a_analysis}
Manual inspection of specific textual failure cases reveals that while the projected architecture tracks overt emotional shifts well, it struggles with complex pragmatics. For instance, when a user vented using ostensibly positive vocabulary in a sarcastic tone (\textit{``Oh great, another perfectly ruined weekend''}), the model naively interpreted the standalone token embeddings as indicators of a positive valence shift, failing to capture the underlying linguistic irony.

\section{Subtask 2B: Longitudinal Trajectory}
\label{sec:subtask2b}

Subtask 2B extends the forecasting horizon from immediate state changes to long-term dispositional drifts across a user's entire available history. Because mapping macro-level trajectorie

\subsection{Preprocessing and the ``Leviathan'' Protocol}
\label{subsec:s2b_data}

\paragraph{Siamese Sampling}
We chronologically ordered each user's history, extracting the \textbf{Head} (initial $k$ essays) and \textbf{Tail} (final $k$ essays). This frames the problem identically to a Siamese network \citep{bromley1993siamese}, forcing the evaluation of the delta between two temporal poles.

\paragraph{Explicit Residual Learning via Naive Injection}
To combat Scale Collapse, we calculated the ``Naive Statistical Change'' directly from the Head and Tail segments: $\Delta_{naive} = \mu(Y_{tail}) - \mu(Y_{head})$. We explicitly inject this scalar directly into the final regression head. Mathematically, this shifts the architecture to \textbf{Residual Learning} \citep{he2016resnet}. The deep network merely learns a contextual refinement function $F(X)$ such that the prediction is $\Delta_{naive} + F(X)$. 

\paragraph{Target Scaling}
We mapped the ground truth targets to a standard normal distribution during training: $Y_{scaled} = (Y - \mu_Y) / (\sigma_Y + 1e^{-8})$. While real-world emotional shifts may exhibit skewed or heavy-tailed distributions rather than a perfect Gaussian curve, empirical results proved that Z-score scaling acts as a critical variance-stabilizing regularizer. The benefit of preventing the optimizer from collapsing to a zero-mean vastly outweighed the risk of minor distributional mismatches. Predictions are inverse-transformed during inference.

\subsection{Model Architecture: Bifurcated Siamese}
\label{subsec:s2b_model}

The ``Bifurcated Leviathan'' leverages a \texttt{deberta-v3-large} backbone with gradient checkpointing (Figure \ref{fig:Flowchart2b}). We employed a custom \textbf{Siamese Difference Pooling} mechanism ($h_{\Delta} = h_{tail} - h_{head}$). To eliminate Task Dominance, the network bifurcates immediately after the backbone into completely isolated MLPs for Valence and Arousal, preventing the noisy loss landscape of Arousal from polluting Valence convergence \citep{chen2018gradnorm}.

\begin{figure*}[t]
\centering
\includegraphics[width=\textwidth, keepaspectratio]{latex/mermaid_subtask2b.png}
\caption{The Bifurcated Siamese architecture utilized in Subtask 2B, featuring Naive Feature Injection.}
\label{fig:Flowchart2b}
\end{figure*}

\subsection{Scale Collapse Mitigation}
\label{subsec:s2b_experiments}
In early shared-head runs without target scaling, we experienced severe \textbf{Scale Collapse} \citep{jing2022dimensional}. Ground truth targets ranged $[-2.0, 2.0]$, but predictions tightly clustered within $[-0.05, 0.05]$ with a collapsed variance ($\sigma^2 < 0.01$). Integrating Target Scaling and Naive Feature Injection successfully restored predicted variance to match the ground-truth distribution. On our internal hold-out validation set, this architecture achieved Pearson correlations of $r=0.70$ for Valence.

\section{Official Results \& Distributional Shift}

Table \ref{tab:official_metrics} highlights our official performance on the hidden SemEval evaluation set. 

\begin{table}[H]
\centering
\small
\begin{tabular}{lcccc}
\toprule
\textbf{Subtask} & \textbf{Rank} & \textbf{Valence ($r$)} & \textbf{Arousal ($r$)} & \textbf{Average} \\
\midrule
1 & \textbf{16th} & 0.656 & 0.439 & 0.548 \\
2A & \textbf{7th} & 0.615 & 0.670 & 0.642 \\
2B & \textbf{8th} & -0.124 & 0.456 & 0.166 \\
\bottomrule
\end{tabular}
\caption{Official SemEval-2026 Leaderboard Results.}
\label{tab:official_metrics}
\end{table}

\subsection{Vulnerability to Noisy Baselines}
The contrast between our internal validation and the official metrics yields a profound insight into longitudinal generalization. In Subtask 2B, our model achieved a strong $r=0.70$ internally for Valence, yet plummeted to $r=-0.124$ on the unseen official test set. 

This drastic divergence explicitly validates a critical vulnerability of our \textbf{Explicit Residual Learning} approach. Because the network delegates the arithmetic baseline entirely to the mathematical injection of $\Delta_{naive}$, it became catastrophically susceptible to distribution shifts. If unseen users in the hidden test set anchored their baseline self-reported scores differently (or more noisily) than the training demographic, the arithmetic baseline inherently misled the entire refinement network. 

Conversely, our Subtask 2A architecture—which utilized Feature Projection and CCC Loss without naive statistical injection—generalized exceptionally well (achieving $r=0.670$ for Arousal, ranking 5th globally). This proves that while explicit residual injection facilitates deep intra-subject memorization, optimizing for covariance via CCC loss is a far more robust mechanism for zero-shot generalizability.

\section{Conclusion}
\label{sec:conclusion}
Team Ajman University demonstrates that capturing longitudinal trajectories requires prioritizing context width over deep recurrence. Overcoming scale collapse necessitates abandoning standard Euclidean loss in favor of projecting numeric features and utilizing concordance (CCC) loss. While residual learning successfully bypasses arithmetic bottlenecks, our official results (Subtask 2A vs. 2B) empirically prove that explicit mathematical injection is highly vulnerable to noisy baseline reporting in unseen users.

\section{Limitations}
\label{sec:limitations}
Our primary limitation is reliance on consumer-grade hardware (8GB--24GB VRAM). This necessitated FP16 precision and gradient accumulation steps to satisfy the batch-variance requirements of CCC loss. Furthermore, these physical constraints drove our most complex architectural interventions. The ``Bifurcated Leviathan'' is highly specialized to bypass local memory limits, making the code less generalizable across differing computing environments.

\section{Ethical Considerations}
Predicting human affect from ecological text carries privacy and psychological implications. Our models inevitably inherit algorithmic biases present in the training demographic's phrasing. These systems should strictly not be utilized for automated medical diagnosis, psychiatric screening, or mood monitoring without human oversight. This research is intended exclusively for longitudinal study under anonymized conditions.

\bibliography{custom}

\appendix
\section{Experimental Setup and Reproducibility}
\label{sec:appendix_reproducibility}
To facilitate full reproducibility, we document the precise configurations separating the subtasks. All experiments were conducted using PyTorch on NVIDIA RTX 4070 and 3090 GPUs. 
\begin{itemize}
    \item \textbf{Subtask 1:} Trained using standard AdamW. Sequence windows were padded to 10 entries during inference to avoid context starvation.
    \item \textbf{Subtask 2A:} \texttt{DeBERTa-v3-base}. Differential learning rates were applied: $1e^{-5}$ for the transformer backbone, and $1e^{-3}$ for the custom regression heads. Gradient accumulation achieved an effective batch size of 32.
    \item \textbf{Subtask 2B:} \texttt{DeBERTa-v3-large}. Gradient Checkpointing was mandatory to process up to 32 essays simultaneously. We utilized $5e^{-6}$ for the backbone and $1e^{-4}$ for the heads.
\end{itemize}
A universal random seed of 42 was utilized across all data splitting (\texttt{GroupShuffleSplit}) and initializations.

\section{Subtask 1 Error Analysis Constraints}
\label{sec:appendix_error_sub1}
Because Subtask 1 involves predicting continuous longitudinal trajectories rather than discrete categories, generating a standard classification confusion matrix is mathematically inapplicable. Instead, our error analysis relies on the qualitative distribution of continuous residuals. Granular analysis reveals that the model struggles significantly more with the Arousal dimension than with Valence (reflected in the official scores of $V=0.656$ vs $A=0.439$). Valence is often explicitly semantically defined via vocabulary, whereas Arousal is defined implicitly through structural intensity, pacing, and punctuation. Standard DistilBERT embeddings consistently fail to capture these implicit stylistic markers without explicit hand-crafted feature engineering.
\end{document}