Paper deep dive
Generative Adversarial Loops
Kislay Aditya Oj, Nidhi Jain, Sri Surya Varma Datla, Priyanka Jayaswal, Kumar Krishna Agrawal, Aditya Desai
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 90%
Last extracted: 10/10/2026, 1:37:54 AM
Summary
The paper introduces Generative Adversarial Loops (GAL), a framework that automates both benchmark creation (discriminator) and algorithm discovery (generator) to enable self-advancing AI systems. Applied to efficient inference approximation algorithms, GAL iteratively generates adversarial data to expose weaknesses in current methods and then discovers improved algorithms to overcome them. Experiments on KV compression, sparse video generation, sparse attention, and context extension demonstrate that GAL autonomously improves performance on both newly generated adversarial benchmarks and established standard benchmarks.
Entities (15)
Relation Signals (14)
Generative Adversarial Loops → consistsof → Generator agent
confidence 95% · GAL, a generator-discriminator framework alternating between two agentic searches: (1) a discriminator... and (2) a generator
Generative Adversarial Loops → consistsof → Discriminator Agent
confidence 95% · GAL, a generator-discriminator framework alternating between two agentic searches: (1) a discriminator... and (2) a generator
Generator agent → discovers → Algorithms
confidence 95% · a generator that discovers algorithms to overcome them
Discriminator Agent → generates → Adversarial Data
confidence 95% · a discriminator that generates adversarial data to expose weaknesses in current systems
Generative Adversarial Loops → appliedto → Context Extension
confidence 90% · We apply this framework to approximation algorithms for efficient inference... demonstrate adversarial data generation across four tasks: context extension
Generative Adversarial Loops → appliedto → KV Compression
confidence 90% · We apply this framework to approximation algorithms for efficient inference... demonstrate adversarial data generation across four tasks: KV compression
Generative Adversarial Loops → appliedto → Sparse Video Generation
confidence 90% · We apply this framework to approximation algorithms for efficient inference... demonstrate adversarial data generation across four tasks: sparse video generation
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:AI research progress can be viewed as the interaction between two processes: benchmark creation and method discovery. Historically, both were driven by human intelligence. However, recent advances in AI have accelerated automated method discovery, while automated benchmark creation has received comparatively less attention. To enable self-advancing systems, we propose Generative Adversarial Loop (GAL), a generator-discriminator framework alternating between two agentic searches: (1) a discriminator that generates adversarial data to expose weaknesses in current systems, and (2) a generator that discovers algorithms to overcome them. We apply this framework to approximation algorithms for efficient inference. Unlike existing auto research systems, which primarily focus on algorithm discovery, GAL introduces a discriminator agent that automates goalpost setting by continually searching for weaknesses in the current algorithm. We demonstrate adversarial data generation across four tasks: KV compression, sparse video generation, sparse attention, and context extension, where the discriminator identifies weaknesses in state of the art techniques. We further show that GAL enables autonomous improvement, with newly discovered algorithms improving not only on adversarially generated data, but also on established benchmarks. Specifically, GAL improves CompactorPress on KV compression with Qwen3-4B at 4x, raising performance on the discriminator dataset from 0.35 to 0.97, while also outperforming RULER-HARD (+0.77 pts). For context extension, GAL boosts Dual Chunk Attention from 0.20 to 0.90 on the discriminator dataset, while yielding gains on standard benchmarks(ScienceFiction (+6 pts) and PG19 32K (-0.33 PPL)). GAL thus provides a path toward autonomous goalpost setting and algorithmic improvement, where AI systems continually discover their own weaknesses and develop methods to overcome them.
Tags
Links
- Source: https://arxiv.org/abs/2610.11458v1
- Canonical: https://arxiv.org/abs/2610.11458v1
Trouble viewing inline? Open PDF directly →
Full Text
58,959 characters extracted from source content.
Expand or collapse full text
Generative Adversarial Loops Kislay Aditya Oj Nidhi Jain Sri Surya Varma Datla Priyanka Jayaswal Kumar Krishna Agrawal Aditya Desai Abstract AI research progress can be viewed as the interaction between two processes: benchmark creation and method discovery. Historically, both were driven by human intelligence. However, recent advances in AI have accelerated automated method discovery, while automated benchmark creation has received comparatively less attention. To enable self-advancing systems, we propose Generative Adversarial Loop (GAL), a generator-discriminator framework alternating between two agentic searches: (1) a discriminator that generates adversarial data to expose weaknesses in current systems, and (2) a generator that discovers algorithms to overcome them. We apply this framework to approximation algorithms for efficient inference. Unlike existing auto research systems, which primarily focus on algorithm discovery, GAL introduces a discriminator agent that automates goalpost setting by continually searching for weaknesses in the current algorithm. We demonstrate adversarial data generation across four tasks: KV compression, sparse video generation, sparse attention, and context extension, where the discriminator identifies weaknesses in state of the art techniques. We further show that GAL enables autonomous improvement, with newly discovered algorithms improving not only on adversarially generated data, but also on established benchmarks. Specifically, GAL improves CompactorPress on KV compression with Qwen3-4B at 4x, raising performance on the discriminator dataset from 0.35 to 0.97, while also outperforming RULER-HARD (+0.77 pts). For context extension, GAL boosts Dual Chunk Attention from 0.20 to 0.90 on the discriminator dataset, while yielding gains on standard benchmarks(ScienceFiction (+6 pts) and PG19 32K (-0.33 PPL)). GAL thus provides a path toward autonomous goalpost setting and algorithmic improvement, where AI systems continually discover their own weaknesses and develop methods to overcome them. †footnotetext: α Computer Science and Engineering, Indian Institute of Technology Bombay, Mumbai, India β Independent researcher γ Electrical Engineering and Computer Sciences, University of California, Berkeley, USA * Equal contribution. 1 Introduction Research progress in machine learning can broadly be understood as the interaction between two complementary processes: benchmark creation and method discovery. Benchmark creation sets measurable goals that expose limitations in current systems, while method discovery develops algorithms, architectures, and optimization techniques to overcome them. From this perspective, benchmark creation is discriminative: it identifies failure cases, whereas method discovery is generative: it produces solutions. Progress emerges through an alternating cycle between the two: new benchmarks expose capability gaps, enabling focused algorithmic innovation; as methods improve, benchmarks eventually saturate, motivating more challenging evaluations. This cycle has repeatedly shaped machine learning, from MNIST (LeCun et al., 1998), CIFAR (Krizhevsky and Hinton, 2009), and ImageNet (Russakovsky et al., 2015) in image recognition to GLUE (Wang et al., 2018), SuperGLUE (Wang et al., 2019), MMLU (Hendrycks et al., 2020), and GSM8K (Cobbe et al., 2021) in language understanding and reasoning. Sustaining progress therefore requires continuously creating benchmarks that are more challenging, diverse, and discriminative. Yet both sides of this cycle have historically remained largely human driven: researchers design evaluations to expose new weaknesses and develop methods to address them. Recently, this balance between benchmark creation and method discovery has begun to shift. AI systems increasingly contribute to scientific discovery through rapid prototyping, automated experimentation, large-scale evaluation, and hypothesis generation. Notable successes include AlphaTensor (Fawzi et al., 2022), which discovered improved matrix multiplication algorithms, and AlphaFold (Jumper et al., 2021), which enabled large-scale protein structure prediction. This progress has motivated the development of AI-Driven Research Systems (ADRS) (Cheng et al., 2025). Systems such as AlphaEvolve (Novikov et al., 2025) and OpenEvolve (Sharma, 2025) use iterative search and automated evaluation to discover algorithmic improvements. Broader evolutionary and agentic approaches, such as GEPA (Agrawal et al., 2026), further expand this paradigm. However, existing ADRS approaches automate only one side of the research cycle: method discovery. Nearly all still rely on human-designed benchmarks and evaluation protocols to define progress. As method discovery becomes increasingly automated and scalable, benchmark construction becomes the bottleneck. The next frontier of automated scientific discovery is therefore not only discovering better methods, but also automatically discovering what to evaluate. This paper addresses this emerging bottleneck by introducing Generative Adversarial Loops (GAL), a framework that automates discriminative benchmark discovery alongside generative method discovery. Unlike the ADRS paradigm, which focuses primarily on the generative loop, GAL automates both processes. Benchmark discovery, however, presents unique challenges. Unlike method discovery, where benchmarks define the objective to optimize, creating meaningful benchmarks often requires reliable ground truth and the ability to identify regions beyond the capabilities of current methods. This dependence has historically made benchmark design a human-driven process. We observe that many important research domains admit ground truth by construction. In such settings, benchmark generation can itself become algorithmic: datasets can be synthesized automatically while preserving reliable supervision, enabling systematic discovery of failure cases and controlled stress-testing of state-of-the-art systems. One such domain is efficient inference through approximation. To address system bottlenecks in AI inference, many approximation algorithms have been proposed. This work focuses on four such problems: (1) KV Cache Compression (Jegou et al., 2024; Liu et al., 2023; Zhang et al., 2023): compressing the KV cache of autoregressive models in embedding space to address the memory bottleneck in LLM inference engines; (2) Sparse Decoding (Tang et al., 2024; Hooper et al., 2025; Desai et al., 2026): sparsifying attention computation during decoding to address the memory bandwidth bottleneck of autoregressive decoding; (3) Sparse Video Generation (Xi et al., 2025; Yang et al., 2026): sparsifying the prefill workload of diffusion models to enable faster video generation; and (4) Context Extension (An et al., 2024; Liu et al., 2025): enabling training-free context extension, allowing models to process contexts substantially longer than their training context window. This domain naturally provides a setting for automated benchmark generation for two reasons. First, benchmarks can often be generated programmatically. For example, long-context benchmarks can be constructed by systematically placing relevant pieces of information at different locations throughout a long context. Second, more importantly, the unapproximated model provides a natural source of ground truth. For example, whether a prompt is suitable for evaluating sparse video generation can be determined by the quality of the video produced by the dense, unapproximated model. These properties enable us to automatically generate benchmarks while retaining reliable supervision for evaluating approximation algorithms. We formalize benchmark evolution as an iterative process of accumulating data samples, where each iteration discovers a new task on which the state-of-the-art approximation algorithm fails to maintain fidelity to the unapproximated baseline. To discover such failures, we leverage recent autonomous evolution algorithms such as GEPA. When a new failure pattern is identified, we use the ADRS paradigm to evolve the approximation algorithm on the expanded benchmark. Thus, benchmark discovery and method discovery form an alternating loop, with both stages leveraging the same underlying machinery of evolutionary search. More broadly, we argue that automated benchmark generation represents a complementary axis to automated method discovery, which is already gaining momentum, and offers a scalable mechanism for sustaining accelerated research progress. The focus of this paper is to demonstrate the utility of automated benchmark generation for discovering weaknesses in state-of-the-art algorithms that have seemingly saturated existing public benchmarks and coupling it with algorithm evolution to show possibility of complete autonomous progress. To this end, we show that GALs can uncover weaknesses in four algorithms: FastKVZip (Kim et al., 2026a) for KV cache compression, PQCache (Zhang et al., 2025) for sparse attention, SVG (Xi et al., 2025) for sparse video generation, and DCA (An et al., 2024) for context extension. Most of the adversarial failure modes uncovered by GALs are interpretable, providing insight into the limitations of existing approximation algorithms. We demonstrate the generative leg of the GAL loop through two rounds of algorithmic improvement for Context Extension and KV compression. In both cases, the newly discovered algorithms in each iteration of GAL, address the failure modes identified by the newly generated benchmarks while also maintaining, and often improving, performance on previously established benchmarks. This behavior illustrates the feedback loop: newly generated benchmarks expose weaknesses in existing methods, which motivates the discovery of improved methods that address these weaknesses without sacrificing performance on existing evaluations. 2 Related Work Auto research and evolution algorithms Recent advances in auto research have increasingly used evolutionary search to create autonomous loops that iteratively propose, evaluate, and refine solutions against fixed benchmarks or metrics (Karpathy, 2026). In this paradigm, an LLM is not treated as a one shot solution generator, but as a search operator that proposes mutations or new candidates, while automated evaluation provides the objective signal needed to guide subsequent iterations. AlphaEvolve (Novikov et al., 2025) exemplifies this approach by combining LLM generated program mutations with evolutionary selection, allowing promising programs to be iteratively improved and complementary ideas to be explored across a population of candidates. GEPA (Agrawal et al., 2026), in contrast, uses LLMs to reflect on execution traces and failures to generate targeted mutations, while maintaining a Pareto frontier of candidates that perform well on different subsets of the evaluation data. Related efforts such as autoresearch further demonstrate the potential of autonomous experimentation, where agents repeatedly modify a system, run experiments, and retain improvements based on measured performance. AI Driven Systems Research (Cheng et al., 2025) provides a large scale case study of using such automated research agents to tackle challenging systems problems. Collectively, these efforts establish a paradigm in which automated evaluation and evolutionary proposal mechanisms enable LLMs to autonomously navigate large spaces of possible solutions. However, existing auto research systems have primarily used these capabilities to improve a solution against a fixed task, benchmark, or metric. In contrast, we repurpose the same evolutionary machinery to generate adversarial data that targets both the task and the current best solution, enabling the automated discovery of failure modes that can subsequently be used to improve the underlying system. Synthetic data generation The field of synthetic data generation is closely related. One of the early influential approaches, Self-Instruct (Wang et al., 2023), showed that an LLM can generate its own instructions, inputs, and outputs, and use the resulting synthetic dataset for instruction tuning. This led to various efforts to evolve the difficulty of synthetic examples and adapt them to different domains (Xu et al., 2024; Luo et al., 2024; Luo et al., 2025). Additionally, LLMs have been used to improve the quality of generated data through critique and evaluation (Cui et al., 2023; Madaan et al., 2023). A particularly important development has been the use of synthetic data for reasoning distillation. DeepSeek-R1 (Guo et al., 2025) demonstrates that a strong reasoning model can generate large numbers of reasoning trajectories that are subsequently used to train smaller models. Collectively, these approaches treat synthetic data generation as a mechanism for constructing increasingly useful training distributions, with generation, evaluation, filtering, and distillation forming a recurring loop. Our work differs in that we use automated search not primarily to generate useful training examples, but to actively generate adversarial examples that target weaknesses of the current best solution. Other related works There have been several recent and concurrent works that target dataset evolution. BenchEvolver(Wu et al., 2026) proposes a system for evolving coding benchmarks to generate challenging datasets for frontier models. Data-Prompt Co-evolution(Lee and Kahng, 2026) evolves test sets and prompts to develop safer and more policy compliant systems. Hacker-Fixer Loops(Zhong et al., 2026) evolve agentic benchmarks to mitigate reward hacking and ensure that improvements reflect genuine progress. These works are aligned with our approach, with the differences being their areas of application and the domain specific validation used to assess the generated data. 3 Generative Adversarial Loops In this section, we describe the general formulation of a Generative Adversarial Loop (GAL). Consider a system S, such as an inference system, that takes a sequence of tokens (e.g., text, images, or other modalities) as input and produces a sequence as output. The system is parameterized by an artifact A, such as an efficiency algorithm, along with other parameters that remain fixed throughout the lifetime of the loop. Let D denote the set of all valid inputs (or data points), and let A denote the set of all valid artifacts that can parameterize S. Note that the set D is enumerable, and in systems of interest, such as LLM inference systems, it is also finite, since the system can only ingest finite-length strings. If N is the maximum length, in tokens, of a string the system can ingest, then DND_N, the set of valid inputs of length <=N<=N, is actually a finite set. Let ℰE be an evaluation function that determines whether the response of (A)S(A) on a given data point is successful. Formally, ℰ:×→0,1E:A×D→\0,1\, where ℰ(A,d)=1E(A,d)=1 indicates that the system (A)S(A) successfully solves data point d∈d , while ℰ(A,d)=0E(A,d)=0 indicates failure. For an artifact A∈A , we define its coverage over the task space as (A)=d∈∣ℰ(A,d)=1.C(A)=\d (A,d)=1\. (1) Thus, (A)C(A) represents the subset of the task space on which the artifact A successfully performs the task. In practice, evaluation is performed on a finite benchmark B⊆B , consisting of a representative set of data points used to measure system performance. For example, B may comprise long-context benchmarks Hsieh et al. (2024); Bai et al. (2024); Li et al. (2023); Lee et al. (2024) for KV-cache compression and sparse attention, or prompts from vBench (Huang et al., 2024; Zheng et al., 2025) for sparse video generation. We define the benchmark-level evaluation of an artifact as ℰ(A,B)=|d∈B∣ℰ(A,d)=1|/|B|E(A,B)=|\d∈ B (A,d)=1\|/|B|. This quantity measures the fraction of benchmark instances solved by the system parameterized by A. We want to find an algorithm A∗∈A^* such that A∗∈argmaxA∈|(A)|A^*∈ _A |C(A)| (2) 3.1 Discriminator and Generator Agents Assume we start with a benchmark B0B_0 and an artifact A0A_0 s.t. (A)S(A) solves the benchmark B0B_0, i.e., ℰ(A0,B0)=1E(A_0,B_0)=1. We decompose the process of artifact discovery into two phases, executed alternately. In the general case of ithi^th iteration, we have Bi−1,Ai−1B_i-1,A_i-1 where ℰ(Ai−1,Bi−1)=1E(A_i-1,B_i-1)=1 Discriminator phase. In the ithi^th iteration of this phase, we seek a data point b on which Ai−1A_i-1 fails: find b s.t. b∈∖(Ai−1) find b s.t. b (A_i-1) (3) Note that, in general, (Ai−1)C(A_i-1) can be larger than the benchmark Bi−1B_i-1 used to evaluate Ai−1A_i-1. The discriminator phase seeks to explore the task space beyond the current benchmark by discovering an example that is difficult for the current system (Ai−1)S(A_i-1) to solve. Let b∈∖(Ai−1)b (A_i-1) denote such an example. We append this newly discovered example to the existing benchmark Bi−1B_i-1 to obtain an expanded benchmark Bi=Bi−1∪bB_i=B_i-1∪\b\, B0⊂B1⊂B2⊂…⊆B_0⊂ B_1⊂ B_2⊂… . As the loop proceeds, the benchmark accumulates increasingly challenging examples. In practice, we generalize this process to discover a batch of data points on which (Ai−1)S(A_i-1) fails within each discriminator phase. Generator phase. This phase seeks an artifact AiA_i that solves the expanded benchmark BiB_i: find Ais.t.ℰ(Ai,Bi)=1. find A_i s.t. (A_i,B_i)=1. (4) This phase therefore seeks a new artifact that addresses the newly discovered failure cases while preserving correctness on previously discovered examples. In this sense, the generator phase corresponds to the search for improved algorithms or systems, which has traditionally been the focus of evolutionary algorithms and automated research systems. The formulation above presents a simplified, deterministic view in which the correctness of (A)S(A) on each data point is binary. The framework can naturally be extended to stochastic systems, such as LLM inference engines, by treating the evaluation outcome as a random variable. Specifically, for a given artifact A and data point d, we can define ℰ(A,d)∼Bernoulli(pA,d)E(A,d) (p_A,d), [ℰ(A,B)]=∑d∈BpA,d/|B|E[E(A,B)]= _d∈ Bp_A,d/|B|, where pA,dp_A,d denotes the probability that (A)S(A) successfully solves d. The benchmark-level evaluation can then be defined in terms of the expected success rate [ℰ(A,B)]E[E(A,B)]. Since the task space ND_N is finite, it is guaranteed that the sequence of expanding benchmarks Bi\B_i\ will eventually reach ND_N. Thus, if at every step, our generator is able to find an artifact, we are guaranteed to converge to the true artifact A∗A^* if one exists. This process is illustrated in Figure 1. 3.2 Evolution in practice Since we apply Generative Adversarial Loops to the specific domain of efficiency problems in LLM inference, we have a domain-specific mechanism for both generating candidate examples and verifying their correctness. For long-context problems such as Sparse Attention, KV Compression, and Context Extension, we find it useful to iterate on a program that generates examples rather than directly optimizing the examples themselves. First, this leads to interpretable failure patterns once we identify a candidate point b, which would otherwise be difficult to decipher from long-context example. Second, it provides a guarantee of validity by construction. Since the required information is first generated and subsequently embedded into a long context, we can guarantee that the answer is present in the context. We use a second mechanism to further ensure dataset validity: we evaluate each candidate using unapproximated model inference and require it to achieve good performance on the proposed example. Thus, we modify the definition of the discriminator as findb∈s.t.(ℰ(ϕ,b))>τ0∧((ℰ(ϕ,b))−(ℰ(Ai−1,b)))>τ find\;\;\;b \;\;\; s.t.\;\;E(E(φ,b))> _0 (E(E(φ,b))-E(E(A_i-1,b)) )>τ where ℰ(ϕ,b)E(φ,b), i.e., A=ϕA=φ, refers to unapproximated LLM inference. Here, τ0 _0 specifies the minimum performance required from unapproximated inference. This ensures that we do not penalize approximation algorithms on tasks that the unapproximated baseline itself cannot solve, and we then search for data points on which the approximated inference performs worse than the unapproximated inference by at least a gap in quality of τ. Both the discriminator and generator are search problems, which we propose to solve using approaches in auto-research. To this end, we can use a range of algorithms, including but not limited to GEPA, OpenEvolve, Cursor, and Claude Agents. For large projects, where changes to a single file may depend on many other files across the codebase, Cursor and Claude coding harnesses are effective at providing LLMs with the relevant context. This makes them effective during the generative phase, where successful modifications often require understanding and coordinating changes across multiple parts of a project. We denote a proposer with P and a proposed candidate ct+1=P(ct,ℰt,ℱt)c_t+1=P(c_t,E_t,F_t), where ctc_t is the candidate being searched over at time step t and ℱtF_t is the feedback received via some evaluator. We iterate in a loop multiple times until the proposer finds a valid next candidate. DA1A_1A2A_2AnA_nb2b_2b1b_1 Algorithm 1 Local Optimization 1: initial algorithm A0A_0, initial benchmark B0⊂B_0 2: for i=1,2,…,ni=1,2,…,n do b←find b s.t. b∈∖(Ai−1)b← find b s.t. b (A_i-1) 3: Bi←Bi−1∪bB_i←B_i-1∪\b\ 4: Ai←A_i← find s.t. ℰ(Ai,Bi)=1A s.t. (A_i,B_i)=1 5: end for 6: return AnA_n Figure 1: Visualization and the iterative algorithm. The red area represents the benchmark set and blue area is the artifact coverage. After the first iteration (A1)C(A_1) contains b1b_1, so that benchmark is solved. The Discriminator then extends the benchmark with b2b_2 to form B1B_1, which is no longer contained in (A1)C(A_1). The Generator then answers with A2A_2 which covers the new set. After enough number of iterations, the cover of algorithm will approach the dataset D_N. Discriminator and Generator At each iteration i, given the current benchmark set Bi−1B_i-1 on which algorithm Ai−1A_i-1 succeeds, Discriminator uses proposer P to generate a new data point b=P(Bi−1,ℰi−1,ℱi−1),b=P(B_i-1,E_i-1,F_i-1), and evaluate Ai−1A_i-1 on b. We keep generating a data point till we find one that Ai−1A_i-1 cannot solve. This b is then appended to Bi−1B_i-1 to get BiB_i Then, Generator takes over and uses proposer P to generate a new algorithm AiA_i which not only solves b but also solves Bi−1B_i-1. 4 Experiments on Efficiency Problems in AI Inference Figure 4 Sparse Attention via SVG 1. Adversarial prompt, validation, and results Extreme macro slow-motion hovering hummingbird from liquid gallium… dense fractal metallic feathers, razor-thin highlights; wings blur… molten beads, frost, pinpoint reflections… Validation. The dense model produces a good video. Results. PSNR ↑ SSIM ↑ LPIPS ↓ Score 15.5715.57 0.600.60 0.450.45 2. Dense and sparse video snapshots Dense model Sparse model Explanation. The prompt (full prompt in appendix) is very detailed, requiring high-resolution video and computation and complex light and mirrored surface interaction. Settings. We use the Wan2.1-T2V-1.3B model for 81 frames at 720×1280720× 1280 pixels. The sparse version uses 30% sparsity; all other settings follow the SVG recommendations. Dense and sparse models use the same seed and sampling schedule. Figure 4 Context Extension via DCA 1. Adversary, validation, and results ⬇ def build_adversary(): s = make_goldstr(); on_chunk_boundary(s) add_distractors(); return instance Validation: 1. By construction: create Q/A before placing the target. 2. Baseline control: solved at native length W. Results. @NC@N @λ=4×NA@λ=4× N Gap B0B_0 1.001.00 0.900.90 0.100.10 B1B_1 0.950.95 0.500.50 0.450.45 2. DCA position mapping Explanation. The evolved generator moves the target to a DCA chunk boundary and adds same-format distractors. Position remapping can fragment the target in the query’s effective view, while locally coherent distractors remain competitive. Settings. We use Llama3-8B-Instruct with an 8K native context window and 4×4× context extension. In this section, we describe the problem domains we target, the algorithms we use to represent the state of the art in each domain, and representative adversarial examples discovered by the GAL discriminator, along with their interpretation. Sparse Video Generation State-of-the-art video generation typically relies on diffusion models, which iteratively refine a video over multiple steps. Each step requires computation over the full sequence of video tokens, making generation increasingly expensive as resolution and duration grow. As a result, even a few seconds of high-resolution video can take tens of minutes to generate on high-end GPUs. Sparse prefill addresses this by reducing attention computation while preserving generation quality. One state-of-the-art approach is SVG (Sparse Video Generation) (Xi et al., 2025). SVG identifies two distinct attention patterns in video - spatial and temporal and applies different sparsity patterns to each head type. It substantially reduces computation while maintaining quality close to dense generation, reporting PSNR values of approximately 28–29, SSIM around 0.9, and LPIPS around 0.1–0.12, with comparable or sometimes better image quality and temporal consistency. Example Adversary: GAL’s discriminator identified adversarial prompts that cause SVG to deviate substantially from dense video generation. One such example is shown in Figure 4. For this prompt, the relative PSNR and SSIM are substantially lower, while LPIPS is higher, indicating a larger deviation from the video produced by the dense model. The adversarial prompt requests a high-resolution video involving complex interactions of light, creating a challenging generation setting. Such prompts appear to expose a weakness in the sparsity patterns used by SVG: attention that can be safely omitted for typical video-generation prompts may become important when the scene contains fine-grained spatial structure and complex temporal interactions. Thus, while SVG performs well on standard benchmarks, the adversarial example demonstrates that its approximation can breakdown under specific, systematically generated inputs. Figure 4 KV Compression via FastKVZip 1. Adversary, validation, and results ⬇ def build_adversary(): fresh, stale = make_ledgers() place(fresh, mid); place(stale, near_end) return instance Validation: 1. By construction: a solution exists. 2. Baseline control: the model with full KV performs well. Results. Accuracy Uncompressed 0.930.93 FastKVZip 0.350.35 Gap 0.580.58 2. Standard and evolved benchmarks B0B_0: Standard benchmark B1B_1: Stale ledger at an unadvantageous position Explanation. Stale and fresh information is harder to distinguish during compression. To make retrieval harder, the stale ledger is placed near the prompt and the fresh ledger farther away. Settings. We use FastKVZip with Qwen3-8B, a 32K-token context, and 4×4× KV-cache compression. Figure 4 Sparse Decode Attention via PQCache 1. Adversary, validation, and results ⬇ def build_adversary(): s = make_gold_str(); place(s, center) return instance Validation: 1. By construction: a solution exists. 2. Baseline control: dense attention retrieves the gold string. Results. Accuracy Dense attention 0.800.80 PQCache (2%2\%) 0.000.00 Gap 0.800.80 2. Standard and evolved benchmarks B0B_0: Standard benchmark B1B_1: Evolved benchmark Explanation. Attention scores are typically high near the extremities and low in the middle. Extensive training largely mitigates this lost-in-the-middle effect for dense attention, but it resurfaces under top-k sparse attention such as PQCache. Settings. We use Qwen3-4B-Instruct-2507 with PQCache at 2% sparsity. Context Extension Extending a model’s context window is computationally expensive, motivating training-free methods that extend the effective context beyond the native limit. Dual Chunk Attention (DCA) (An et al., 2024) is a state-of-the-art approach, natively supported in vLLM (Kwon et al., 2023), with particularly strong results on Qwen models. DCA addresses out-of-distribution relative positions by remapping token positions based on their distance from the query. As illustrated in Figure 4, tokens from distant chunks are mapped to a shared local range 00 to C, while nearby chunks are positioned immediately preceding the query, where C is the chunk size. DCA typically enables 2×2×–4×4× context extension while preserving perplexity and retrieval performance, with some results extending beyond this range. Example Adversary: GAL’s discriminator identified adversarial patterns that cause DCA to fail substantially. One such pattern is shown in Figure 4. The discriminator generates a program parameterized by the context length. At the native context length, the base model successfully solves the problem. However, when the same problem is extended to 4×4× the native context window, the DCA-enabled model fails. The adversarial pattern exploits the interaction between DCA’s positional remapping and the location of the retrieval information. Specifically, the relevant retrieval information is placed at the boundary of a chunk. Although DCA preserves relative positioning locally within each chunk, its remapping can cause tokens belonging to the same retrieval pattern to be scattered across different relative positions when the information lies near a chunk boundary. For a distant query, this scattering changes the positional structure of the retrieval information relative to the query. As a result, the model may fail to recognize and retrieve the relevant information, despite the information itself being present in the context. KV Compression Long-context autoregressive models face a memory bottleneck in the form of the KV cache, which stores per-token embeddings to reduce generation-time computation. Since its size grows linearly with context length, large KV caches can limit batch sizes or require CPU offloading, reducing serving throughput. KV Compression addresses this by reducing the cache’s memory footprint. KVZip (Kim et al., 2026b) and its lightweight variant FastKVZip (Kim et al., 2026a) are state-of-the-art approaches that retain a small subset of important keys and values to approximate the full context. They achieve up to 4×4× compression while maintaining performance on retrieval, contextual QA, and related tasks. Example Adversary: GAL’s discriminator identified adversarial patterns that cause FastKVZip to fail substantially. One such pattern is shown in Figure 4. As we can see, FastKVZip fails significantly, dropping the accuracy score from 0.93 for the uncompressed model to 0.35 for the compressed model. The adversarial pattern exploits compression errors by constructing a fresh ledger and a stale ledger of key-value pairs. The fresh ledger is placed mid-context, while the stale ledger appears at the end with each entry explicitly marked stale. The query specifically asks for the fresh ledger. When the context comprises news or articles that are time sensitive, this can be a practical occurrence where stale information is also present in the context. Sparse Decoding Autoregressive LLM decoding is memory-bound, primarily due to reading the large KV cache from GPU memory, limiting token throughput. Sparse attention reduces this memory movement by attending to a subset of tokens, making token selection critical. PQCache (Zhang et al., 2025) is a state-of-the-art sparse attention method that selects relevant tokens using a compact product-quantized representation of the KV cache. It achieves top performance on sparse attention leaderboard for Qwen models (Desai et al., 2025). We therefore use Qwen3-4B-Instruct-2507 with PQCache at 2%2\% sparsity. Figure 6: Best gap (τ) versus cost for KV compression (FastKVZip, left) and context extension (DCA, right). Gap is averaged over 10 runs per setting. Example Adversary: GAL’s discriminator identifies adversarial patterns that cause PQCache to fail substantially. One such pattern is shown in Figure 4. As we can see, PQCache performs significantly worse on this pattern. The adversarial pattern exploits the fact that the nature of most attention is such that it naturally pays more attention to sink tokens (i.e., at the start of the context) and local tokens (near the query). When important keys are embedded in the middle, the lost in the middle phenomenon is observed. Newer models, such as Qwen, after training for long contexts, have largely solved the lost in the middle problem, but when sparsified, the phenomenon shows up again. At higher sparsities (e.g., 5% or more), this pattern is not adversarial to PQCache. Cost of Discriminator required to find b Figure 6 shows the cost (in $) required to find adversarial data points b for state-of-the-art models from the Gemini and GPT families. We use GEPA and Cursor as the evolution harnesses. Across models, the evolved solutions consistently increase the gap between unapproximated and approximated inference, suggesting that the discriminator recipe transfers across providers and model capabilities. Surprisingly, lighter models such as Gemini Flash Lite, Gemini Flash, and GPT Luna are substantially more effective at generating adversarial data than larger models such as GPT Sol and Gemini Pro. This difference is even more pronounced in cost: lighter models can discover adversarial data for a fraction of a dollar, while larger models often struggle under the same instructions. Cost Certificate. The cost required to break an algorithm can serve as a certificate of robustness. Approximate inference algorithms may deviate from unapproximated inference on some inputs, but the cost of discovering such failures provides a quantitative measure of how difficult they are to expose under a specified adversarial generation and evaluation procedure. We refer to this measure as the cost certificate. For example, Figure 6 shows that FastKVZip can be broken with GPT Luna (GEPA) for $0.20 on average at a gap of 0.5, while DCA can be broken for less than $0.01. The certificate also enables comparisons within a domain: at 2% sparsity, PQCache can be broken for less than $0.01, whereas breaking Oracle Topk requires $5.06. Closing the Loop We run GAL with both a discriminator, implemented using GEPA evolution, and a generator, implemented using Cursor/Claude evolution. We run two complete GAL iterations on two problem domains: context extension, using DCA as the state-of-the-art baseline, and KV compression, using Compactor (Chari and Van Durme, 2025). The results are presented in Figure 7. In both domains, GAL discovers algorithms that not only improve performance on the adversarial data generated by the discriminator, but also improve over the standard benchmarks that constitute B0B_0. KV Compression. We use Qwen3-4B-Instruct-2507 at 4×4× compression. In round 1, the discriminator hid a ledger needle among many lookalike rows in the middle of the context, causing Compactor’s global top-k selection to discard the relevant ledger entry. The generator countered by introducing a stratified budget that allocates compression capacity across local chunks, ensuring that all parts of the context receive priority. In round 2, the discriminator constructed a multi-hop chain using sparse route IDs that the updated Gen-1 algorithm still dropped. The generator countered by combining KeyDiff (Park et al., 2026), which preserves distinctive keys, with attention protection and value-norm signals, allowing both hop IDs and semantic content to survive under a unified scoring function. Context Extension. We use Llama3-8B-Instruct with 4×4× context extension. In round 1, the discriminator constructed a needle-in-a-haystack task in which the target needle appeared in the middle of the context among lookalike distractors, exposing a failure mode of DCA described in Figure 4. The generator countered by incorporating ideas from Self-Extend, a recent approach to context extension. In round 2, the discriminator filled the context with many near-identical records, making the task more challenging under DCA’s position adjustments. The generator countered by introducing continuous positioning and preserving the original value scale to better fit the extended context within the model’s trained window. Evolved benchmarks Paper benchmarks (RULER-4K hard) Avg. algorithm B1B_1 B2B_2 qa_1 qa_2 vt cwe fwe niah_mv RULER Avg. no-press 1.00 0.95 0.84 0.60 1.00 0.962 0.8867 0.995 0.8806 Compactor 0.25 0.45 0.54 0.48 1.00 0.76 0.80 0.92 0.7500 Gen-1 0.85 0.25 0.62 0.54 1.00 0.736 0.7933 0.92 0.7682 Gen-2 0.95 1.00 0.54 0.48 1.00 0.728 0.8133 0.985 0.7577 Evolved benchmarks Paper benchmarks passkey needle PG19 perplexity Coursera ScienceFiction algorithm seed B1B_1 B2B_2 16k 32k 16k 32k 16k 32k ∼ 9.9k ∼ 15.2k Full 0.00 0.00 0.00 0.00 0.00 0.00 0.00 134.07 1025.96 40.0 50.0 DCA 0.90 0.00 0.40 1.00 1.00 1.00 1.00 12.51 12.45 58.0 68.0 Gen-1 1.00 1.00 0.57 1.00 1.00 1.00 1.00 12.39 12.19 60.0 70.0 Gen-2 1.00 0.97 0.83 1.00 1.00 1.00 1.00 12.36 12.12 58.0 74.0 Figure 7: GAL on KV Compression (top) and Context Extension(Bottom) Compactor Settings: 4×4× compression, model= Qwen3-4B-Instruct-2507 using Cursor evolution harness. DCA Settings: 4×4× extension with model=Llama3 with 8K context. The generated algorithms in both cases perform well on adversarial benchmarks while maintaining, and in some cases improving, performance on standard benchmarks. 5 Conclusion In this work, we present Generative Adversarial Loops (GALs), a framework for automated algorithm discovery through the interaction of generation and discrimination. While prior work has largely automated the generative component, we argue that the discriminator is equally important and underexplored. We instantiate GALs using GEPA, Cursor, and Claude Agents on approximation problems in efficient AI inference. GALs uncover interpretable failure patterns in existing algorithms and, when coupled with the generative loop, use these failures to discover improved algorithms that generalize across diverse benchmarks. More broadly, GALs can become a useful tool for researchers, accelerating algorithmic iteration while providing a cost certificate for robustness: the adversarial effort or computational cost required to expose a failure mode. While this certificate does not establish universal robustness, it quantitatively measures how difficult a method is to break under a specified adversarial generation and evaluation procedure. Acknowledgments This work was primarily supported by the IIT Bombay Seed Grant (RD/0526-IRCCSH0-003). We thank BharatGen for providing access to H200 GPU compute resources that supported the experiments in this work. We are grateful for their support and resources. References Agrawal et al. (2026) L. A. Agrawal, S. Tan, D. Soylu, N. Ziems, R. Khare, K. Opsahl-Ong, A. Singhvi, H. Shandilya, M. J. Ryan, M. Jiang, et al. Gepa: reflective prompt evolution can outperform reinforcement learning. In International Conference on Learning Representations, Vol. 2026, p. 8479–8565. Cited by: §B.1, §1, §2. An et al. (2024) C. An, F. Huang, J. Zhang, S. Gong, X. Qiu, C. Zhou, and L. Kong Training-free long-context scaling of large language models. arXiv preprint arXiv:2402.17463. Cited by: §1, §1, §4. Bai et al. (2024) Y. Bai, X. Lv, J. Zhang, H. Lyu, J. Tang, Z. Huang, Z. Du, X. Liu, A. Zeng, L. Hou, Y. Dong, J. Tang, and J. Li LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Bangkok, Thailand, p. 3119–3137. External Links: Link, Document Cited by: §3. Chari and Van Durme (2025) V. Chari and B. Van Durme Compactor: calibrated query-agnostic kv cache compression with approximate leverage scores. arXiv preprint arXiv:2507.08143. Cited by: §4. Cheng et al. (2025) A. Cheng, S. Liu, M. Pan, Z. Li, B. Wang, A. Krentsel, T. Xia, M. Cemri, J. Park, S. Yang, et al. Barbarians at the gate: how ai is upending systems research. arXiv preprint arXiv:2510.06189. Cited by: §1, §2. Cobbe et al. (2021) K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168. Cited by: §1. Cui et al. (2023) G. Cui, L. Yuan, N. Ding, G. Yao, B. He, W. Zhu, Y. Ni, G. Xie, R. Xie, Y. Lin, et al. Ultrafeedback: boosting language models with scaled ai feedback. arXiv preprint arXiv:2310.01377. Cited by: §2. Desai et al. (2025) A. Desai, K. K. Agrawal, L. Schroeder, P. Dixit, M. Zaharia, J. E. Gonzalez, and I. Stoica Introducing sky-light: advancing the frontier of sparse attention research. External Links: Link Cited by: §4. Desai et al. (2026) A. Desai, K. K. Agrawal, S. Yang, A. Cuadron, L. G. Schroeder, M. Zaharia, J. E. Gonzalez, and I. Stoica vAttention: Verified Sparse Attention via Sampling. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §1. Fawzi et al. (2022) A. Fawzi, M. Balog, A. Huang, T. Hubert, B. Romera-Paredes, M. Barekatain, A. Novikov, F. J. R. Ruiz, J. Schrittwieser, G. Swirszcz, et al. Discovering faster matrix multiplication algorithms with reinforcement learning. Nature 610 (7930), p. 47–53. Cited by: §1. Guo et al. (2025) D. Guo, D. Yang, H. Zhang, J. Song, P. Wang, Q. Zhu, R. Xu, R. Zhang, S. Ma, X. Bi, et al. Deepseek-r1: incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948. Cited by: §2. Hendrycks et al. (2020) D. Hendrycks, C. Burns, S. Basart, A. Zou, M. Mazeika, D. Song, and J. Steinhardt Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300. Cited by: §1. Hooper et al. (2025) C. R. C. Hooper, S. Kim, H. Mohammadzadeh, M. Maheswaran, S. Zhao, J. Paik, M. W. Mahoney, K. Keutzer, and A. Gholami Squeezed Attention: Accelerating Long Context Length LLM Inference. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics, Cited by: §1. Hsieh et al. (2024) C. Hsieh, S. Sun, S. Kriman, S. Acharya, D. Rekesh, F. Jia, and B. Ginsburg RULER: what’s the real context size of your long-context language models?. In First Conference on Language Modeling, Cited by: §3. Huang et al. (2024) Z. Huang, Y. He, J. Yu, F. Zhang, C. Si, Y. Jiang, Y. Zhang, T. Wu, Q. Jin, N. Chanpaisit, et al. Vbench: comprehensive benchmark suite for video generative models. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 21807–21818. Cited by: §3. Jegou et al. (2024) S. Jegou, M. Jeblick, A. Devoto, J. Liu, and D. Austin KVPress: efficient kv cache compression for long-context llms. Note: Version 1.2.0 External Links: Link Cited by: §1. Jumper et al. (2021) J. Jumper, R. Evans, A. Pritzel, T. Green, M. Figurnov, O. Ronneberger, K. Tunyasuvunakool, R. Bates, A. Žídek, A. Potapenko, et al. Highly accurate protein structure prediction with alphafold. nature 596 (7873), p. 583–589. Cited by: §1. Karpathy (2026) A. Karpathy Autoresearch: https://github.com/karpathy/autoresearch. Note: GitHub repository Cited by: §2. Kim et al. (2026a) J. Kim, D. Han, and S. Yun Fast kvzip: efficient and accurate llm inference with gated kv eviction. arXiv preprint arXiv:2601.17668. Cited by: §1, §4. Kim et al. (2026b) J. Kim, J. Kim, S. Kwon, J. W. Lee, S. Yun, and H. O. Song Kvzip: query-agnostic kv cache compression with context reconstruction. Advances in Neural Information Processing Systems 38, p. 167563–167591. Cited by: §4. Krizhevsky and Hinton (2009) A. Krizhevsky and G. Hinton Learning multiple layers of features from tiny images. Technical report University of Toronto. Cited by: §1. Kwon et al. (2023) W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. Gonzalez, H. Zhang, and I. Stoica Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th symposium on operating systems principles, p. 611–626. Cited by: §4. LeCun et al. (1998) Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner Gradient-based learning applied to document recognition. Proceedings of the IEEE 86 (11), p. 2278–2324. Cited by: §1. Lee et al. (2024) J. Lee, A. Chen, Z. Dai, D. Dua, D. S. Sachan, M. Boratko, Y. Luan, S. M. R. Arnold, V. Perot, S. Dalmia, H. Hu, X. Lin, P. Pasupat, A. Amini, J. R. Cole, S. Riedel, I. Naim, M. Chang, and K. Guu Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?. arXiv preprint arXiv:2406.13121. Cited by: §3. Lee and Kahng (2026) M. Lee and M. Kahng Data-prompt co-evolution: growing test sets to refine llm behavior. In Proceedings of the 2026 CHI Conference on Human Factors in Computing Systems, p. 1–17. Cited by: §2. Li et al. (2023) J. Li, M. Wang, Z. Zheng, and M. Zhang Loogle: can long-context language models understand long contexts?. arXiv preprint arXiv:2311.04939. Cited by: §3. Liu et al. (2025) X. Liu, R. Li, Z. Liu, Q. Guo, Y. Song, K. Lv, H. Yan, L. Li, Q. Liu, and X. Qiu Reattention: training-free infinite context with finite attention scope. In International Conference on Learning Representations, Vol. 2025, p. 95458–95478. Cited by: §1. Liu et al. (2023) Z. Liu, A. Desai, F. Liao, W. Wang, V. Xie, Z. Xu, A. Kyrillidis, and A. Shrivastava Scissorhands: exploiting the persistence of importance hypothesis for llm kv cache compression at test time. Advances in Neural Information Processing Systems 36, p. 52342–52364. Cited by: §1. Luo et al. (2025) H. Luo, Q. Sun, C. Xu, P. Zhao, J. Lou, C. Tao, X. Geng, Q. Lin, S. Chen, Y. Tang, et al. Wizardmath: empowering mathematical reasoning for large language models via reinforced evol-instruct. In International Conference on Learning Representations, Vol. 2025, p. 49573–49609. Cited by: §2. Luo et al. (2024) Z. Luo, C. Xu, P. Zhao, Q. Sun, X. Geng, W. Hu, C. Tao, J. Ma, Q. Lin, and D. Jiang Wizardcoder: empowering code large language models with evol-instruct. In International Conference on Learning Representations, Vol. 2024, p. 27168–27188. Cited by: §2. Madaan et al. (2023) A. Madaan, N. Tandon, P. Gupta, S. Hallinan, L. Gao, S. Wiegreffe, U. Alon, N. Dziri, S. Prabhumoye, Y. Yang, et al. Self-refine: iterative refinement with self-feedback. Advances in neural information processing systems 36, p. 46534–46594. Cited by: §2. Novikov et al. (2025) A. Novikov, N. Vũ, M. Eisenberger, E. Dupont, P. Huang, A. Z. Wagner, S. Shirobokov, B. Kozlovskii, F. J. Ruiz, A. Mehrabian, et al. Alphaevolve: a coding agent for scientific and algorithmic discovery. arXiv preprint arXiv:2506.13131. Cited by: §1, §2. Park et al. (2026) J. Park, D. Jones, M. Morse, R. Goel, M. Lee, and C. Lott Keydiff: key similarity-based kv cache eviction for long-context llm inference in resource-constrained environments. Advances in Neural Information Processing Systems 38, p. 5983–6019. Cited by: §4. Russakovsky et al. (2015) O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision 115 (3), p. 211–252. Cited by: §1. Sharma (2025) A. Sharma OpenEvolve: an open-source evolutionary coding agent. GitHub. External Links: Link Cited by: §1. Tang et al. (2024) J. Tang, Y. Zhao, K. Zhu, G. Xiao, B. Kasikci, and S. Han QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference. In International Conference on Machine Learning, Cited by: §1. Wang et al. (2019) A. Wang, Y. Pruksachatkun, N. Nangia, A. Singh, J. Michael, F. Hill, O. Levy, and S. Bowman Superglue: a stickier benchmark for general-purpose language understanding systems. Advances in neural information processing systems 32. Cited by: §1. Wang et al. (2018) A. Wang, A. Singh, J. Michael, F. Hill, O. Levy, and S. R. Bowman GLUE: a multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP workshop BlackboxNLP: Analyzing and interpreting neural networks for NLP, p. 353–355. Cited by: §1. Wang et al. (2023) Y. Wang, Y. Kordi, S. Mishra, A. Liu, N. A. Smith, D. Khashabi, and H. Hajishirzi Self-instruct: aligning language models with self-generated instructions. In Proceedings of the 61st annual meeting of the association for computational linguistics (volume 1: long papers), p. 13484–13508. Cited by: §2. Wu et al. (2026) Y. Wu, A. J. Li, W. Ma, L. Cao, Z. Zhou, M. Cemri, S. Liu, Y. Xiu, C. Yan, H. Zhao, et al. BenchEvolver: frontier task synthesis via solution-centric evolution. arXiv preprint arXiv:2606.01286. Cited by: §2. Xi et al. (2025) H. Xi, S. Yang, Y. Zhao, C. Xu, M. Li, X. Li, Y. Lin, H. Cai, J. Zhang, D. Li, et al. Sparse videogen: accelerating video diffusion transformers with spatial-temporal sparsity. arXiv preprint arXiv:2502.01776. Cited by: §1, §1, §4. Xu et al. (2024) C. Xu, Q. Sun, K. Zheng, X. Geng, P. Zhao, J. Feng, C. Tao, Q. Lin, and D. Jiang WizardLM: empowering large pre-trained language models to follow complex instructions. In International Conference on Learning Representations, Vol. 2024, p. 30745–30766. Cited by: §2. Yang et al. (2026) S. Yang, H. Xi, Y. Zhao, M. Li, J. Zhang, H. Cai, Y. Lin, X. Li, C. Xu, K. Peng, et al. Sparse videogen2: accelerate video generation with sparse attention via semantic-aware permutation. Advances in Neural Information Processing Systems 38, p. 96965–96991. Cited by: §1. Zhang et al. (2025) H. Zhang, X. Ji, Y. Chen, F. Fu, X. Miao, X. Nie, W. Chen, and B. Cui PQCache: Product Quantization-based KVCache for Long Context LLM Inference. Proceedings of the ACM on Management of Data 3 (3), p. 1–30. External Links: Link Cited by: §1, §4. Zhang et al. (2023) Z. Zhang, Y. Sheng, T. Zhou, T. Chen, L. Zheng, R. Cai, Z. Song, Y. Tian, C. Re, C. Barrett, Z. Wang, and B. Chen H2_2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models. In Thirty-seventh Conference on Neural Information Processing Systems, External Links: Link Cited by: §1. Zheng et al. (2025) D. Zheng, Z. Huang, H. Liu, K. Zou, Y. He, F. Zhang, L. Gu, Y. Zhang, J. He, W. Zheng, et al. Vbench-2.0: advancing video generation benchmark suite for intrinsic faithfulness. arXiv preprint arXiv:2503.21755. Cited by: §3. Zhong et al. (2026) Z. Zhong, I. Segal, I. Bercovich, S. Saxena, K. Zhang, and A. Raghunathan Hardening agent benchmarks with adversarial hacker-fixer loops. arXiv preprint arXiv:2606.08960. Cited by: §2. Appendix A Appendix Appendix B Gepa Setup B.1 Purpose and Scope This appendix describes how Adversearch-Agent uses GEPA Agrawal et al. (2026) as the outer optimization loop for discovering adversarial candidates. GEPA iteratively mutates a candidate artifact under a fixed, harness-defined evaluation protocol. Depending on the task, this artifact is either (i) a code candidate, a function that constructs adversarial inputs or evaluation examples, or (i) a prompt candidate, a single adversarial prompt string. In both cases, GEPA evolves the candidate text, while the harness is responsible for materializing and evaluating the resulting artifact. Each candidate is scored by a task-specific evaluator that scores both the baseline system and an experimental configuration (for example, full-precision versus quantized inference) and returns a scalar objective score together with a reflection summary. The role of GEPA is to search the space of candidate programs so as to maximize this objective within a fixed metric-call budget. B.2 Integration Architecture Figure 8 shows the overall GEPA integration in Adversearch-Agent. A harness supplies the fixed task setup—candidate contract, objective, background, evaluator, optional seed, and GEPA configuration—and GEPA is invoked through optimize_anything (package version 0.1.1). Inside the adversarial loop, GEPA repeatedly selects a parent candidate, evaluates it to obtain a score and reflection summary, and asks a reflection LLM to propose a mutated child. This cycle continues until the metric-call budget is exhausted, after which GEPA returns the best candidate. Adversarial loopHarnessBest candidateGEPAEvaluatorReflection LMseed (optional),objective, background,configcandidatescore +reflection summaryparent + feedbacknew candidate Figure 8: The harness provides seed(optional), objective, background, run configuration, and a harness evaluator to GEPA. In each iteration of the adversarial loop, GEPA evaluates the latest candidate and builds reflection summary, it then uses a reflection LLM to propose the next candidate by mutating over a chosen parent candidate. Parent selection and candidate acceptance Each evaluation returns a harness-defined scalar aggregate score that measures how close a candidate is to meeting the objective. GEPA accepts a child into the parent pool only when this score improves on its parent; rejected proposals are discarded. GEPA selects the next parent from the pool using Pareto-based selection over the multi-objective score vector returned by the evaluator. The axes of this frontier are harness-defined. For example, in the KVPress harness the evaluator uses baseline_accuracy, and gap ( baseline_accuracy – experiment_accuracy) so the Pareto frontier trades off keeping baseline accuracy high while increasing the accuracy gap under KV compression; both axes matter for parent selection. The scalar aggregate score is still used to decide if a new candidate gets accepted, while the Pareto axes determine which parents are eligible to generate the next reflective mutation. B.3 Practical Learnings for Using Adversearch These notes summarize practical design lessons from configuring Adversearch for GEPA-based adversarial search. • No solution hints: The task background should not provide hints at attack strategies that can bias the exploration. • Constraints and validation: Background and objective should state goals and hard candidate constraints. The reflection LM may still ignore constraints, so additional harness-side validation and rejection remain essential. • Seeds bias the search: The initial candidate strongly shapes later proposals. We added an exploration encouraging prompt addon and also ran seedless optimizations to reduce hand-seed bias. In seedless mode, the reflection LM itself is used to generate the seed candidate based on the background and objective. • Pareto axes representing objective: Extra frontiers can enlarge the parent pool, but contradictory higher-is-better axes can make search oscillate. For example, adding (1-experiment) rewarded candidates that also broke the baseline; axes should instead favor selectively breaking the experiment while preserving baseline behavior. • Diversified seeds, then independent evolution: In preliminary multi-island runs we generated diverse seeds and evolved each independently under a shared budget, aiming for several refined candidates rather than one collapsed lineage. • Post-hoc diversity metrics: We also experimented with preliminary diversity measures over candidates and IDEAs, including LLM judges and embedding cosine similarity, used for analysis rather than closed-loop control. Appendix C Generator Cursor Agent Setup Blue prompt+ defaultsCursor agentSystem to evolvePATH_TO_SYSTEM_TO_EVOLVEEvaluatecandidateFrozenadv setRegressionRun artifactscandidates / scores / run.lognext edit Figure 9: Cursor Blue Team loop: edit the system, evaluate on a frozen adversarial set and regression suite, then iterate from logged scores. C.1 Agent prompt ⬇ ## Task Improve ‘PATH_TO_SYSTEM_TO_EVOLVE‘ so accuracy on the primary adversarial set rises. Held-out regression floors in ‘DEFAULTS‘ are a **gated** check: run them when a candidate looks promising, not on every iteration (evals are slow). Evolve the algorithm by editing files under ‘PATH_TO_SYSTEM_TO_EVOLVE/‘. … Evaluate every candidate on the **primary adv set** via ‘EVAL_SCRIPT‘ … **Default loop:** primary-only. Optimize for higher ‘adv_accuracy‘ / ‘objective_score‘ on that set vs ‘target_adv‘ in ‘DEFAULTS‘. **When to run held-out regression (your call):** when the primary result meets or approaches ‘target_adv‘, is a new best by a clear margin, or you need a regression sanity check before committing to a direction. … Stop only when iteration budget reaches ‘MAX_CANDIDATES‘. Don’t early exit if the goal is met or if progress stalls. Don’t generate all candidates at once --- later edits must be informed by scores so far. ## Boundaries - Stay inside this machine’s project trees needed for Blue Team only. - You may read and write: - ‘PATH_TO_SYSTEM_TO_EVOLVE/‘ - ‘RUN_DIR/‘ - … - Do not modify the frozen adversarial set. - Do not read the Red Team tree … - Do not cite, summarize, imitate, or otherwise use prior Blue runs for this task. - Write run artifacts only under ‘RUN_DIR/‘. - Do not use evolution frameworks (GEPA / OpenEvolve / AlphaEvolve) for this loop. ## Evaluation command ### 1) Materialize adv once, then freeze ### 2) Iterate: edit system → evaluate ### 3) Gate: evaluate on regression suite …