Automatic Identification of Ambiguities in Software Requirements Using Zero-Shot Classification
摘要
This study addressed the problem of ambiguity in Software Requirements Specifications (SRS) through an innovative zero-shot classification approach, aiming to automatically identify and classify types of linguistic ambiguity without requiring large volumes of labeled data. We proposed a model based on Transformer and BERT architectures, adapted to capture ambiguous linguistic phenomena, utilizing two main components: an ambiguous expressions encoder and an ambiguity types encoder. The methodology included unsupervised pretraining with pseudo-labels and contrastive fine-tuning to maximize similarity between ambiguous expressions and their corresponding categories. Results demonstrated that the model with contrastive pretraining (CP) achieved an average performance of 41.78% Macro F₁ in unsupervised zero-shot scenarios, showing significant improvement over traditional approaches. In supervised settings, the combination of CP and contrastive fine-tuning reached 49.45% Macro F₁, evidencing the method's effectiveness in generalizing to new ambiguity categories. These findings suggest that integrating contrastive techniques with ambiguity-specialized models can enhance software requirements quality from early stages, though challenges remain to achieve higher accuracy levels.