
【CODE BLUE 2024】シアンヤオ・エリック・ホワン+チェンリン・ヤン+エンシャン・チェン / Sian-Yao Eric Huang+Cheng-Lin Yang+Yen-Shan Chen - 講演関連資料 / Presentation resources -
●講演概要 / Abstract
[ja] BullyRAG:多視点RAGロバストネス評価フレームワーク
検索拡張生成(RAG:Retrieval-Augmented Generation)システムは、検索メカニズムを組み合わせて大規模言語モデル(LLM)の推論能力を強化し、学習データを超えた応答を可能にする。しかし、RAGシステムのロバスト性(頑健性)は未解決の課題である。われわれのRAGシステムは、さまざまな攻撃に対して有害または無意味な応答を回避するのに十分なロバスト性を持っているのだろうか?
本研究では、RAGシステムの広範なアタックサーフェスに焦点を当て、攻撃者が検索フェーズやLLM生成フェーズをどのように操作できるかを探る。例えば、攻撃者が情報をあいまいにして検索器(Reriever)のミスリードを誘い、LLMに誤った回答を生成させたり、LLMの選好を悪用して有害な情報を参照させたりすることが考えられる。不正確な回答にとどまらず、フィッシングリンクを参照リンクに偽装するなど、悪意ある指示を配信する方法も実証する。機能呼び出しが関与するシナリオでは、これらの技術がリモートコード実行(RCE)につながる可能性もある。
これらの脅威に対処するために、われわれはRAGロバスト性を評価する初のオープンソースの包括的なフレームワーク「BullyRAG」を紹介する。BullyRAGは、誤情報の提供、悪意ある指示の実行誘導、RCEの3つの主要な攻撃目標に対応する。10を超える攻撃手法(不可視制御文字による難読化や嗜好特化など)を含み、2つのRAG使用シナリオ(質問応答と機能呼び出し)をサポートし、3つの推論エンジン(Hugging Face、Llama Cpp、OpenAPI)と統合されている。
正確な評価のために、最新のニュース記事やArXivから自動更新される新しいデータセットも提供し、どの言語モデルのトレーニングデータにも含まれていないことを保証する。
最後に、BullyRAGを使用して、多くの強力なLLMの評価結果を示し、モデルを選択する際に精度以外の視点を提供することを目指す。
結論として、本研究はRAGシステムの脆弱性を明らかにし、柔軟な評価フレームワークを提供し、包括的な評価を目的とした最新のデータセットを提供することで、RAGシステムのロバスト性を強化することに寄与している。
[en] BullyRAG:A Multi-Perspective RAG Robustness Evaluation Framework
Retrieval-Augmented Generation (RAG) systems enhance Large Language Models (LLMs) by integrating retrieval mechanisms with their reasoning capabilities, enabling responses beyond their training data. However, the robustness of RAG systems remains an open question: Is our RAG system robust enough to avoid giving harmful or useless responses under various attacks?
This work explores the extensive attack surfaces of RAG systems, focusing on how attackers can manipulate either the retrieval phase or the LLM generation phase. For instance, attackers might obfuscate knowledge to mislead the retriever, causing LLMs to generate incorrect answers, or exploit LLMs' preferences to reference poisoned information. Beyond incorrect answers, we demonstrate how attackers can deliver malicious instructions, such as disguising phishing links as reference links. In scenarios involving function calling, these techniques could potentially lead to remote code execution (RCE).
To address these threats, we introduce “BullyRAG,” the first open-source comprehensive framework for assessing RAG robustness. BullyRAG targets three main attack objectives: provide misinformation, lure into executing malicious instructions, and RCE. It includes over 10 attack techniques (e.g., invisible control character obfuscation and preference specialization), supports two RAG usage scenarios (question answering and function calling), and integrates with three inference engines (Hugging Face, Llama Cpp, and OpenAPI).
For an accurate evaluation, we also present a novel, auto-updating dataset sourced from ArXiv and news articles, ensuring it remains current and relevant while being excluded from any language model's training data.
At the end, We will use BullyRAG to showcase the evaluation results of many powerful LLMs, aiming to provide an additional measurement perspective beyond accuracy when selecting models.
In conclusion, our research addresses critical aspects of RAG systems by uncovering vulnerabilities, providing a flexible evaluation framework, and offering an up-to-date dataset for comprehensive evaluation purposes, thereby enhancing the robustness of RAG systems.
●略歴 / Bio
[ja] シアンヤオ・エリック・ホアン
シアンヤオ・ホアンは、CyCraft Technologyのデータサイエンティスト テクニカルリードであり、主に高度なディープラーニングモデルを採用・開発して、大規模な多要因異常検知、自動ADセキュリティ解析、大規模ユーザー行動検索などの難題を解決することを担当している。ホアンは、最先端の機械学習アプローチをサイバーセキュリティ分野に応用する機会を探求することに情熱を持っている。彼の研究は、世界トップクラスの機械学習会議であるIJCNNやCVPRで発表されており、また、BlackHat USA、SINCON、SECCONといったサイバーセキュリティ会議で技術的なプレゼンテーションも行っている。
[ja] チェンリン・ヤン
チェンリン・ヤン博士は、現在CyCraft Technologyのデータサイエンスディレクターを務めており、機械学習チームの編成とリードを担当している。彼はエディンバラ大学で人工知能の博士号を取得しており、効率的かつ効果的な機械学習ワークフローの構築や、サイバー攻撃の各フェーズにおける検出と対応を自動化するための機械学習技術の活用を研究している。彼は、BlackHat USA 2023、Troopers、FIRST CTI、SINCON、CYBERSEC、SECCON、PyCon Taiwan、AWS Summit Taiwanなど、数多くのカンファレンスで講演を行っている。
[ja] エンシャン・チェン
エンシャン(リリー)チェンは、CyCraft Technologyのデータサイエンティスト・インターンとして、先進的な機械学習技術の活用を専門としている。彼女は、文埋め込みの対照学習における多様なモデルアーキテクチャーの探求や、NLPタスクの汎化性能を向上させるためのインコンテクスト学習手法の実装に注力している。インターン活動と並行して、チェンは国立台湾大学でコンピュータサイエンスと経済学のダブル専攻を追求しており、学科の学生評議会の活動にも積極的に貢献している。Webデザインプロジェクト、学術ワークショップの開催、競技会の調整などにも携わっている。最近では、台湾で開催された学生情報技術会議においてポスターを発表し、LLMにおける潜在的なバイアスについての研究成果を共有した。
[en] Sian-Yao Eric Huang
Sian-Yao Huang is a data scientist technical lead at CyCraft Technology, where he is primarily responsible for adopting and creating sophisticated deep learning models to solve challenging cybersecurity issues like large-scale multifactorial anomaly detection, automatic AD security analysis, and massive user behavior retrieval. Huang is passionate about investigating opportunities to use top-notch ML approaches in the field of cybersecurity. His work has been published on IJCNN and CVPR, two of the world's leading machine learning conferences. In addition, he has also given technical presentations at cybersecurity conferences such as Black Hat USA, SINCON and SECCON.
[en] Cheng-Lin Yang
Dr. Cheng-Lin Yang, currently a data science director at CyCraft Technology, where he is responsible for organizing and leading the machine learning team. He received his PhD in Artificial Intelligence from the University of Edinburgh and his research focuses on constructing efficient and effective machine learning workflows and utilizing machine learning techniques to automate detection and response along each phase of the cyberattack kill chain. He was a speaker at Black Hat USA 2023, Troopers, FIRST CTI, SINCON, CYBERSEC, SECCON, PyCon Taiwan, and AWS Summit Taiwan.
[en]Yen-Shan Chen
Yen-Shan (Lily) Chen serves as a data scientist intern at CyCraft Technology, specializing in leveraging advanced machine learning techniques. Her focus encompasses exploring diverse model architectures for contrastive learning of sentence embeddings and implementing in-context learning methods to enhance the generalization of NLP tasks. Alongside her internship, Chen pursues a double major in computer science and economics at National Taiwan University, where she actively contributes to the departmental student council's initiatives, engaging in web design projects, organizing academic workshops, and coordinating competitions. She also presented her poster in the recent Students' Information Technology Conference in Taiwan, where she shared her findings about potential biases in LLMs.
●事前インタビュー / Pre-Event Interview
[ja] インタビュー
Q1 あなたがこのトピックに取り組むようになったきっかけは何ですか?
われわれがこのトピックに興味を持ち始めたのは、特定の要素がプロンプトに含まれることで、大規模言語モデル( LLM )の出力が影響を受けることを示す研究が増えてきたためです。これは、人間が感情的な刺激や報酬によって行動が変わるのと似ています。たとえば、LLMに金銭的報酬を示唆するプロンプトを提示すると、平均して出力トークンの数が増えることがわかっています。このようなテクニックが、応答の質を向上させるために使用されるのであれば、攻撃者がLLMを操作して誤った情報や有害な情報を提供させることにも利用できるのではないかという興味深い疑問が浮かびました。
そこでわれわれは、特に一般的なユースケースである「RAG
( Retrieval-Augmented Generation )」に焦点を当てることにしました。RAGシステムは、LLMの知識を補完し、より正確な回答を生成するために、外部データソースに依存することが多いです。しかし、これらの外部リソースが新たな攻撃ベクターを生む可能性もあります。攻撃者が取得されるデータに有害な情報を挿入することで、LLMの出力を操作することが可能になります。攻撃者がLLMの出力に影響を与えるための同様のテクニックを利用すれば、モデルが悪意のある情報をユーザーに伝播させる可能性が高まります。この潜在的な脆弱性が、われわれの研究の中心的なテーマとなりました。
Q2 研究の過程でどのような点で苦労しましたか?
研究の過程で、われわれは主に2つの課題に直面しました。1つ目は、公平かつ偏りのない評価をどのように行うかという点です。RAGシステムは、参照ドキュメントがLLMのトレーニングデータの分布外にある状況で使用されることが多いため、われわれは評価データが本当にLLMの分布外であることを確認する必要がありました。そのため、定期的にArXivの最新論文を解析してドキュメントソースとし、それがLLMのトレーニングデータに含まれていないことを確認しました。さらに、新たに処理されたデータセットを定期的に公開評価用にアップロードしました。
2つ目の課題は、どのプロンプトチューニング技術が効果的にLLMの挙動に影響を与えるかを特定することです。これに対処するため、われわれは実証済みのプロンプトチューニング技術( 例:報酬の提示、感情的操作、好みに基づいた言葉の選び方 )を幅広く調査し、さらに新しいアプローチ( 例:大多数の合意 )も試しました。これらの技術をフレームワークに統合し、より一般的な評価ツールを提供することを目指しました。
Q3 CODEBLUEの参加者、参加を検討している人に向けてメッセージをお願いします。
この講演では、LLMが悪意のある情報を提供する可能性を高めるいくつかの方法を紹介するだけでなく、誰でも簡単に使えて既存のシステムと統合できるオープンソースツール「BullyRAG」を発表します。このツールは非常に柔軟なフレームワークですので、講演を通じてRAGシステムをより堅牢にするためのインサイトを得ていただければと思います。また、新しいアイデアや攻撃手法の提案、フィードバックを歓迎しますので、皆さんと共にBullyRAGをさらに強力で実用的なものに改良していければと思います。
[en] Interview
Q1 What led you to making this presentation?
Our interest in this topic began with a growing body of research showing that Large Language Models ( LLMs ) can be influenced by certain elements in their prompts—much like how humans can be affected by emotional cues or incentives. Studies have demonstrated, for example, that when an LLM is presented with prompts suggesting monetary rewards, it tends to generate more output tokens on average. This raised an intriguing question for us: if these techniques can be used to enhance the quality of responses, could they also be exploited by attackers to manipulate LLMs into providing misleading or harmful information?
From there, we decided to focus on a particularly common use case: Retrieval-Augmented Generation ( RAG ). RAG systems often rely on external data sources to enhance the LLM's knowledge and generate more accurate answers. However, these external resources also create new attack vectors, as malicious actors could insert harmful information into the data being retrieved. By leveraging the same techniques that influence LLM output, attackers could increase the likelihood that the model propagates this malicious information to users. This potential vulnerability became the central focus of our research.
Q2 What were some challenges you faced during this research?
During our research, we encountered two main challenges. The first was how to conduct fair and unbiased evaluations. RAG systems are often applied in scenarios where the reference documents fall outside the LLM’s training data distribution. Therefore, we needed to ensure that our evaluation data was genuinely out-of-distribution for the LLM. To address this, we regularly parsed the latest papers from ArXiv as our document source, ensuring they were not part of the LLM’s training data, and we periodically uploaded newly processed datasets for public evaluation.
The second challenge was identifying which prompt tuning techniques could effectively influence LLM behavior. To address this, we conducted a broad survey of proven prompt tuning techniques ( e.g., incentive offers, emotional manipulation, preference-based wording ) and also experimented with new approaches ( e.g., major consensus ).
We then integrated these techniques into our framework, aiming to provide a more general evaluation tool.
Q3 What message would you like to convey to those considering attending this talk?
In this talk, we will not only share several methods we've discovered that increase the likelihood of LLMs providing malicious information, but also present our open-source tool, BullyRAG, a highly flexible framework that anyone can easily use and integrate with their existing systems. We hope you’ll leave this talk with insights on how to make your RAG systems more robust. We also welcome everyone to contribute new ideas or attack techniques and provide feedback, so together we can continuously improve BullyRAG, making it even more powerful and practical.
●講演動画 / Presentation video
●講演スライド / Presentation slide

(Click the image to open the PDF via an external link)
●写真 / Photo

(Chenling Yang and Enxian Chen spoke.)
●レポート記事 / Reports
[ja] [レポート]BullyRAG:多視点RAGロバストネス評価フレームワーク – CODE BLUE 2024(Developers IO / クラスメソッド)