Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:AISecurityLab Hackagent Stochastic Augmentation Search

From Leeroopedia
Knowledge Sources
Domains Security_Testing, Optimization
Last Updated 2026-10-29 00:00 GMT

Overview

A search strategy that generates multiple independently seeded stochastic perturbations of a goal and sends them concurrently, selecting the most promising candidate per step and stopping at the first success.

Description

Stochastic augmentation search (Best-of-N) perturbs the goal text with controlled noise (word scrambling, random capitalization, ASCII shifting) at varying strengths (sigma). Each step generates candidates perturbations with different seeds, sends them all concurrently to the target, and selects the longest usable reply (a proxy for engagement vs refusal). The panel judges only that one reply per step. The search stops at the first success. No attacker LLM is needed — perturbations are purely algorithmic.

Usage

Use this principle when you want a model-free attack that doesn't require an attacker LLM, or when testing robustness to character-level perturbations.

Theoretical Basis

Perturbation probability follows the original BoN paper: word scrambling and capitalization use σ^(1/2), ASCII noising uses σ^3. The same seed always yields the same perturbation, making results reproducible.

# Abstract algorithm
for step in range(steps):
    candidates = [augment(goal, sigma, seed=step*candidates+i) for i in range(candidates)]
    replies = await gather(*[target(c) for c in candidates])
    best = longest_usable_reply(replies)
    if panel.judge(goal, best).success:
        break

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment