US20260340150
2026-10-29
Physics
G06F21/577
The patent application outlines methods and systems for generating adversarial content aimed at retrieval-augmented generation (RAG) systems. These systems typically integrate a retriever and a generative language model to extract information from a knowledge base and produce conditioned outputs. Adversarial documents are designed with specific token sequences to manipulate these systems into retrieving and generating desired outputs.
An adversarial document is initialized with three distinct token sequences: an adversarial retriever sequence (ARS), an adversarial target sequence (ATS), and an adversarial generation sequence (AGS). The ATS specifies a target output, while the ARS is optimized to increase similarity with pseudo-query embeddings from a knowledge base. The AGS remains constant during this optimization process.
The method includes two main optimization operations: retrieval-level and generation-level. The retrieval-level optimization enhances the similarity between the ARS and pseudo-query embeddings. Conversely, the generation-level optimization focuses on reducing the generation loss between the target output and the response from a generative language model. These operations are alternated iteratively to create a trained adversarial document.
A system is described that includes memory and processing circuitry to execute these operations. The system initializes the adversarial document with the specified token sequences and performs the alternating optimization operations. The trained document then manipulates the RAG system to favorably retrieve the adversarial content and generate the intended target output.
The application extends to various implementations, including multi-document generation using clustering algorithms and ensemble-based transferability across different generative models. The techniques are evaluated under gray-box conditions, offering insights into the robustness and adaptability of RAG systems when faced with adversarial content.