
\section{Methodology}
\label{sec:method}

\begin{figure*}[!t]
\centering
\includegraphics[width=0.8\textwidth]{images/full_pl_v6.png}
\caption{High-level overview of the proposed pipeline.}
\label{fig:pipeline_overview}
\end{figure*}

\subsection{Single-View Contrastive Learning for Track A}

Track A requires determining which of two candidate stories is narratively more similar to an anchor story. We employ a single-view contrastive learning approach that learns embeddings directly from full narrative texts, optimized through a pseudonymization step and targeted fine-tuning.

\textbf{Pseudonymization.} To mitigate surface-level noise and decouple story progression from specific naming conventions, we apply entity-level referential normalization with consistent placeholders while preserving within-story coreference. Repeated mentions of the same character are mapped to the same pseudonym throughout the story, whereas distinct entities receive different placeholders. This makes the transformation identity-preserving at the discourse level, even though lexical content is removed. By pseudonymizing entities into generic tokens (e.g., ``Character\_A'', ``Location\_1''), we reduce the model's reliance on entity overlap---a common source of spurious correlations---and encourage it to focus on narrative structure and semantic progression \cite{hatzel-biemann-2024-tell} (see Figure~\ref{fig:pseudonymization}).

Our scheme is related to, but distinct from, simplified theta-role abstractions in linguistics. Theta roles explicitly encode semantic functions (e.g., agent, patient, experiencer), whereas our preprocessing does not induce a symbolic role inventory; it performs consistent referential normalization and lets the encoder infer event-level relations from context. In implementation, we use a two-stage pipeline with \texttt{fastcoref} and \texttt{spaCy} (\texttt{en\_core\_web\_trf}). We first obtain coreference clusters, infer a cluster type via lightweight voting (\texttt{PERSON}$\rightarrow$\texttt{PER}, \texttt{GPE}/\texttt{LOC}/\texttt{FAC}$\rightarrow$\texttt{LOC}, \texttt{ORG}/\texttt{NORP}$\rightarrow$\texttt{ORG}), and skip clusters without proper-noun evidence to avoid replacing non-entity spans. We then assign deterministic placeholders (e.g., \texttt{Character\_A}, \texttt{Location\_1}, \texttt{Organization\_1}, \texttt{Entity\_1}) using per-type counters and a global mapping dictionary. Next, we run NER fallback on uncovered spans, prevent overlap with a character-level usage mask, and apply deduplicated replacements from right to left (descending character offsets) to preserve index correctness. For each triplet item, one shared mapping is used across \texttt{anchor\_text}, \texttt{text\_a}, \texttt{text\_b}, and \texttt{text} so identical mentions remain consistently pseudonymized within the sample.

\begin{figure}[!ht]
\centering
\includegraphics[width=0.95\linewidth]{images/pseudonymized.jpg}
\caption{Example of the pseudonymization process applied to Track A narratives.}
\label{fig:pseudonymization}
\end{figure}

\subsubsection{Architecture}
Our model is built upon the \texttt{all-mpnet-base-v2} sentence transformers \cite{song2020mpnet}, which serves as a more robust backbone compared to traditional BERT-based models.

The model produces 768-dimensional embeddings through \textbf{mean pooling} over the output token representations. We deploy this backbone for both tracks. To prevent overfitting and preserve pre-trained semantic knowledge, we implement a \textbf{Smart Layer Freezing} strategy: we freeze all embedding parameters and the bottom 40\% of transformer layers to retain low-level linguistic features, while allowing the top layers to adapt to our task domains without losing generalized language understanding.

% @inproceedings{song2020mpnet,
%   title={Mpnet: Masked and permuted pre-training for language understanding},
%   author={Song, Kaitao and Tan, Xu and Qin, Tao and Lu, Jianfeng and Liu, Tie-Yan},
%   booktitle={Advances in Neural Information Processing Systems},
%   volume={33},
%   pages={16857--16867},
%   year={2020}
% }

% \textbf{Training Strategy.} We fine-tune the model using triplet margin loss on training triplets constructed from anchor-positive-negative story pairs:
% \begin{equation}
% \mathcal{L}_{\text{triplet}} = \text{ReLU}(d(\mathbf{a}, \mathbf{p}) - d(\mathbf{a}, \mathbf{n}) + m)
% \end{equation}
% where $d(\mathbf{x}, \mathbf{y}) = 1 - \cos(\mathbf{x}, \mathbf{y})$ represents the cosine distance between embeddings, and $m = 0.3$ is the margin parameter. 

% \textbf{Inference.} At test time, we encode the anchor and both candidate stories. The candidate with the higher cosine similarity to the anchor is predicted as the narratively closer story.

\subsection{Multi-View Contrastive Learning for Track B}

\begin{figure*}[!t]
\centering
\includegraphics[width=0.85\textwidth]{images/multiview2.png}
\caption{Multi-view contrastive learning pipeline.}
\label{fig:multiview}
\end{figure*}

For Track B, we implement a multi-view contrastive learning framework (see Figure~\ref{fig:multiview}) that explicitly models the three narrative dimensions identified in the task annotation guidelines.

\textbf{Narrative Element Extraction.} We decompose each story into three 
distinct views using Large Language Models: (1) \textit{theme}, capturing 
the central controlling idea; (2) \textit{plot events}, representing the 
chronological sequence of state-changing events; and (3) \textit{outcome}, 
describing the final resolution \cite{hobson-etal-2024-story, 
tian2024narratives}. This extraction provides explicit 
structural representations that enable the model to identify semantically 
similar narratives that may differ substantially in surface form 
\cite{li2023claif}.


\textbf{Contrastive Learning.} For each view (theme, plot, outcome), we construct training triplets by matching anchor narratives with their extracted components. This creates a positive pair that shares the same narrative facet and a negative pair drawn from a different story, encouraging view-specific discrimination. The contrastive loss $\mathcal{L}_{\text{con}}$ follows a cross-entropy formulation over scaled cosine similarities \cite{contrastive-learning}:
\begin{equation}
\mathcal{L}_{\text{con}} = -\log \left( \frac{\exp(\frac{\hat{\mathbf{a}} \cdot \hat{\mathbf{p}}}{\tau})}{\exp(\frac{\hat{\mathbf{a}} \cdot \hat{\mathbf{p}}}{\tau}) + \exp(\frac{\hat{\mathbf{a}} \cdot \hat{\mathbf{n}}}{\tau})} \right)
\end{equation}
where $\text{sim}(\mathbf{u}, \mathbf{v}) = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \|\mathbf{v}\|}$ and $\tau$ is the temperature hyperparameter. A lower $\tau$ sharpens the distribution and increases the penalty for confusing negatives, while a higher $\tau$ smooths similarities and can improve stability.

\textbf{Self-Supervised View Alignment.} To ensure consistency across views with limited data, we introduce an alignment loss $\mathcal{L}_{\text{align}}$. Let
\[
\bar{\mathbf{z}}=\frac{1}{3}\left(\mathbf{z}_{\text{theme}}+\mathbf{z}_{\text{plot}}+\mathbf{z}_{\text{outcome}}\right).
\]
We align the fused embedding $\mathbf{z}_f$ with $\bar{\mathbf{z}}$ via:
\begin{equation}
\begin{aligned}
\mathcal{L}_{\text{align}}
&= \lambda \left\|
\frac{\mathbf{z}_f}{\|\mathbf{z}_f\|_2}
- \frac{\bar{\mathbf{z}}}{\|\bar{\mathbf{z}}\|_2}
\right\|_2^2.
\end{aligned}
\end{equation}
where $\lambda$ is the scaling weight. By minimizing this distance, the model encourages a coherent joint space grounded in all three narrative dimensions.