Source-linked AI summary

Generative Adversarial Loops

Kislay Aditya Oj, Nidhi Jain, Sri Surya Varma Datla, Priyanka Jayaswal, Kumar Krishna Agrawal, Aditya Desai

arXiv:2610.11458v1cs.LGcs.AI

TL;DR

Automated method discovery is advancing, but benchmark creation remains largely human-driven, limiting automation of both parts of research progress. GAL alternates adversarial benchmark discovery with algorithm search; it uncovers interpretable failure patterns and discovers improved algorithms that address them while maintaining or improving performance on established benchmarks.

  • Problem

    AI-driven research systems increasingly automate method discovery but still rely largely on human-designed benchmarks, leaving benchmark construction comparatively less automated.

    Source: §1 · p. 2
  • Method

    GAL alternates a discriminator that adds failures of the current artifact to a benchmark with a generator that searches for an artifact solving the expanded benchmark.

    Source: §1 · p. 2, §3.1 · p. 4
  • Results

    GAL uncovers interpretable failure patterns and discovers improved algorithms that address them while maintaining, and often improving, performance on established benchmarks.

    Source: §1 · p. 3, §5 · p. 9
  • Takeaways & Limitations

    GAL offers researchers a cost certificate for robustness that measures the effort or computational cost needed to expose a failure under a specified procedure.

    Source: §5 · pp. 9–10

    The cost certificate does not establish universal robustness; it measures difficulty of breaking a method only under the specified adversarial-generation and evaluation procedure.

    Source: §5 · p. 10

Abstract

from arXiv · show

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.

1 INTRODUCTION

The introduction frames research progress as a cycle of benchmark creation and method discovery, noting that AI research systems increasingly automate method discovery while benchmark design remains largely human-driven. GAL addresses this imbalance by automating both sides and demonstrating the approach on approximation problems in efficient inference.

1 INTRODUCTION

  • Benchmark creation exposes system limitations, while method discovery develops solutions; both have historically remained largely human-driven.The introduction describes their alternating cycle as a recurring driver of progress across machine learning.Source: §1 · p. 1
  • Existing AI-driven research systems automate method discovery but generally rely on human-designed benchmarks, making benchmark construction a bottleneck as method search scales.The introduction identifies automatically discovering what to evaluate as a next frontier for automated scientific discovery.Source: §1 · p. 2
  • GAL automates benchmark discovery alongside method discovery, using domains where data can be synthesized with reliable ground truth to expose failure cases.Efficient inference approximation is the paper’s application domain, spanning KV compression, sparse decoding, sparse video generation, and context extension.Source: §1 · p. 2
  • GAL alternates adversarial benchmark generation and algorithm evolution, uncovering weaknesses in four state-of-the-art algorithms and discovering methods that address failures while maintaining or improving established-benchmark performance.The paper reports that most uncovered failure modes are interpretable and demonstrate two rounds of improvement for context extension and KV compression.Source: §1 · pp. 2–3

2 RELATED WORK

Prior work has automated solution search and synthetic-data generation, but generally targets fixed tasks or useful training data. GAL instead uses automated search to generate adversarial examples against current best solutions.

2 RELATED WORK

3 GENERATIVE ADVERSARIAL LOOPS

GAL formalizes progress as an alternating search: a discriminator expands a benchmark with failures, and a generator seeks an artifact that solves the expanded set. In efficient-inference applications, programmatic example construction and comparison with unapproximated inference support validity checks and targeted search.

3 GENERATIVE ADVERSARIAL LOOPS

  • The framework defines artifact coverage as the task-space subset an artifact solves and benchmark-level evaluation as the fraction of benchmark instances solved.A system is parameterized by an artifact such as an efficiency algorithm; its other parameters remain fixed during the loop.Source: §3 · p. 4

3.1 DISCRIMINATOR AND GENERATOR AGENTS

  • Each iteration has the discriminator find a data point the current artifact fails, append it to the benchmark, and have the generator seek an artifact solving the expanded benchmark.The generator is intended to address newly found failures while preserving correctness on prior examples; expected success rates can represent stochastic systems.Source: §3.1 · p. 4
  • If the task space is finite and the generator finds a valid artifact at every step, expanding benchmarks eventually reach the full task space and converge to a true artifact if one exists.Source: §3.1 · p. 4

3.2 EVOLUTION IN PRACTICE

  • For long-context tasks, the authors evolve example-generating programs, which can make failure patterns interpretable and ensure required information is embedded in the context by construction.This practice is described for sparse attention, KV compression, and context extension.Source: §3.2 · pp. 4–5
  • The discriminator also requires unapproximated inference to meet a minimum performance threshold and the approximation to trail it by at least a specified quality gap.This avoids penalizing approximation algorithms on tasks the unapproximated baseline itself cannot solve.Source: §3.2 · p. 5
  • Both phases can use auto-research search methods; in practice, the discriminator finds an unsolved data point and the generator proposes an algorithm solving it and the existing benchmark.The paper notes that Cursor and Claude coding harnesses can help the generative phase when project changes require coordinating across files.Source: §3.2 · p. 5

4 EXPERIMENTS ON EFFICIENCY PROBLEMS IN AI INFERENCE

The experiments test GAL on efficiency problems in AI inference, using adversarial benchmarks to expose weaknesses in approximation algorithms and algorithm evolution to address them. In context extension and KV compression, the evolved algorithms improve on adversarial data while also improving over standard benchmarks.

SPARSE VIDEO GENERATION

  • SVG deviates from dense video generation on a high-resolution prompt with complex light interactions, with lower relative PSNR and SSIM and higher LPIPS.The passage attributes the vulnerability to sparsity patterns omitting attention needed for fine-grained spatial structure and complex temporal interactions.Source: SPARSE VIDEO GENERATION · p. 6

CONTEXT EXTENSION

  • At 4× context extension, DCA can fail when retrieval information lies at a chunk boundary and positional remapping scatters its tokens.The model solves the task at native context length, but fails when the same problem is extended to 4× that window.Source: CONTEXT EXTENSION · p. 7

KV COMPRESSION

  • FastKVZip accuracy falls from 0.93 for the uncompressed model to 0.35 for the compressed model on a fresh-ledger query amid stale entries.The adversarial pattern places the fresh ledger mid-context and marks stale entries at the end.Source: KV COMPRESSION · p. 8

SPARSE DECODING

  • GAL’s discriminator identifies a pattern that makes PQCache perform significantly worse: embedding important keys in the middle produces lost-in-the-middle behavior, which reappears in long-context-trained Qwen when sparsified.At higher sparsities (e.g., 5% or more), the pattern is not adversarial to PQCache.Source: SPARSE DECODING · p. 8

COST OF DISCRIMINATOR REQUIRED TO FIND b

  • Lighter discriminator models generate adversarial data more effectively and cheaply than larger models, while evolved solutions increase the gap between approximated and unapproximated inference.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.Source: COST OF DISCRIMINATOR REQUIRED TO FIND b · pp. 8–9
  • GAL’s cost certificate measures the cost of discovering failures under a specified adversarial generation and evaluation procedure.For example, at 2% sparsity, breaking PQCache costs less than $0.01, whereas breaking Oracle Topk requires $5.06.Source: COST OF DISCRIMINATOR REQUIRED TO FIND b · pp. 8–9

CLOSING THE LOOP

  • In context extension and KV compression, GAL discovers algorithms that improve on adversarial data and over the standard benchmarks.The reported experiments use two complete GAL iterations, with DCA and Compactor as the respective state-of-the-art baselines.Source: CLOSING THE LOOP · p. 9, Figure 7 · p. 9

5 CONCLUSION

GAL pairs automated discrimination with method discovery to uncover interpretable algorithm failures and develop improved algorithms that generalize across benchmarks. Its cost certificate measures how difficult a method is to break under a specified procedure, not universal robustness.

5 CONCLUSION

  • GAL combines generation and discrimination to uncover interpretable failures and discover improved algorithms that generalize across diverse benchmarks.The framework is instantiated with GEPA, Cursor, and Claude Agents on efficient-inference approximation problems.Source: §5 · p. 9
  • The cost certificate measures the effort or computational cost required to expose a failure under a specified adversarial generation and evaluation procedure.It does not establish universal robustness.Source: §5 · p. 10

B.1 PURPOSE AND SCOPE

ADVERSEARCH-AGENT uses GEPA to evolve adversarial candidates under a fixed, harness-defined evaluation protocol. The harness scores candidates against both a baseline and an experimental configuration.

B.1 PURPOSE AND SCOPE

  • GEPA searches adversarial candidates under a fixed, harness-defined evaluation protocol, with candidates represented as code or a prompt string.The harness materializes and evaluates the evolving artifact.Source: §B.1 · p. 14
  • The evolving artifact is either a function that constructs adversarial inputs or evaluation examples, or a single adversarial prompt string.Source: §B.1 · p. 14
  • A task-specific evaluator scores both the baseline and experimental configuration, returning a scalar objective score and reflection summary.GEPA searches candidate programs to maximize the objective within a fixed metric-call budget.Source: §B.1 · p. 14

B.2 INTEGRATION ARCHITECTURE

The integration architecture uses a harness to define the task and evaluate candidates while GEPA iteratively selects, scores, and mutates candidates. Parent selection and candidate acceptance use distinct criteria.

B.2 INTEGRATION ARCHITECTURE

  • GEPA repeatedly selects a parent, evaluates it for a score and reflection summary, and asks a reflection LLM to propose a mutated child.The harness supplies the task setup and evaluator; GEPA returns the best candidate after the metric-call budget is exhausted.Source: §B.2 · p. 14, Figure 8 · p. 14
  • GEPA accepts a child into the parent pool only when its harness-defined scalar aggregate score improves on its parent.Rejected proposals are discarded.Source: §B.2 · p. 14
  • Pareto-based selection over the evaluator's multi-objective score vector determines which parents can generate the next mutation.In the KVPress harness, the axes trade off high baseline accuracy against a larger accuracy gap under KV compression.Source: §B.2 · pp. 14–15
  • The Cursor Blue Team loop edits the system, evaluates it on a frozen adversarial set and regression suite, then iterates from logged scores.Source: Figure 9 · p. 15

B.3 PRACTICAL LEARNINGS FOR USING ADVERSEARCH

The practical guidance emphasizes unbiased exploration, explicit candidate constraints, and objective-aligned search criteria. It also describes seed diversification and post-hoc diversity analysis.

B.3 PRACTICAL LEARNINGS FOR USING ADVERSEARCH

  • Avoid attack-strategy hints in the task background because they can bias adversarial exploration.Source: §B.3 · p. 15
  • State goals and hard candidate constraints in the background and objective, and retain harness-side validation because the reflection LM may ignore constraints.Source: §B.3 · p. 15
  • Initial candidates strongly shape later proposals, so the authors used an exploration prompt addon and seedless optimizations to reduce hand-seed bias.In seedless mode, the reflection LM generates the seed from the background and objective.Source: §B.3 · p. 15
  • Pareto axes should reward selectively breaking the experimental system while preserving baseline behavior, since contradictory higher-is-better axes can make search oscillate.Source: §B.3 · p. 15
  • Preliminary multi-island runs diversified seeds and evolved each independently under a shared budget to seek several refined candidates.Source: §B.3 · p. 15
  • Preliminary diversity measures, including LLM judges and embedding cosine similarity, were used for analysis rather than closed-loop control.Source: §B.3 · p. 15

C GENERATOR CURSOR AGENT SETUP

The setup directs the generator agent to evolve the system against a frozen primary adversarial set, using iterative score-informed edits and a gated held-out regression check.

C GENERATOR CURSOR AGENT SETUP

  • Candidates are evaluated on the primary adversarial set, with the default loop optimizing its adv_accuracy or objective_score against target_adv.The prompt specifies a primary-only default loop.Source: §C.1 · p. 16
  • Held-out regression checks are gated rather than run every iteration, and are recommended when the primary result approaches target_adv, sets a clear new best, or needs a sanity check.The prompt notes that evaluations are slow.Source: §C.1 · p. 16
  • The agent is limited to specified project trees, must keep run artifacts under RUN_DIR, and must not alter the frozen adversarial set or use prior Blue runs or evolution frameworks.The prompt also prohibits reading the Red Team tree.Source: §C.1 · p. 16
  • The loop materializes and freezes the adversarial set, then iterates through system edits and evaluations, with later edits informed by scores so far.The prompt sets MAX_CANDIDATES as the iteration-budget stopping point.Source: §C.1 · p. 16
Loading 2610.11458v1…