<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>SCL-DeBERTa: Multi-Author Writing Style Change Detection Enhanced by Supervised Contrastive Learning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kaichuan Lin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chang Liu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fuchuan Ye</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhongyuan Han</string-name>
          <email>hanzhongyuan@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Foshan University</institution>
          ,
          <addr-line>Foshan</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <abstract>
        <p>Multi-author writing style change detection, a core challenge in PAN@CLEF evaluations, requires precise localization of author transition points in collaboratively authored documents. This paper presents SCL-DeBERTa, novel framework that integrates supervised contrastive learning (SCL) with DeBERTa for fine-grained style boundary detection. in the PAN 2025 evaluation, Our team, xxsu-team, proposed a novel method that achieved F1 scores of 0.955 (ranking 3rd), 0.825 (ranking 1st), and 0.829 (ranking 2nd) on the three subtasks, respectively, establishing a new benchmark for multi-author writing style analysis. This performance demonstrates significant advancements in feature extraction robustness and cross-task adaptability.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;PAN 2025</kwd>
        <kwd>SCL-DeBERTa</kwd>
        <kwd>DeBERTa</kwd>
        <kwd>Supervised Contrastive Learning</kwd>
        <kwd>Feature Disentanglement</kwd>
        <kwd>Writing Style Change Detection</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>The identification of writing styles in multi-author documents has emerged as a core task in digital text
forensics, with numerous solutions based on pre-trained language models proposed in recent years.
Early approaches primarily relied on traditional feature engineering, such as lexical statistical features
and syntactic pattern analysis, but these methods exhibited limited generalization ability in cross-topic
scenarios.</p>
      <p>
        With the rise of Transformer models, researchers began exploring the adaptability of diferent
pretrained architectures: Team Gladiators[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] systematically evaluated the performance of models such as
ELECTRA, SqueezeBERT, and RoBERTa, finding that RoBERTa performed best in cross-topic tasks due
to its dynamic masking strategy. However, its paragraph order reversal data augmentation strategy,
while alleviating class imbalance issues, failed to efectively capture deep stylistic features. Team
NYCU-NLP[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] innovatively integrated RoBERTa, DeBERTa, and ERNIE models, introducing a semantic
similarity correction mechanism based on LaBSE embeddings to explore the efects of model ensemble
and semantic enhancement on performance. This method achieved an F1 score of 0.863 on the hard
task, but the multi-model ensemble incurred over three times the computational cost, and the manually
set topic similarity threshold limited the method’s generalization ability. Chen et al.[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] optimized
DeBERTa’s embedding space using supervised contrastive learning, forcing paragraph vectors from
the same author to cluster together. Although this method improved sensitivity to stylistic features, it
relied on a complex paragraph pair reconstruction strategy, resulting in over 30% noisy false negatives
when the number of authors was unknown. Large model adaptation techniques: The xxsu-team[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
was the first to apply LLAMA-3-8B to this task, compressing model parameters through Low-Rank
Adaptation (LoRA)[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Although it achieved an F1 score of 0.887 on the medium task, int8 quantization
led to representation information loss, causing performance fluctuations.
      </p>
      <p>
        In contrast, we adopted the lightweight DeBERTa as the encoder to embed data samples. Its
disentangled attention mechanism[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] separates content and positional information modeling, demonstrating
stronger topic independence in multi-author style analysis. Additionally, we utilized a supervised
contrastive learning framework to optimize model parameters. In the oficial PAN 2025 evaluation, our
system achieved F1 scores of 0.953, 0.823, and 0.83 on the easy, medium, and hard subtasks, respectively,
providing a reliable solution for real-world scenarios such as lightweight academic co-authorship
detection and legal document tampering identification.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Data Processing</title>
      <p>The PAN25 writing style analysis evaluation task focuses on paragraph-level stylistic change detection
in multi-author documents, requiring participating systems to precisely identify all writing style
transition boundaries within documents under strictly constrained conditions of author identity and
topic variation.</p>
      <sec id="sec-3-1">
        <title>3.1. Data Sources and Structure</title>
        <p>The dataset used in this study for stylistic change detection consists of multiple document pairs, with
each document corresponding to two files:
• problem-&lt;id&gt;.txt: Contains the original text content.</p>
        <p>• truth-problem-&lt;id&gt;.json: Contains the annotations for stylistic changes.</p>
        <p>The annotation information for each document is stored as a binary array, indicating whether a
stylistic change occurs between adjacent sentences:
changes = [1, 2, . . . , −1 ]
where  ∈ {0, 1}
(1)
Here,  represents the total number of sentences in the document. The overall distribution of the dataset
is shown in Table 1.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Sample Structure</title>
        <p>Each generated training sample contains the following elements:
sample = {input_ids, attention_mask,
label ,
doc_id
,
pair_idx
}
(2)
⏟Token ⏞IDs ⏟ Attention⏞Mask</p>
        <p>Styl⏟istic ⏞Label Docum⏟ent I⏞dentifier Sent⏟ence Pa⏞ir Index</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Support for Supervised Contrastive Learning</title>
        <p>To support the supervised contrastive learning framework, additional document-level metadata is
included in the samples:
• doc_id: A unique document identifier used to group sentence pairs from the same document.
• pair_idx: The position index of the sentence pair within the document.</p>
        <p>This metadata enables the model to learn representations of stylistic consistency within a document,
enhancing its ability to detect stylistic changes in long documents.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Error Handling Mechanism</title>
        <sec id="sec-3-4-1">
          <title>InputFile</title>
          <p>Success
 Successful</p>
        </sec>
        <sec id="sec-3-4-2">
          <title>Warning</title>
          <p>Error
Exception
❌
❌</p>
        </sec>
        <sec id="sec-3-4-3">
          <title>I/O Excepting</title>
        </sec>
        <sec id="sec-3-4-4">
          <title>Encoding Error</title>
          <p>⚠
⚠</p>
        </sec>
        <sec id="sec-3-4-5">
          <title>Consistency check</title>
        </sec>
        <sec id="sec-3-4-6">
          <title>Automatic filtering</title>
          <p>• File I/O exception handling.</p>
          <p>• Encoding error handling.</p>
          <p>To ensure the robustness of data processing, the following error handling mechanisms are
implemented:
• Data consistency checks.</p>
          <p>• Automatic filtering of invalid samples.</p>
          <p>These mechanisms ensure that most usable data can still be processed efectively, even in cases of partial
data corruption or non-standard formatting.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Method</title>
      <p>DeBERTa
Encoder</p>
      <sec id="sec-4-1">
        <title>4.1. Task Definition</title>
        <p>CLS Token 
CLSFeatures</p>
        <p>Token 
Features
Hierarchical 
Features</p>
        <p>CClalsassisfiicfiactaiotinon</p>
        <p>Header
Header</p>
        <p>StyleCChahnagnege
Style</p>
        <p>Probability</p>
        <p>Probability
Projection Head</p>
        <p>Style Vector</p>
        <p>SupervisedContrastive Loss
The multi-author writing style detection task, established by PAN Lab in CLEF conferences, requires
precise localization of author transition points in collaboratively authored documents. Formally, given
a document  = {1, 2, . . . , } composed of  paragraphs, the goal is to identify the boundary set
 = { | author() ̸= author(+1)}.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. SCL-DeBERTa Architecture</title>
        <p>
          We propose SCL-DeBERTa, a novel framework integrating supervised contrastive learning with
DeBERTa[
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] encoder. As illustrated in Figure 2, the model employs dual-path processing:
hCLS = DeBERTa(x)[0]
Classification head: ^ = (W
        </p>
        <p>2 · ReLU(W 1hCLS))</p>
        <p>Projection head: z = W4 · ReLU(W 3hCLS)
where W1 ∈ R256×768 , W2 ∈ R1×256 , W3 ∈ R256×768 , W4 ∈ R128×256 are learnable parameters.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Supervised Contrastive Learning</title>
        <p>
          We introduce a label-guided contrastive loss[
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] to enhance style discrimination:
ℒscl = −
        </p>
        <p>1

∑︁</p>
        <p>∑︁ log
=1 | ()| ∈ ()</p>
        <p>exp(z · z / )
∑︀̸= exp(z · z / )
where  () = { |  = } denotes positive samples sharing the same style label, and  = 0.07 is the
temperature hyperparameter.</p>
        <p>The joint optimization objective combines classification and contrastive losses:
ℒtotal = BCE(^, ) + ·
⏟ ⏞</p>
        <p>ℒcls
with  = 0.3 controlling the contrastive regularization strength.</p>
        <p>ℒ scl
style re⏟gularization
⏞
(3)
(4)
(5)
(6)
(7)</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Experiment</title>
      <sec id="sec-5-1">
        <title>5.1. Dataset</title>
        <p>The PAN 2025 multi-author writing style analysis evaluation task focuses on paragraph-level stylistic
change detection, requiring participants to analysis the stylistic consistency of consecutive sentence
pairs, participants must accurately identify all author transition boundaries. The task is designed
to strictly control the synchronization of author identity and topic variation, ensuring that stylistic
discrimination is not afected by topic shifts. Systems are evaluated across three dificulty levels based
on the complexity of document topics.</p>
        <p>1. Easy Subtask: The document topics are highly consistent, with frequent and obvious author
transitions, and significant stylistic diferences between paragraphs.
2. Medium Subtask: The document topics are moderately complex, with more subtle author
transitions and smaller stylistic diferences between paragraphs.
3. Hard Subtask: The document topics are highly mixed, with extremely subtle author transitions
and almost imperceptible stylistic diferences between paragraphs.</p>
        <p>The PAN 2025 multi-author writing style analysis evaluation task centers on paragraph-level stylistic
change detection, challenging participants to conduct pure stylistic change detection at the sentence
level. By examining the stylistic consistency between consecutive sentence pairs, participants are
required to precisely identify all author transition boundaries. The task is meticulously designed to
enforce strict synchronization between author identity and topic variation, ensuring that stylistic
discrimination remains unafected by topic shifts. Systems are assessed across three dificulty levels,
determined by the complexity of document topics.</p>
      </sec>
      <sec id="sec-5-2">
        <title>5.2. Settings</title>
        <p>In this study, we selected DeBERTa as the pre-trained model and utilized a supervised contrastive
learning framework to optimize model parameters. Based on this foundation, we proposed
SCLDeBERTa, which enhances the ability of supervised contrastive learning to improve style diferentiation.
By combining classification and contrastive losses, the model achieves precise detection of author
transition boundaries. The trained model was evaluated on three distinct task datasets, resulting in
customized models tailored for each task. The hyperparameter settings used in this experiment are
detailed in Table 2.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Results</title>
      <sec id="sec-6-1">
        <title>6.1. Evaluation on PAN 2025 Benchmark</title>
        <p>As shown in Table 3, SCL-DeBERTa achieved F1 scores of 0.955 (ranking 3rd), 0.825 (ranking 1st),
and 0.829 (ranking 2nd) on the three subtasks:</p>
        <p>This table presents the leaderboard results on the PAN 2025 benchmark. Our team, xxsu-team, with
the proposed SCL-DeBERTa method, achieved top-tier performance across all three subtasks, ranking
3rd, 1st, and 2nd on Task1, Task2, and Task3, respectively. Compared to other strong baselines, our
approach demonstrates superior robustness and adaptability in multi-author writing style analysis,
establishing a new benchmark for this challenging task.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion And Future Work</title>
      <sec id="sec-7-1">
        <title>7.1. Conclusion</title>
        <p>In this study, we proposed SCL-DeBERTa, a novel framework that integrates supervised contrastive
learning with the DeBERTa encoder to address the challenging task of multi-author writing style
detection. By combining classification and contrastive losses, the model efectively enhances style
diferentiation and achieves precise detection of author transition boundaries.</p>
      </sec>
      <sec id="sec-7-2">
        <title>7.2. Future Work</title>
        <p>While SCL-DeBERTa has shown promising results, several avenues for future research remain open.
First, we plan to explore the integration of additional pre-trained language models, such as GPT or
LLAMA, to further enhance the model’s stylistic representation capabilities. Second, extending the
framework to handle multilingual datasets could broaden its applicability to diverse linguistic contexts.
Third, we aim to investigate the impact of incorporating external knowledge, such as syntactic or
semantic features, to improve the model’s performance on the Hard subtask. Finally, optimizing the
computational eficiency of the framework, particularly for large-scale datasets, will be a key focus to
ensure its scalability in practical scenarios.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>8. Acknowledgments</title>
      <p>This work is supported by the National Social Science Foundation of China (24BYY080).</p>
    </sec>
    <sec id="sec-9">
      <title>9. Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors utilized the DeepSeek language model and GPT-4.1 for
grammaiand spelling checks. Following the use of this tool, the authors carefully reviewed and edited
the contenas necessary and assume full responsibility for the content of this publication</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>E.</given-names>
            <surname>Zangerle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mayerl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Potthast</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Stein</surname>
          </string-name>
          ,
          <article-title>Overview of the Multi-Author Writing Style Analysis Task at PAN 2025</article-title>
          , in: G. Faggioli,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosso</surname>
          </string-name>
          , D. Spina (Eds.),
          <source>Working Notes of CLEF 2025 - Conference and Labs of the Evaluation Forum, CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2025</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Khosla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Teterwak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sarna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Tian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Isola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Maschinot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Krishnan</surname>
          </string-name>
          ,
          <article-title>Supervised contrastive learning</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>33</volume>
          (
          <year>2020</year>
          )
          <fpage>18661</fpage>
          -
          <lpage>18673</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>P.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gao</surname>
          </string-name>
          , W. Chen, Deberta:
          <article-title>Decoding-enhanced bert with disentangled attention</article-title>
          , arXiv preprint arXiv:
          <year>2006</year>
          .
          <volume>03654</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Khan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Khan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Shah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Alvi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Samad</surname>
          </string-name>
          ,
          <article-title>Team gladiators at pan: improving author identification: a comparative analysis of pre-trained transformers for multi-author classification</article-title>
          , Working Notes of CLEF (
          <year>2024</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>Team nycu-nlp at pan 2024: integrating transformers with similarity adjustments for multi-author writing style analysis</article-title>
          ,
          <source>Working Notes of CLEF</source>
          (
          <year>2024</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>H.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <article-title>A writing style embedding based on contrastive learning for multi-author writing style analysis</article-title>
          .,
          <source>in: CLEF (Working Notes)</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>2562</fpage>
          -
          <lpage>2567</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lv</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Qi</surname>
          </string-name>
          ,
          <article-title>Team fosu-stu at pan: Supervised fine-tuning of large language models for multi author writing style analysis</article-title>
          ,
          <source>Working Notes of CLEF</source>
          (
          <year>2024</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>E. J.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Wallis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Allen-Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Chen</surname>
          </string-name>
          , et al.,
          <article-title>Lora: Low-rank adaptation of large language models</article-title>
          .
          <source>, ICLR</source>
          <volume>1</volume>
          (
          <year>2022</year>
          )
          <article-title>3</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>T.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kornblith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Norouzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Hinton</surname>
          </string-name>
          ,
          <article-title>A simple framework for contrastive learning of visual representations</article-title>
          ,
          <source>in: International conference on machine learning</source>
          ,
          <source>PmLR</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>1597</fpage>
          -
          <lpage>1607</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>