atlas

Research map / Adversarial robustness and security / Certified and empirical robustness

Learning Randomized Algorithms with Transformers

ICLR 2025 · Adversarial robustness and security › Certified and empirical robustness · approach: Robust overfitting and regularization · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that transformers with random seed inputs can learn randomized algorithms when trained with a q-norm relaxed adversarial objective over multiple seeds, outperforming deterministic and ERM-trained counterparts on associative recall, graph coloring, and grid-world exploration.

Problem

Standard expected-risk training of transformers yields deterministic behavior, which is brittle against adversarial inputs; the paper asks whether randomized algorithms can be learned inside transformers via an adversarial objective.

Approach

Feed a random seed as an extra input token to the transformer and train with a q-norm relaxation of the min-max loss, averaging loss over m sampled seeds per input, so optimization learns to exploit the randomness; majority voting over seeds at inference further boosts success.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train with the relaxed adversarial objective using multiple random seeds instead of a fixed seedTransformer · Associative recall95th-percentile success rateHelped
Use majority voting across random seeds (ablation)A^q_R · Associative recallsuccess rateHelped
Train with q=100 instead of ERM (q=1) (ablation)Multi-seed transformer · Associative recall95th-percentile success rateHelped
Provide multiple random seeds during ERM training instead of a single fixed seed (ablation)Transformer · Associative recallperformanceNo clear effect
Increase q above 1 during training (ablation)Multi-seed transformer · Associative recallworst-case success rateHelped
Increase the number of seeds m beyond 1 (ablation)A^q_R · Associative recallperformanceHelped
Train with the relaxed adversarial objective using multiple random seeds instead of a fixed seedTransformer · 3-coloring cycles C_10worst-case success probabilityHelped
Use majority voting across random seeds (ablation)A^q_R · 3-coloring cycles C_10success probabilityHelped
Increase q above 3 during training (ablation)Multi-seed transformer · 3-coloring cycles C_10worst-case performanceHelped
Use output sampling instead of learned input-seed randomization (ablation)A^q_{r_0} · 3-coloring cycles C_10success probabilityHurt
Train with the relaxed adversarial objective using random seedsTransformer agent · Grid world95th-percentile accumulated rewardHelped
Increase the number of seeds m to at least 10 (ablation)A^q_R · Grid worldaverage performanceHelped

Surprising findings

Limitations

Experimental setup

Benchmarks: associative recall (N=20) 3-coloring of cycles C_10 5x5 grid world exploration

Metrics: average success rate 95th-percentile (adversarial) success rate accumulated reward predictive variance over seeds

Baselines: A^E_r0 (ERM single seed) A^E_R (ERM multi seed) A^q_r0 (adversarial single seed)

Builds on: Yao's minimax principle distributionally robust optimization PEPG randomized smoothing

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy