<!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>
      <journal-title-group>
        <journal-title>Conference and Labs of the Evaluation Forum, September</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Meta-Contrastive Learning for Generative AI Authorship Verification</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jiajun Lv</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yong Han</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leilei Kong</string-name>
          <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>2024</year>
      </pub-date>
      <volume>0</volume>
      <fpage>9</fpage>
      <lpage>12</lpage>
      <abstract>
        <p>This paper proposes a method that combines meta-learning and contrastive learning to address the task of Generative AI Authorship Verification. Our motivation is to leverage supervised contrastive learning to enhance the model's discriminative ability by optimizing the relationships between samples. Additionally, we employ the meta-learning algorithm Reptile to improve the generalization ability on out-of-domain data. Finally, we select the model weights that achieve the best performance on the validation set. We obtained an average score of 0.949 on the test set.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Authorship Verification</kwd>
        <kwd>Contrastive Learning</kwd>
        <kwd>Meta-learning</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>
        Since 2011, the PAN organization has been continuously organizing authorship verification tasks[ 7].
Unlike previous focuses on cross-discourse type authorship verification, PAN 2024 Authorship
Verification[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] aims to address whether generative AI authorship verification can be solved[ 8]. The
task requires participants to design classification methods to distinguish between human and
machinewritten texts.
      </p>
      <p>
        In recent work on generative AI detectors, fine-tuning language models and zero-shot learning
methods are predominant [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Zero-shot detectors do not require additional training through supervised
signals. Major methods include perplexity (PPL) [9], probability curvature [10], and likelihood ratio
ranking (LRR) [11]. Currently, supervised fine-tuning of pre-trained language models is very powerful
in natural language understanding [12]. Recent works [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][12][13] further confirm that fine-tuning
with pre-trained language models from the BERT family can outperform zero-shot methods in-domain.
      </p>
      <p>To further improve the detection capability of unknown models, contrastive learning has also been
applied to LLMs text checking. ConDA [13] proposed a contrastive domain adaptation framework
that combines domain adaptation with contrastive learning representations, enhancing the detector’s
performance on out-of-domain data. Reviewing last year’s authorship verification task, the first-place
team Ibrahim, M.et al[14] and the second-place team Guo, M. et al[15]. both adopted feature encoding
and contrastive learning concepts. From these methods, it is evident that contrastive learning might be
key to the authorship verification task.</p>
      <p>Inspired by [13][16][17], we propose a method that combines contrastive learning and Reptile
metalearning[18]. Contrastive learning, by learning the relative distances between samples, avoids mapping
texts to a single label. Unlike conventional fine-tuning methods, we use Reptile meta-learning to help
the model learn better feature representations, enhancing its generalization ability.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Method</title>
      <p>The goal of our model is to allow the model to learn the relative distance between samples on the same
topic, with diferent authors. Feeding  text into the model yields a soft label  that encodes the text,
the smaller the label value the more likely the text is to be judged as human-authored, and conversely
the more likely it is to be judged as AI-generated text.</p>
      <sec id="sec-3-1">
        <title>3.1. Contrastive Learning</title>
        <p>Our method revolves around constructing a training task  , where   is represented as a collection of
texts on the same topic written by diferent authors, denoted as {0+, −1 , −2 , . . . , − }. In this collection,
0+ is the only positive example, representing a human author, while −1 , . . . , − are negative examples,
representing AI-generated authors.</p>
        <p>The text  is input to the encoder, and the [] markers of the output vector of the last layer of
the encoder are taken as the representation  of the text, and we feed the obtained vector  to the
 activation function and the linear layer to obtain the soft labels  of the input text .
(1)
(2)
(3)
 = ()
ˆ =  (ℎ + ℎ)
where  ∈ Rℎ_× ℎ,ℎ ∈ Rℎ× 1, ℎ is the dimension of the hidden layer of the encoder, and  is
the bias of the fully connected layer. The  () is the nonlinear activation function  . We compute
the MarginRankingLoss loss function between numerical labels:</p>
        <p>= (0,  − (ˆ+ − ˆ− ))</p>
        <p>Where ˆ+ is the soft label for positive examples, ˆ− is the soft label for negative examples, and
 spacing boundaries, which indicates the minimum gap between two scores, and if the value is
larger, it means that it is expected that ˆ+ is further away from ˆ− .</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Reptile Meta-Learning</title>
        <p>We use the batch version of the algorithm, define slow weight as , first copy  model parameters as
fast weight denoted as  , use fast weight to sample n groups of training tasks on the training set to
train the updated model, get the updated ˆ, calculate the diference between ˆ and the diference of
parameter  as the gradient direction of updating , and carry out updating  to get 1 by repeated
iterations,During training, we adjust the parameter weights of DeBERTa and the linear classification
layer,reptile training algorithm1</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments</title>
      <sec id="sec-4-1">
        <title>4.1. Dataset statistics</title>
        <p>We perform sequence length statistics for each author’s data in the training dataset, as shown in Figure1.</p>
        <p>Analysing training data box plots
human
alpaca-7b
bloomz-7b1
alpaca-13b
gemini-pro
gpt-3.5-turb
th gpt-4-turbo
g
n
Le llama-2-7b
llama-2-70b</p>
        <p>mistral-7b
mixtral-8x7b
qwen1.5-72b
vicgalle-gpt2
text-bison
0
200
400
800
1000</p>
        <p>1200
600</p>
        <p>Author</p>
        <p>From the chart, it can be seen that the sequence length of the training dataset is around 500. Among
them, the sequence lengths of the alpaca-7b, chavinlo-alpaca-13b, and bigscience-bloomz-7b datasets
are significantly below the average.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Experimental setup</title>
        <p>In this study, we chose the DeBERTa-base[19] model as our pre-trained base model. We set the
hyperparameters as follows: the batch size is set to 16, the maximum sequence length is set to 512 (with
sequences longer than this being truncated), and the margin is set to 0.5. The initial learning rate is
set to 2e-5, and we train for 3 epochs. We use AdamW for optimization during each training session.
During the training phase, we use the oficially provided labeled dataset to train the model. To evaluate
the model’s performance across diferent domains, we use the HC3 dataset [ 20] during the validation
phase. The results of our model on our validation set Table1</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Result</title>
        <p>We selected the model with the best performance in validation, tested it on TIRA [9], and scored all test
tasks separately. The combined results for the test dataset are presented in the following Table3 and
Table 2.
5. Conclusions
In this paper, we propose a method combining contrastive learning and meta-learning to address the
task set by PAN: Voight-Kampf Generative AI Authorship Verification. Our proposed method achieved
scores of roc-auc: 0.98, brier: 0.945, c@1: 0.954, F1: 0.93, F0.5u: 0.935, and Mean: 0.949 on the leaderboard.
These results validate the efectiveness of our proposed method in the task of Generative AI Authorship
Verification.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This research was supported by the Natural Science Platforms and Projects of Guangdong Province
Ordinary Universities (KeyField Special Projects) (No. 2023ZDZX1023)
Generative AI Authorship Verification Task at PAN 2024, in: G. F. N. Ferro, P. Galuščáková, A. G. S.
de Herrera (Eds.), Working Notes of CLEF 2024 - Conference and Labs of the Evaluation Forum,
CEUR-WS.org, 2024.
[7] M. Fröbe, M. Wiegmann, N. Kolyada, B. Grahm, T. Elstner, F. Loebe, M. Hagen, B. Stein, M. Potthast,
Continuous Integration for Reproducible Shared Tasks with TIRA.io, in: J. Kamps, L. Goeuriot,
F. Crestani, M. Maistro, H. Joho, B. Davis, C. Gurrin, U. Kruschwitz, A. Caputo (Eds.), Advances
in Information Retrieval. 45th European Conference on IR Research (ECIR 2023), Lecture Notes
in Computer Science, Springer, Berlin Heidelberg New York, 2023, pp. 236–241. doi:10.1007/
978-3-031-28241-6_20.
[8] A. A. Ayele, N. Babakov, J. Bevendorf, X. B. Casals, B. Chulvi, D. Dementieva, A. Elnagar, D. Freitag,
M. Fröbe, D. Korenčić, M. Mayerl, D. Moskovskiy, A. Mukherjee, A. Panchenko, M. Potthast,
F. Rangel, N. Rizwan, P. Rosso, F. Schneider, A. Smirnova, E. Stamatatos, E. Stakovskii, B. Stein,
M. Taulé, D. Ustalov, X. Wang, M. Wiegmann, S. M. Yimam, E. Zangerle, Overview of PAN 2024:
Multi-Author Writing Style Analysis, Multilingual Text Detoxification, Oppositional Thinking
Analysis, and Generative AI Authorship Verification, in: L. Goeuriot, P. Mulhem, G. Quénot,
D. Schwab, L. Soulier, G. M. D. Nunzio, P. Galuščáková, A. G. S. de Herrera, G. Faggioli, N. Ferro
(Eds.), Experimental IR Meets Multilinguality, Multimodality, and Interaction. Proceedings of
the Fifteenth International Conference of the CLEF Association (CLEF 2024), Lecture Notes in
Computer Science, Springer, Berlin Heidelberg New York, 2024.
[9] Y. Arase, M. Zhou, Machine translation detection from monolingual web-text, in: Proceedings
of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long
Papers), 2013, pp. 1597–1607.
[10] E. Mitchell, Y. Lee, A. Khazatsky, C. D. Manning, C. Finn, Detectgpt: Zero-shot machine-generated
text detection using probability curvature, in: International Conference on Machine Learning,
PMLR, 2023, pp. 24950–24962.
[11] J. Su, T. Y. Zhuo, D. Wang, P. Nakov, Detectllm: Leveraging log rank information for zero-shot
detection of machine-generated text, arXiv preprint arXiv:2306.05540 (2023).
[12] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, et al., Language models are
unsupervised multitask learners, OpenAI blog 1 (2019) 9.
[13] A. Bhattacharjee, T. Kumarage, R. Morafah, H. Liu, Conda: Contrastive domain adaptation for
ai-generated text detection, arXiv preprint arXiv:2309.03992 (2023).
[14] M. Ibrahim, A. Akram, M. Radwan, R. Ayman, M. Abd-El-Hameed, N. El-Makky, M. Torki,
Enhancing Authorship Verification using Sentence-Transformers, in: M. Aliannejadi, G. Faggioli,
N. Ferro, M. Vlachos (Eds.), Working Notes of CLEF 2023 - Conference and Labs of the Evaluation
Forum, CEUR-WS.org, 2023, pp. 2640–2651. URL: https://ceur-ws.org/Vol-3497/paper-216.pdf.
[15] M. Guo, Z. Han, H. Chen, H. Qi, A contrastive learning of sample pairs for authorship verification,</p>
      <p>Working Notes of CLEF (2023).
[16] M. Boudiaf, J. Rony, I. M. Ziko, E. Granger, M. Pedersoli, P. Piantanida, I. B. Ayed, A unifying
mutual information view of metric learning: cross-entropy vs. pairwise losses, in: European
conference on computer vision, Springer, 2020, pp. 548–564.
[17] T. Chen, S. Kornblith, M. Norouzi, G. Hinton, A simple framework for contrastive learning of
visual representations, 2020. arXiv:2002.05709.
[18] A. Nichol, J. Achiam, J. Schulman, On first-order meta-learning algorithms, arXiv preprint
arXiv:1803.02999 (2018).
[19] P. He, X. Liu, J. Gao, W. Chen, Deberta: Decoding-enhanced bert with disentangled attention,
arXiv preprint arXiv:2006.03654 (2020).
[20] B. Guo, X. Zhang, Z. Wang, M. Jiang, J. Nie, Y. Ding, J. Yue, Y. Wu, How close is chatgpt to human
experts? comparison corpus, evaluation, and detection, arXiv preprint arXiv:2301.07597 (2023).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Extance</surname>
          </string-name>
          ,
          <article-title>Chatgpt has entered the classroom: how llms could transform education</article-title>
          ,
          <source>Nature</source>
          <volume>623</volume>
          (
          <year>2023</year>
          )
          <fpage>474</fpage>
          -
          <lpage>477</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>L.</given-names>
            <surname>Weidinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mellor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rauh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Grifin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Uesato</surname>
          </string-name>
          , P.-S. Huang, M. Cheng, M. Glaese,
          <string-name>
            <given-names>B.</given-names>
            <surname>Balle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kasirzadeh</surname>
          </string-name>
          , et al.,
          <article-title>Ethical and social risks of harm from language models</article-title>
          ,
          <source>arXiv preprint arXiv:2112.04359</source>
          (
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Zhan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Wong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. S.</given-names>
            <surname>Chao</surname>
          </string-name>
          ,
          <article-title>A survey on llm-gernerated text detection: Necessity, methods, and future directions</article-title>
          ,
          <source>arXiv preprint arXiv:2310.14724</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Bevendorf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X. B.</given-names>
            <surname>Casals</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Chulvi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dementieva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Elnagar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Freitag</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fröbe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Korenčić</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mayerl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mukherjee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Panchenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Potthast</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Rangel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Smirnova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Stamatatos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Stein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Taulé</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Ustalov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wiegmann</surname>
          </string-name>
          , E. Zangerle,
          <article-title>Overview of PAN 2024: Multi-Author Writing Style Analysis, Multilingual Text Detoxification, Oppositional Thinking Analysis, and Generative AI Authorship Verification</article-title>
          , in: L.
          <string-name>
            <surname>Goeuriot</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Mulhem</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Quénot</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Schwab</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Soulier</surname>
          </string-name>
          ,
          <string-name>
            <surname>G. M. D. Nunzio</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Galuščáková</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. G. S. de Herrera</surname>
          </string-name>
          , G. Faggioli, N. Ferro (Eds.),
          <source>Experimental IR Meets Multilinguality, Multimodality, and Interaction. Proceedings of the Fifteenth International Conference of the CLEF Association (CLEF</source>
          <year>2024</year>
          ), Lecture Notes in Computer Science, Springer, Berlin Heidelberg New York,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T.</given-names>
            <surname>Hospedales</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Antoniou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Micaelli</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Storkey,
          <article-title>Meta-learning in neural networks: A survey</article-title>
          ,
          <source>IEEE transactions on pattern analysis and machine intelligence</source>
          <volume>44</volume>
          (
          <year>2021</year>
          )
          <fpage>5149</fpage>
          -
          <lpage>5169</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Bevendorf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wiegmann</surname>
          </string-name>
          , E. Stamatatos,
          <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 Voight-Kampf</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>