CODE: A contradiction-based deliberation expansion framework against overthinking attacks on retrieval-augmented generationCODE: A Contradiction-Based Deliberation Extension Framework for Overthinking Attacks on Retrieval-Augmented Generation
The researchers propose an end-to-end attack framework named CODE, pointing out that retrieval-augmented generation (RAG) systems equipped with reasoning models inherit the risk of overthinking attacks. CODE uses a multi-agent architecture to construct poisoned samples and inject them into the knowledge base; the samples are highly relevant to user queries and can therefore be retrieved, and they create contradictions between the logical layer and the evidence layer, with styles optimized through diversification, inducing the model to generate excessive reasoning tokens. The attack requires no modification of user queries and does not affect task accuracy, so the reasoning overhead is extremely difficult to detect. Experiments on two datasets and five commercial reasoning models show that the attack increases reasoning token consumption by 5.32x-24.72x, with no degradation in task performance. The authors also discuss and evaluate potential countermeasures to mitigate the overthinking risk.