CloakFEM: Agentic FEM Code Generation for Red-Teaming Computational Resource Exhaustion
On the map: LLM agents and tool use → Agent threats, guardrails and governance also fits: Software engineering coding agents
also in 1 more
Abstract (arXiv)
Finite element method (FEM) solvers are foundational to scientific and engineering simulation, yet their susceptibility to efficiency attacks remains largely unexplored. An adversary can craft syntactically valid and runnable FEM programs that complete successfully while forcing excessive computational work, enabling computational denial-of-service (DoS) attacks. Finding such inputs is challenging because FEM programs occupy a vast, structured space constrained by numerical, geometric, and constitutive requirements. We introduce CloakFEM, a domain-guided LLM-agent framework for automatically generating runnable adversarial FEM programs that amplify solver computation. CloakFEM combines LLM-guided search with an FEM-specific intermediate representation and a deterministic validity gate that enforces runnable constraints. Across three FEM stacks, 17 problem classes, and 1,068 seeds, CloakFEM discovers adversarial inputs that substantially amplify solver work while remaining valid and solvable. In the most extreme case, solver iterations increase from 43 to 247,367, a (5,752.72×) amplification. CloakFEM outperforms five generic black-box baselines and retains an advantage over evolutionary search under a controlled bounded action space. Cross-solver analysis further reveals both problem-intrinsic and solver-specific sources of vulnerability. Our results uncover an underexplored efficiency-attack surface in FEM solvers and show that runnable FEM programs can serve as adversarial inputs.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 16 of its 46 references that are in the map. Submitted 3 Nov 2026.
Builds on
16 of 46 references.
References · 16
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2021Program Synthesis with Large Language Modelscited by 3,972
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 2,069
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,155
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discoverycited by 1,078
- 2023Large Language Models as Optimizerscited by 985
- 2024Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Modelcited by 299
- 2020Sponge Examples: Energy-Latency Attacks on Neural Networkscited by 116
- 2020A Panda? No, It's a Sloth: Slowdown Attacks on Adaptive Multi-Exit Neural Network Inferencecited by 62
- 2022NICGSlowDown: Evaluating the Efficiency Robustness of Neural Image Caption Generation Modelscited by 54
- 2024An Engorgio Prompt Makes Large Language Model Babble oncited by 33
4 more
- 2022Phantom Sponges: Exploiting Non-Maximum Suppression to Attack Deep Object Detectorscited by 29
- 2022LLMEffiChecker: Understanding and Testing Efficiency Degradation of Large Language Modelscited by 18
- 2026PDEAgent-Bench: A Multi-Metric, Multi-Library Benchmark for PDE Solver Generationcited by 13
- 2022Evaluating the Adversarial Robustness for Fourier Neural Operatorscited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026ALL-FEM: Agentic Large Language models Fine-tuned for Finite Element Methods
- 2025FEABench: Evaluating Language Models on Multiphysics Reasoning Ability
- 2026Scientific Coding with Large Language Models: Evidence from Finite Element Analysis
- 2025SciML Agents: Write the Solver, Not the Solution
- 2026MatClaw: An Autonomous Code-First LLM Agent for End-to-End Materials Exploration
- 2025FEM-Bench: A Structured Scientific Reasoning Benchmark for Evaluating Code-Generating LLMs
- 2026VFEAgent: A Multimodal Agent Framework for End-to-End Automated Finite Element Analysis
- 2025MooseAgent: A LLM Based Multi-agent Framework for Automating Moose Simulation