HiddenLens detects and resolves hidden software requirements assumptions
HiddenLens: A Multi-Layer LLM Framework for Detecting and Resolving Hidden Assumptions in Software Requirements
Software EngineeringArtificial IntelligenceComputation and Language
Summary
Software requirements written in natural language often leave out important assumptions about how things should work, which can cause costly problems later on. The authors created HiddenLens, a six-step method that uses AI tools to find these hidden assumptions, explain their risks, categorize them, suggest clarifications, allow human review, and rewrite the requirements clearly. They also built a new dataset with many examples of hidden assumptions to help train their system. HiddenLens performs much better than older methods, helping teams catch and fix hidden assumptions before development starts.
What this means in practice
- •For software analysts: Identify and clarify hidden assumptions in software requirements early to reduce costly fixes during development.
- •For quality assurance teams: Generate clearer, testable requirements to improve the effectiveness of software testing and validation.
Authors
Tanu Singh, Aashna Suman, Vinod Patidar
Abstract
Natural-language software requirements often omit assumptions about performance, operating conditions, user behaviour, and domain constraints, affecting architecture, testing, and deployment. If undiscovered until implementation, resolving them is far more costly than addressing them early. Although ambiguity and vagueness are widely studied, less attention has been given to assumptions embedded in requirements that appear clear and reasonable. We propose HiddenLens, a novel six-layer BERT-LLM pipeline and, to our knowledge, the first framework engineered to detect, classify, question, and resolve hidden assumptions rather than merely flag ambiguity. Layer 1 uses BERT attention entropy to localise unresolved spans; Layer 2 uses CoT-prompted LLM reasoning to articulate each assumption and its failure risk; Layer 3 uses fine-tuned BERT to classify assumptions into six non-functional requirement categories: performance, security, scalability, usability, reliability, and domain; Layer 4 generates ranked clarification options using FS LLM prompting; Layer 5 enables human validation through confirmation, editing, or rephrasing; and Layer 6 rewrites the requirement using the confirmed resolution, producing an explicit, testable, and traceable requirement. We also introduce the HiddenLens Corpus (HLC), comprising 312 requirements annotated with 847 hidden assumptions across six NFR categories. Inspired by PROMISE and PURE, HLC addresses the lack of annotated data for this task and is, to our knowledge, the first dataset developed specifically for it. HiddenLens outperforms keyword-based and QuARS-Adapted baselines by 71% and 61%, respectively, achieving an end-to-end F1-score of 0.79; its BERT-based NFR classifier achieves an F1-score of 0.847. These results indicate that HiddenLens can help analysts resolve hidden assumptions before they propagate through software development.