<!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>Embedding-based classifiers can detect prompt injection attacks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Md. Ahsan Ayub</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Subhabrata Majumdar</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Enterprise Cybersecurity, Vanderbilt University Medical Center</institution>
          ,
          <addr-line>Nashville, TN</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Vijil</institution>
          ,
          <addr-line>Seattle, WA</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Large Language Models (LLMs) are seeing significant adoption in every type of organization due to their exceptional generative capabilities. However, LLMs are found to be vulnerable to various adversarial attacks, particularly prompt injection attacks, which trick them into producing harmful or inappropriate content. Adversaries execute such attacks by crafting malicious prompts to deceive the LLMs. In this paper, we propose a novel approach based on embedding-based Machine Learning (ML) classifiers to protect LLM-based applications against this severe threat. We leverage three commonly used embedding models to generate embeddings of malicious and benign prompts and utilize ML classifiers to predict whether an input prompt is malicious. Out of several traditional ML methods, we achieve the best performance with classifiers built using Random Forest and XGBoost. Our classifiers outperform state-of-the-art prompt injection classifiers available in open-source implementations, which use encoder-only neural networks. Warning: This paper discusses and contains language that could be considered inappropriate for readers.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;adversarial attacks</kwd>
        <kwd>embeddings</kwd>
        <kwd>large language models</kwd>
        <kwd>machine learning</kwd>
        <kwd>prompt injection</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>• Using the embeddings as input datasets, we build a suite of supervised machine learning (ML)
classifiers to detect prompt injection attacks.
• Across several metrics, we compare the performance of embedding-based classifiers’ with
stateof-the-art deep learning based prompt injection classifiers.</p>
      <p>Our implementation, along with the curated datasets used for evaluation, is available on GitHub1.</p>
      <p>The rest of the paper is organized as follows: Section 2 discusses the background of our research. The
discussion of experimental methodology, including the construction of the dataset, and our empirical
ifndings are described in Sections 3 and 4, respectively. We share the related work in this field in Section
5 and list the limitations of our study, as well as future work, in Section 6. Finally, we provide the
conclusion of this work in Section 7.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background and Related Work</title>
      <p>This section describes some background and related work, as context for the subsequent sections.</p>
      <sec id="sec-2-1">
        <title>2.1. Prompt Injection Attacks</title>
        <p>
          SQL injections and Cross-Site Scripting (XSS) attacks are among the most commonly found cyber
threats, where attackers craft payloads to disrupt the routine execution of a program [
          <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
          ]. With
the proliferation of genAI, adversaries can carry out similar attacks by injecting LLMs with malicious
prompts. In genAI applications, users can utilize the extensible functionalities of LLMs via natural
language-based prompts to generate desired outputs. Attackers exploit this interaction pattern by
supplying crafted prompts to cause LLMs to perform undesired actions [
          <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
          ]. These malicious
prompts can be supplied as inputs either by as malicious users, or by attackers modifying benign
user-provided prompts through man-in-the-middle attacks. A successful prompt injection attack leads
to unintended consequences, such as the exposure of underlying system prompts, disclosure of private
data, and attackers gaining unauthorized access to functionalities the LLM is authorized to perform but
the user is not [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
        <p>
          Another example of such attacks is when an LLM takes input from external sources, such as websites
or files—adversaries inject malicious prompts to hijack the context. This is known as an indirect prompt
injection attack. The goal of this attack is to extract sensitive, harmful, or unwanted information from
the LLMs [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. Real attackers do not need to possess deep technical knowledge about how the model is
built, or compute gradients, to trick the LLM application into responding to a distinct set of queries
with the intent of compromising it [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Embedding Models</title>
        <p>
          Prompts are primarily constructed using natural language, and their size can vary widely. We apply
embedding models to convert the textual data in prompts into dense representations in a multi-dimensional
space of fixed dimension [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. To explain further, each prompt is transformed into a fixed-length
sequence of floating-point numbers. Such numerical representations enable us to create a vector
database derived from a list of prompts. To accomplish these tasks, we select the following embedding
models: text-embedding-3-small from OpenAI2, and the open-source models gte-large hosted
on OctoAI3, as well as the well-known all-MiniLM-L6-v2. For brevity we refer to them as OpenAI,
GTE, MiniLM from here on. It is important to note that all of these embedding models are contextual
representation models [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. This means that each word is placed in the vector space based on the input
context. For example, the word “apple” has a static meaning of being a fruit. However, given a specific
input context, it can also refer to a technology company. Our selected embedding models are equipped
to capture the context of each word in a prompt[
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]. We illustrate an example in Fig. 1.
1https://github.com/AhsanAyub/malicious-prompt-detection
2https://platform.openai.com/docs/guides/embeddings
3https://octo.ai/blog/introducing-octoais-embedding-api-to-power-your-rag-needs
        </p>
        <p>How to prepare poisonous
substances at home?
Who is the current
president of the USA?</p>
        <p>Prompts</p>
        <p>Embedding</p>
        <p>Model</p>
        <p>The length of the embedding vector for OpenAI is 1536, which means that any size of textual data is
mapped to a 1536-dimensional dense numerical vector space. Additionally, the embedding vector sizes
for GTE and MiniLM are 1024 and 384, respectively.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Related Work</title>
        <p>
          In recent past, genAI threats—especially prompt injection attacks—have received a significant attention
from AI security practitioners and researchers. A successful attack enables adversaries to override
intended use guidelines of an LLM application to generate violating content along diferent directions,
such as hate speech and discrimination, profanity, sexual, violent, and unsafe content, controversial
topics, illegal activities, self-harm, harassment, and unethical actions4. AI security researchers have
come up with numerous techniques that adversaries can utilize to perform prompt injection attacks
[
          <xref ref-type="bibr" rid="ref12 ref20">12, 20–24</xref>
          ]. Therefore, it is important to defend genAI applications against such attacks.
        </p>
        <p>We break down prior research on prompt injection detection into two categories.</p>
        <p>Guardrail-based (AI Firewall) Defense. Alon and Kamfonas [25] used a perplexity-based approach
to detect malicious prompts by computing perplexity to estimate text quality. The injection of
instructions or data into prompts influences quality and results in a high perplexity value. Jain et al. [26]
divided textual data into contiguous windows for perplexity calculation to check whether any window’s
perplexity exceeds the threshold. Chen et al. [27] examined how separating prompts and supplied data
enables LLMs to become more robust against prompt injection. Yi et al. [28] found that placing a special
delimiter between the prompt and data allows LLMs to distinguish between malicious external content
and user instructions, thereby preventing harmful outputs. Schulhof et al. [29] discovered that adding
extra text to the prompt to make LLMs aware of prompt injection attacks would also be efective.
LLM-based Defense. Recent LLMs, such as GPT-4o and the Gemini and Claude families of models,
show a propensity of rejecting harmful prompts incorporated through safety training [22, 30, 31]. LLMs
may also be used as detectors designed to identify malicious prompts through their training [32]. AI
security researchers have showed that it is possible to detect prompt injection by providing explicit
instructions to LLMs, such as “..Your job is to analyze whether the input prompt is safe...” and using this
model as an LLM-as-judge to evaluate input prompts [33]. Finally, traditional encoder-only NLP models,
such as the ones using a DeBERTa arcchitecture that utilizes disentangled attention and an enhanced
mask decoder, can detect prompt injection and jailbreak attacks [34, 35].
4https://www.robustintelligence.com/ai-security-and-safety-taxonomy
Our Approach. To the best of our knowledge, our study is the first attempt to investigate the
efectiveness of embedding-based classifiers in detecting malicious prompts. Although a lot of work has
already been published in this area, we did not find any research on embeddings of malicious prompts
and their eficacy in leading to successful detection. We hope that this research will make singnificant
contribution to the AI safety and security domain by extending and reproducing our experiments.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Methodology</title>
      <sec id="sec-3-1">
        <title>3.1. Dataset Construction</title>
        <p>The dataset used in our experiments is curated from open-source datasets containing malicious and
benign prompts pertaining to prompt injection attacks (Table 1). In total, we acquire a total of 553,185
numbers of malicious and benign prompts. After deduplication, we end up with a total of 467,057
unique prompts, of which 109,934 (23.54%) are malicious. Each prompt is assigned a unique identifier
and a source to indicate its origin. Therefore, the dataset columns appear as follows: ID, Source, Text,
and Label (0 to denote benign, 1 for malicious). Using the train_text_split method5, we split this
dataset into 80% training and 20% test sets. To ensure equal proportion of the malicious and benign
labels across splits, we use stratified sampling.</p>
        <p>We develop a data pipeline using Python 3.11 to generate the embeddings for all prompts. With
OpenAI’s API key, we submit each prompt to get its embedding through text-embedding-3-small
model. To obtain the GTE embeddings, we use the thenlper/gte-large model6, accessed
remotely through the serverless endpoint on OctoAI. For the MiniLM embeddings, we download the
sentence-transformers/all-MiniLM-L6-v27 model and host it locally. This approach allowed
us to construct three separate tabular datasets composed of embeddings based on each of the embedding
models.</p>
        <p>Embeddings consist of fixed-length numerical representations. Therefore, we convert them into
column values from lists. For instance, OpenAI generates an embedding vector consisting of 1,536
lfoating-point numbers for each prompt. We organize these numbers into 1,536 columns, treating each
vector item as a separate column value. Consequently, the final embedding dataset generated by OpenAI
comprises 1,539 features, with ID, Source, and Label as additional columns. Similarly, the embedding
datasets for OctoAI and MiniLM consist of 1,027 and 387 features, respectively.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Experimental Setup</title>
        <p>Methodology to Address RQ1: Visualization of Embeddings after Dimension Reduction. The
embeddings provide us with high-dimensional tabular datasets. We apply Principal Component Analysis
(PCA) [36], t-Distributed Stochastic Neighbor Embedding (t-SNE) [37], and Uniform Manifold
Approximation and Projection (UMAP) [38] to reduce these dense data distributions to a two-dimensional plane
5https://huggingface.co/docs/datasets/v1.8.0/processing.html#splitting-the-dataset-in-train-and-test-split-train-test-split
6https://huggingface.co/thenlper/gte-large
7https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
for visualization. This approach will help us investigate whether there are clear decision boundaries
that can separate malicious prompts from benign ones.</p>
        <p>We start our analysis with PCA, a linear dimensionality reduction approach using Singular Value
Decomposition of the data [39]. We employ sklearn [40], a Python machine learning package, to
apply PCA and project the embedding-based columns into a 2-dimensional space.</p>
        <p>Next, we use t-SNE to visualize our high-dimensional embedding distributions. It uses a nonlinear
dimensionality reduction technique, unlike PCA. Similar to PCA, we use sklearn to execute the tasks.
One of the major hypermeters of this algorithm is “perplexity”, which is a guess about the number of
close neighbors each point has [41]. Typically, its suggested values range between 5 and 50.</p>
        <p>Finally, we examine the visualizations obtained using UMAP, which is based on manifold theory [42].
It seeks a low-dimensional representation of embeddings with an equivalent fuzzy topological structure.
The algorithm operates in two phases: first, constructing a weighted k-nearest neighbor graph, and
second, computing a low-dimensional layout of this graph. Variations among algorithms in this class lie
in the specific methods used for graph construction and layout computation [ 38]. We utilize its Python
package to run our experiments8.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Methodology to Address RQ2: Binary Classification. To detect the malicious prompts, we train</title>
        <p>classifiers using three traditional ML methods: Logistic Regression [ 43], eXtreme Gradient Boosting
(XGBoost) [44], and Random Forest [45]. We use sklearn to apply Logistic Regression and Random Forest.
To implement XGBoost9, we use its corresponding Python package to run experiments. The goal of
employing these classifiers is to train them on the train splits of each embedding dataset, encompassing
both benign and malicious prompts, enabling the algorithms to discern underlying patterns. We evaluate
the out-of-sample eficacy of each classifier on the test splits of the respective embedding datasets.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>In this section, we report the findings of our experiments.</p>
      <sec id="sec-4-1">
        <title>4.1. Answer to RQ1: Are benign and malicious prompts dissimilar in the embedding space?</title>
        <p>The first phase of our experiments is centered around visualizing the low-dimensional projections of
the embeddings, generated using PCA, t-SNE, and UMAP. With details provided in Table 2, we capture
12.62% to 15.83% and 10.83% to 11.43% of the information for all three embeddings through PCA with
the 1st and 2nd Principal Components, respectively. We present the visualizations of OpenAI, OctoAI,
and MiniLM embeddings after applying PCA in Fig. 2. For t-SNE, our experiments involve investigating
visualizations using perplexity values ranging from 5 to 50. We achieve the most well-separated clusters
by selecting a perplexity of 15 (Fig. 3). Lastly, we depict the visualizations of all three embeddings after
applying UMAP in Fig. 4.</p>
        <p>As seen in the three plots, we do not find clear separations between benign and malicious data points.
Especially, linear or sigmoid separations are not observed between red and blue clusters. This indicates
that tree-based and/or gradient boosting algorithms will be better suited to separate the malicious data</p>
        <sec id="sec-4-1-1">
          <title>8https://umap-learn.readthedocs.io/en/latest/basic_usage.html 9https://xgboost.readthedocs.io/en/stable/python/index.html</title>
          <p>Benign
Malicious
Benign
Malicious
0.1
0.0
10
5
points compared to methods based on the linearity assumption, such as logistic regression and linear
discriminant analysis.</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Answer to RQ2: Can we efectively identify malicious prompts to thwart prompt injection attacks?</title>
        <p>As mentioned in the earlier section, we employ Logistic Regression, XGBoost, and Random Forest
classifiers for performing binary classification tasks. We maintain the size of all embeddings consistently
for both training and testing purposes. Initially, we report their performances in terms of AUC (Area
under the ROC Curve). The AUC value ranges between 0 and 1 —the higher the value, the better a
classifier’s prediction capability. For example, a classifier with perfect predictions would have an AUC
of 1. Table 3 presents the AUC values for all classifiers across diferent embeddings. We observe that
Random Forest consistently outperforms the other two classifiers under all experimental settings. Among
the embeddings methods, OpenAI performs the best—possibly owing to its higher dimensionality.</p>
        <p>Using default binary predictions from the ML classifiers, we also compute precision, recall, and F1
scores, which also range between 0 and 1.</p>
        <p>Precision =
Recall =</p>
        <sec id="sec-4-2-1">
          <title>True Positive</title>
          <p>True Positive + False Positive</p>
        </sec>
        <sec id="sec-4-2-2">
          <title>True Positive</title>
          <p>True Positive + False Negative</p>
          <p>Precision × Recall</p>
          <p>F1 = 2 × Precision + Recall</p>
          <p>Similar to AUC, Random Forest performs the best compared to XGBoost and Logistic Regression,
as highlighted in Table 4. For instance, the precision and recall scores of Random Forest for OpenAI
embeddings are 86.65% and 86.96%, respectively, which are up to 3% higher than XGBoost and 6% higher
than Logistic Regression. Similar results are observed for the other two embeddings as well. Therefore,
the Random Forest algorithm is identified as the best classifier in our study.</p>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>Comparison with State-of-the-Art Classifiers. We compare the performances of our embedding</title>
        <p>based classifiers with four state-of-the-art deep learning classifiers available on Hugging Face. To begin
describing each classifier, Tunstall et al. [46] released their Sentence Transformer model on Hugging
Face as Myadav: setfit-prompt-injection-MiniLM-L3-v2 10 for text classification. The scond classifier
we compared with is protectai: deberta-v3-base-prompt-injection, which is based on DeBERTaV3 [47]
and was released in 202311. We also compare against protectai: deberta-v3-base-prompt-injection-v2, an
updated version of the above model based on optimization of hyperparameters, training regimens, and
dataset compositions12. Finally, we compare against another popular finetune of DeBERTaV3 called
deepset: deberta-v3-base-injection13. We examine the performances of all four classifiers using AUC,
precision, and recall scores on our test dataset including both malicious and benign prompts.
10https://huggingface.co/Myadav/setfit-prompt-injection-MiniLM-L3-v2
11https://huggingface.co/protectai/deberta-v3-base-prompt-injection
12https://huggingface.co/protectai/deberta-v3-base-prompt-injection-v2
13https://huggingface.co/deepset/deberta-v3-base-injection</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion and Conclusion</title>
      <p>In this paper, we propose a novel embedding-based classifier approach to detect malicious prompts that
lead to successful prompt injection. We curate a large dataset of benign and malicious prompts from
several repositories on Hugging Face and generate their embeddings using three methods. Through
twodimensional visualizations, we investigate the distributional diferences of embeddings labeled benign
and malicious and perform binary classification tasks using a number of supervised ML classifiers. The
Random Forest classifier trained using OpenAI embeddings exhibits the best performance, achieving an
AUC of 0.764, precision of 0.867, and recall of 0.87. Comparing our classifier’s performance with several
SoTA prompt injection available on Hugging Face designed for similar tasks. Our results demonstrate
that our classifier surpasses all of them in terms of AUC and precision scores.</p>
      <p>One of the main goals of this paper was to investigate the dissimilarities between embeddings of
malicious and benign prompts using dimensionality reduction algorithms. However, we did not find a
clear linear separation in the generated visualizations. While we leave further exploration for future
work, we did achieve commendable performance in detecting prompt injections via traditional ML
classifiers trained on these embeddings. Especially, the random forest classifier was able to outperform
the most popular and highest performant models available in the open source.</p>
      <p>Our study examines the eficacy of traditional ML classifiers. Neural network-based classifiers may
also be constructed based on embeddings. This needs to be explored in future work. Our research has
primarily focused on crafting classifiers to detect direct prompt injections. A similar approach can also
be taken to craft embedding-based detectors for other LLM attack vectors and failure modes, which are
indirect prompt injections, toxicity, and hallucination.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>We thank the CAMLIS program committee and reviewers for reviewing the paper and sharing valuable
feedback that led to significant improvements.
[21] X. Shen, Z. Chen, M. Backes, Y. Shen, Y. Zhang, " do anything now": Characterizing and evaluating
in-the-wild jailbreak prompts on large language models, arXiv preprint arXiv:2308.03825 (2023).
[22] A. Wei, N. Haghtalab, J. Steinhardt, Jailbroken: How does llm safety training fail?, Advances in</p>
      <p>Neural Information Processing Systems 36 (2024).
[23] M. Samvelyan, S. C. Raparthy, A. Lupu, E. Hambro, A. H. Markosyan, M. Bhatt, Y. Mao, M. Jiang,
J. Parker-Holder, J. Foerster, et al., Rainbow teaming: Open-ended generation of diverse adversarial
prompts, arXiv preprint arXiv:2402.16822 (2024).
[24] Y. Bai, G. Pei, J. Gu, Y. Yang, X. Ma, Special characters attack: Toward scalable training data
extraction from large language models, arXiv preprint arXiv:2405.05990 (2024).
[25] G. Alon, M. Kamfonas, Detecting language model attacks with perplexity, arXiv preprint
arXiv:2308.14132 (2023).
[26] N. Jain, A. Schwarzschild, Y. Wen, G. Somepalli, J. Kirchenbauer, P.-y. Chiang, M. Goldblum,
A. Saha, J. Geiping, T. Goldstein, Baseline defenses for adversarial attacks against aligned language
models, arXiv preprint arXiv:2309.00614 (2023).
[27] S. Chen, J. Piet, C. Sitawarin, D. Wagner, Struq: Defending against prompt injection with structured
queries, arXiv preprint arXiv:2402.06363 (2024).
[28] J. Yi, Y. Xie, B. Zhu, K. Hines, E. Kiciman, G. Sun, X. Xie, F. Wu, Benchmarking and defending
against indirect prompt injection attacks on large language models, arXiv preprint arXiv:2312.14197
(2023).
[29] S. Schulhof, J. Pinto, A. Khan, L.-F. Bouchard, C. Si, S. Anati, V. Tagliabue, A. Kost, C. Carnahan,
J. Boyd-Graber, Ignore this title and hackaprompt: Exposing systemic vulnerabilities of llms
through a global prompt hacking competition, in: Proceedings of the 2023 Conference on Empirical
Methods in Natural Language Processing, 2023, pp. 4945–4977.
[30] J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt,</p>
      <p>S. Altman, S. Anadkat, et al., Gpt-4 technical report, arXiv preprint arXiv:2303.08774 (2023).
[31] D. Ganguli, L. Lovitt, J. Kernion, A. Askell, Y. Bai, S. Kadavath, B. Mann, E. Perez, N. Schiefer,
K. Ndousse, et al., Red teaming language models to reduce harms: Methods, scaling behaviors,
and lessons learned, arXiv preprint arXiv:2209.07858 (2022).
[32] N. Belrose, Z. Furman, L. Smith, D. Halawi, I. Ostrovsky, L. McKinney, S. Biderman, J. Steinhardt,
Eliciting latent predictions from transformers with the tuned lens, arXiv preprint arXiv:2303.08112
(2023).
[33] S. Armstrong, R. Gorman, Using gpt-eliezer against chatgpt jailbreaking. 2022, URL https://www.
alignmentforum. org/posts/pNcFYZnPdXyL2RfgA/using-gpt-eliezer-against-chatgpt-jailbreaking
5 (????).
[34] ProtectAI.com, Fine-tuned deberta-v3-base for prompt injection detection, 2024. URL: https://
huggingface.co/ProtectAI/deberta-v3-base-prompt-injection-v2.
[35] Meta, Model card - prompt guard, 2024. URL: https://huggingface.co/meta-llama/</p>
      <p>Prompt-Guard-86M.
[36] H. Abdi, L. J. Williams, Principal component analysis, Wiley interdisciplinary reviews:
computational statistics 2 (2010) 433–459.
[37] L. Van der Maaten, G. Hinton, Visualizing data using t-sne., Journal of machine learning research
9 (2008).
[38] L. McInnes, J. Healy, J. Melville, Umap: Uniform manifold approximation and projection for
dimension reduction, arXiv preprint arXiv:1802.03426 (2018).
[39] G. W. Stewart, On the early history of the singular value decomposition, SIAM review 35 (1993)
551–566.
[40] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer,
R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, E. Duchesnay,
Scikit-learn: Machine learning in Python, Journal of Machine Learning Research 12 (2011) 2825–
2830.
[41] M. Wattenberg, F. Viégas, I. Johnson, How to use t-sne efectively, Distill 1 (2016) e2.
[42] S. Mac Lane, Categories for the working mathematician, volume 5, Springer Science &amp; Business</p>
      <p>Media, 2013.
[43] M. Schmidt, N. Le Roux, F. Bach, Minimizing finite sums with the stochastic average gradient,</p>
      <p>Mathematical Programming 162 (2017) 83–112.
[44] T. Chen, C. Guestrin, Xgboost: A scalable tree boosting system, in: Proceedings of the 22nd acm
sigkdd international conference on knowledge discovery and data mining, 2016, pp. 785–794.
[45] L. Breiman, Random forests, Machine learning 45 (2001) 5–32.
[46] L. Tunstall, N. Reimers, U. E. S. Jo, L. Bates, D. Korat, M. Wasserblat, O. Pereg, Eficient few-shot
learning without prompts, arXiv preprint arXiv:2209.11055 (2022).
[47] P. He, X. Liu, J. Gao, W. Chen, Deberta: Decoding-enhanced bert with disentangled attention,
arXiv preprint arXiv:2006.03654 (2020).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Tang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.-N.</given-names>
            <surname>Chuang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <article-title>The science of detecting llm-generated texts</article-title>
          ,
          <source>arXiv preprint arXiv:2303.07205</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. S.</given-names>
            <surname>Xia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>L. Zhang,</surname>
          </string-name>
          <article-title>Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation</article-title>
          ,
          <source>Advances in Neural Information Processing Systems</source>
          <volume>36</volume>
          (
          <year>2024</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Goyal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Iyyer</surname>
          </string-name>
          ,
          <article-title>Booookscore: A systematic exploration of book-length summarization in the era of llms</article-title>
          ,
          <source>arXiv preprint arXiv:2310.00785</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>B.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. Ali</given-names>
            <surname>Babar</surname>
          </string-name>
          , X.-Y. Liu,
          <article-title>Enhancing financial sentiment analysis via retrieval augmented large language models</article-title>
          ,
          <source>in: Proceedings of the Fourth ACM International Conference on AI in Finance</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>349</fpage>
          -
          <lpage>356</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J. K.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chua</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rickard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lorenzo</surname>
          </string-name>
          ,
          <article-title>Chatgpt and large language model (llm) chatbots: The current state of acceptability and a proposal for guidelines on utilization in academic medicine</article-title>
          ,
          <source>Journal of Pediatric Urology</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Z.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Liang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Jiao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Tu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Exploring human-like translation strategy with large language models</article-title>
          ,
          <source>Transactions of the Association for Computational Linguistics</source>
          <volume>12</volume>
          (
          <year>2024</year>
          )
          <fpage>229</fpage>
          -
          <lpage>246</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T. Y.</given-names>
            <surname>Zhuo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xing</surname>
          </string-name>
          ,
          <article-title>Exploring ai ethics of chatgpt: A diagnostic analysis</article-title>
          ,
          <source>arXiv preprint arXiv:2301.12867</source>
          <volume>10</volume>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P.</given-names>
            <surname>Liang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bommasani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Tsipras</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Soylu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Yasunaga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Narayanan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kumar</surname>
          </string-name>
          , et al.,
          <article-title>Holistic evaluation of language models</article-title>
          ,
          <source>arXiv preprint arXiv:2211.09110</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ndousse</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Askell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chen</surname>
          </string-name>
          , N. DasSarma,
          <string-name>
            <given-names>D.</given-names>
            <surname>Drain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Fort</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Ganguli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Henighan</surname>
          </string-name>
          , et al.,
          <article-title>Training a helpful and harmless assistant with reinforcement learning from human feedback</article-title>
          ,
          <source>arXiv preprint arXiv:2204.05862</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S. W.</given-names>
            <surname>Boyd</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Keromytis</surname>
          </string-name>
          , Sqlrand:
          <article-title>Preventing sql injection attacks</article-title>
          , in: Applied Cryptography and Network Security: Second International Conference, ACNS 2004,
          <string-name>
            <given-names>Yellow</given-names>
            <surname>Mountain</surname>
          </string-name>
          , China, June 8-11,
          <year>2004</year>
          . Proceedings 2, Springer,
          <year>2004</year>
          , pp.
          <fpage>292</fpage>
          -
          <lpage>302</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>S.</given-names>
            <surname>Gupta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. B.</given-names>
            <surname>Gupta</surname>
          </string-name>
          ,
          <article-title>Cross-site scripting (xss) attacks and defense mechanisms: classification and state-of-the-</article-title>
          <string-name>
            <surname>art</surname>
          </string-name>
          ,
          <source>International Journal of System Assurance Engineering and Management</source>
          <volume>8</volume>
          (
          <year>2017</year>
          )
          <fpage>512</fpage>
          -
          <lpage>530</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>F.</given-names>
            <surname>Perez</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Ribeiro</surname>
          </string-name>
          ,
          <article-title>Ignore previous prompt: Attack techniques for language models</article-title>
          ,
          <source>in: NeurIPS ML Safety Workshop</source>
          ,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Shu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xing</surname>
          </string-name>
          ,
          <article-title>Assessing prompt injection risks in 200+ custom gpts</article-title>
          ,
          <source>arXiv preprint arXiv:2311.11538</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          , G. Deng,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , Y. Liu,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zheng</surname>
          </string-name>
          , Y. Liu,
          <article-title>Prompt injection attack against llm-integrated applications</article-title>
          ,
          <source>arXiv preprint arXiv:2306.05499</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>K.</given-names>
            <surname>Greshake</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Abdelnabi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mishra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Endres</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Holz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fritz</surname>
          </string-name>
          ,
          <article-title>Not what you've signed up for: Compromising real-world llm-integrated applications with indirect prompt injection</article-title>
          ,
          <source>in: Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>79</fpage>
          -
          <lpage>90</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>G.</given-names>
            <surname>Apruzzese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. S.</given-names>
            <surname>Anderson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dambra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Freeman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pierazzi</surname>
          </string-name>
          , K. Roundy, “
          <article-title>real attackers don't compute gradients”: bridging the gap between adversarial ml research and practice</article-title>
          ,
          <source>in: 2023 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML)</source>
          , IEEE,
          <year>2023</year>
          , pp.
          <fpage>339</fpage>
          -
          <lpage>364</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>A.</given-names>
            <surname>Neelakantan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Puri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Radford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J</given-names>
            .
            <surname>Tworek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Tezak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. W.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hallacy</surname>
          </string-name>
          , et al.,
          <article-title>Text and code embeddings by contrastive pre-training</article-title>
          ,
          <source>arXiv preprint arXiv:2201.10005</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>N. F.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gardner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Belinkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. E.</given-names>
            <surname>Peters</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. A.</given-names>
            <surname>Smith,</surname>
          </string-name>
          <article-title>Linguistic knowledge and transferability of contextual representations</article-title>
          , arXiv preprint arXiv:
          <year>1903</year>
          .
          <volume>08855</volume>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Asudani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. K.</given-names>
            <surname>Nagwani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Impact of word embedding models on text analytics in deep learning environment: a review</article-title>
          ,
          <source>Artificial intelligence review 56</source>
          (
          <year>2023</year>
          )
          <fpage>10345</fpage>
          -
          <lpage>10425</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>D.</given-names>
            <surname>Kang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Stoica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Guestrin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zaharia</surname>
          </string-name>
          , T. Hashimoto,
          <article-title>Exploiting programmatic behavior of llms: Dual-use through standard security attacks</article-title>
          ,
          <source>arXiv preprint arXiv:2302.05733</source>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>