Denial of Service on AI
Resource exhaustion attacks on AI
Resource exhaustion attacks on AI
Traditional denial-of-service attacks overwhelm a server with traffic. AI-specific DoS attacks are smarter: they craft inputs that maximize computation time, drain GPU memory, and inflate API costs โ all with just a few carefully designed requests.
Normal vs Adversarial Compute Cost
Inputs specifically crafted to maximize the model's computation time. They exploit architectural bottlenecks, forcing the model to activate every neuron and take the slowest possible path through the network.
Prompts designed to make LLMs generate extremely long outputs. A simple question that triggers an exhaustive list, an infinite loop of reasoning, or verbose explanations can consume massive amounts of tokens and compute.
Triggering expensive chain-of-thought loops that never converge. The model keeps reasoning, re-evaluating, and second-guessing itself, burning through compute on a single request.
Uploading complex, high-resolution images with dense patterns that take orders of magnitude longer to process than normal photos. A single image can tie up GPU resources for minutes.
AI DoS attacks are not just about crashing services. They are about draining money. GPU compute is expensive, and most AI services bill by usage. An attacker who can make your model 100x slower per request effectively multiplies your infrastructure costs by 100.
A few thousand carefully crafted requests could cost an AI service provider thousands of dollars in GPU time, making the service unprofitable to run. This is economic warfare against AI businesses.
Cap requests per user/IP to prevent abuse at scale.
Reject inputs that are abnormally large, complex, or structured to trigger expensive computation.
Cap maximum output tokens and reasoning steps to prevent runaway generation.
Real-time alerts on per-request compute costs. Flag and throttle requests that exceed normal cost profiles.
AI DoS attacks do not just crash servers โ they drain expensive GPU resources and inflate costs. A single well-crafted request can consume more compute than thousands of normal requests, making economic attacks a real threat to AI services.
For hands-on practice, check out the AI Security course on GitHub.