Manuscript Offprint

arXiv:2611.06890

Procedural Adversarial Learning

Jack Nugent, Jia Deng

ABSTRACT

For many computer vision tasks, neural networks can be trained to produce a low average error, yet they still fail on seemingly simple scenes. Reducing these failures requires first finding them, but they may not be in a fixed dataset. We study procedural adversarial learning (PAL), a framework of minimax training and adversarial evaluation which searches the input space of a procedural generator for difficult instances. The procedural generator is an interpretable program mapping a low-dimensional vector of control parameters (e.g. layout, lighting, pose) to a rendered image and its label. We introduce the Simple-PAT algorithm, which uses zeroth-order optimization in the procedural generator's parameter space to propose adversarial training samples that are generated on demand. We also create PAL-Dojo, a collection of efficient procedural generators for surface normal estimation, image segmentation, and human pose estimation. Against a cross-model black-box adversary with 50M aggregate queries, Simple-PAT reduces worst-case error by a geometric mean of 3.15× compared to standard training and 2.63× compared to the strongest robust training baseline. Code is available at https://github.com/princeton-vl/procedural-adversarial-learning.

1 INTRODUCTION

Vision models deployed in the wild are often relied on to produce high-quality predictions in all situations. This is particularly important for self-driving cars, surgical robots, and heavy machinery, where failures in perception can lead to dangerous and costly mistakes. However, even well-trained neural networks often fail on simple scenes or natural adversarial examples (Hendrycks et al., 2021; Alcorn et al., 2019). This is not easily solved by scaling data or model size, as foundation VLMs also struggle on examples that are easy for humans (Li et al., 2024). These failures motivate training and evaluation techniques that explicitly account for worst-case error.

How can we train a model that has low worst-case error? A natural and established idea is to define a minimax learning objective: minimizing the worst-case error, defined as the maximum error over all possible instances of the task space. While simple to state, this minimax objective is challenging to operationalize: typically, we are given a fixed finite sample of the task instances such as a set of labeled images. This sample does not allow us to reliably estimate the maximum error over all possible images since failure cases may be unseen. If we cannot reliably measure the worst case error, we cannot reliably improve it.

To discover missed failure modes and reduce worst-case error, prior work in robust and adversarial machine learning has attempted to perturb existing images (e.g. Goodfellow et al. (2015); Engstrom et al. (2019); Hosseini & Poovendran (2018)). However, such perturbations are usually limited to simple transformations such as color jitter and spatial cropping, and cover only a tiny subset of valid image transformations. This is because automatically generating physically valid perturbations of existing images that span viewpoint changes, dynamic lighting, and shape deformation remains an active research challenge plagued by its own failure modes. On the other hand, collecting additional real-world data can be slow and expensive.

Thus, a key challenge of improving worst-case error lies in scalable discovery and generation of failure cases. In this work, we address this with Procedural Adversarial Learning (PAL), a framework

Figure

Figure

Figure 1: We compare Simple-PAT to training methods that uniformly sample data for each mini-batch. Left: Simple-PAT reduces worst-case error more effectively than uniform training and alternative methods. Right: Simple-PAT models perform much better on cases uniformly trained models found challenging. Uniform refers to the “Uniform (Muon)” setting, which is the stronger of the uniform training methods.

consisting of procedural adversarial training (PAT) and procedural adversarial evaluation (PAE); the key idea is to adversarially select samples using a procedural generator. During training, a learner updates the parameters of the network while an adversary searches for the worst case. For evaluation, a strong adversary searches the procedural parameter space for the task configuration that is most challenging for the model.

A procedural generator generates data through interpretable code: an image of a tree can be procedurally generated from scratch by code that simulates tree growth, bark material, light transport, and perspective projection. Procedural generation can create diverse photorealistic images (Raistrick et al., 2023; 2024), visual ground truth, and useful training data (Ma et al., 2026; Yan et al., 2026). Importantly, procedural generation enables scalable discovery and generation of failure cases. A well-designed procedural generator can offer a combination of properties unavailable from image-space perturbation: (1) wide coverage of task instances, (2) physically valid perturbations, (3) a small number of control parameters that help traverse the task space, (4) on-demand generation of new task instances.

These properties make procedural generators an especially strong tool for PAL, since we can effectively search a visually complex collection of scenes. This distinguishes PAL from conventional adversarial learning, which searches a limited set of image perturbations. The evaluation also distinguishes PAL from Adversarial Domain Randomization (Khirodkar & Kitani, 2021), which trains with the same minimax formulation over a simulator's parameters but evaluates mean performance in a target domain. In PAL, training seeks to minimize the worst case under the generator and evaluation searches for it directly. The challenge lies in developing training algorithms that reliably improve the worst case. This can be particularly difficult when failures occupy only a small region of the parameter space, or when learning one failure causes the model to forget scenes it previously handled.

We propose Simple-PAT, a simple algorithm for procedural adversarial training using adversaries that attack via zeroth-order optimization. Simple-PAT consists of a learner that trains the model through minibatch gradient descent and an adversary that uses Covariance Matrix Adaptation Evolution Strategy (CMA-ES) Hansen & Ostermeier (2001) to search on procedural controls to generate the next minibatch based on existing cases the model finds challenging.

To analyze PAT algorithms, we develop PAL-Dojo, a suite of procedural generators for three vision tasks: surface normal estimation, human pose estimation, and image segmentation. We design these generators to control the scenes' layout, lighting, shapes, and poses using between 13 and 69 parameters. We prioritize simplicity and efficiency of generation to facilitate algorithmic development.

We evaluate trained models on PAL-Dojo by treating them as a black box and adversarially attacking with a large query budget. We use a single-model adversary with 2M queries and a cross-model adversary with a total of 50M queries. In Figure 1, we compare Simple-PAT to a naive learner that samples every batch uniformly from the parameter space (uniform training), and to two methods that reweight uniform samples based on their loss (CVaR and tilted ERM). Under the cross-model adversary, Simple-PAT lowers the worst case on every task, by a geometric mean of 3.15×3.15 \times relative to uniform training and 2.63×2.63 \times relative to the strongest other method on each task. We also evaluate the robustness of SOTA foundation models using the PAL-Dojo generators, finding severe failure cases with our adversary. This demonstrates that PAL-Dojo, though visually simple, provides sufficient challenge to SOTA models.

In summary, our contributions are threefold: (1) Procedural Adversarial Learning (PAL), a framework that pairs minimax training under a procedural generator with worst-case evaluation by an adaptive adversary; (2) Simple-PAT, a simple yet effective procedural adversarial training algorithm; (3) PAL-Dojo, a suite of simple, efficient but sufficiently hard procedural generators for vision tasks, designed to facilitate the study of PAL.

References (35)