LEVERAGING DEEP LEARNING AND LARGE LANGUAGE MODELS FOR REQUIREMENT CLASSIFICATION: A COMPARATIVE STUDY

LEVERAGING DEEP LEARNING AND LARGE LANGUAGE MODELS FOR REQUIREMENT CLASSIFICATION: A COMPARATIVE STUDY. Masters thesis, King Fahd University of Petroleum and Minerals.

[img] PDF (Masters Thesis Dissertation)
Masters_Thesis_Dissertation(Final_Version).pdf - Accepted Version
Restricted to Repository staff only until 23 December 2026.
Available under License Creative Commons GNU GPL (Software).

Download (2MB)

Arabic Abstract

يُعدّ تصنيف متطلبات البرمجيات إلى متطلبات وظيفية (FR) وغير وظيفية (NFR) مهمةً أساسية ولكنها شاقّة في مجال هندسة متطلبات البرمجيات (SRE)، نظرًا لكونها تستغرق وقتًا طويلاً وتتطلب جهدًا بشريًا كبيرًا. وعلى الرغم من أن نماذج التعلم العميق (DL) قد أثبتت قدرتها على أتمتة هذه العملية، فإن النماذج اللغوية الكبيرة (LLMs) قدّمت اتجاهًا جديدًا يعتمد على التعلم من السياق، ويُظهر إمكانية تحقيق دقة عالية دون الحاجة إلى بيانات تدريبية ضخمة. تقدم هذه الرسالة دراسةً مقارنة بين أداء ثلاثة نماذج تقليدية من التعلم العميق (CNN وBi-LSTM وGRU) وأربعة نماذج لغوية كبيرة حديثة (ChatGPT، Gemini، LLaMA، وDeepSeek) في مهمة تصنيف متطلبات البرمجيات إلى FR/NFR. وتعتمد منهجية الدراسة على تدريب نماذج التعلم العميق على بيانات مُعالجة مسبقًا من متطلبات برمجية، في حين تم تقييم النماذج اللغوية الكبيرة باستخدام أسلوبي التلقين بدون أمثلة (Zero-Shot) ومع عدد قليل من الأمثلة (Few-Shot)، وذلك باستخدام مجموعة الاختبار نفسها. أظهرت النتائج أن نموذج CNN حقق أعلى دقة بين نماذج التعلم العميق بنسبة 92.0%. كما حقق نموذج Gemini من فئة النماذج اللغوية الكبيرة دقة بلغت 91.5% باستخدام التلقين القليل، مما يدل على قدرة هذه النماذج على منافسة النماذج المتخصصة المُدرَّبة دون الحاجة إلى تدريب إضافي. وتشير الدراسة إلى وجود مفاضلة واضحة بين المنهجين؛ إذ تتميز نماذج التعلم العميق بانخفاض تكلفة الاستدلال، لكنها تتطلب كميات كبيرة من البيانات المُصنفة، بينما توفر النماذج اللغوية الكبيرة كفاءة عالية من حيث البيانات، مقابل تكلفة استدلال أعلى وحساسية أكبر لتصميم التلقين. كما تسلط الرسالة الضوء على تجربة إعادة صياغة لمجموعة من المتطلبات التي أخفقت جميع النماذج في تصنيفها، حيث أدى تحسين الصياغة والتركيب اللغوي إلى رفع دقة النماذج اللغوية الكبيرة بنسبة وصلت إلى 30 نقطة مئوية، مما يشير إلى أن أسباب الإخفاق غالبًا ما تكون تركيبية أكثر من كونها دلالية. وتُظهر نتائج هذه الدراسة أن الدمج بين منهجي التعلم العميق والنماذج اللغوية الكبيرة قد يمثل اتجاهًا واعدًا نحو تطوير أنظمة هجينة تستفيد من نقاط القوة في كلا النهجين، بما يعزز كفاءة وموثوقية أدوات أتمتة هندسة المتطلبات مستقبلًا.

English Abstract

The accurate classification of software requirements into functional (FR) and non-functional (NFR) categories is a critical yet labor-intensive task in Software Requirements Engineering (SRE). While deep learning (DL) models have shown promise in automating this process, the emergence of Large Language Models (LLMs) presents a new paradigm with the potential for high accuracy with minimal training data. This thesis presents a comparative study evaluating the performance of traditional DL architectures (CNN, Bi-LSTM, and GRU) against four contemporary LLMs (ChatGPT, Gemini, LLaMA, and DeepSeek) for FR/NFR classification. Our methodology involved training the DL models on a pre-processed dataset of software requirements, while the LLMs were evaluated using zero-shot and few-shot prompting techniques on the same holdout test set. The experimental results show that a Convolutional Neural Network (CNN) achieved the highest accuracy among the DL models at 92.0%. Notably, the Gemini LLM, with a few-shot prompting strategy, achieved a comparable accuracy of 91.5%, demonstrating that LLMs can rival specialized, trained models with minimal-to-no task-specific training data. A key finding of this research is the trade-off between DL and LLM approaches: DL models offer lower inference costs but require extensive labeled data for training, whereas LLMs are more data-efficient but come with higher computational costs and exhibit sensitivity to prompt design. Furthermore, a novel paraphrasing experiment on a set of requirements consistently misclassified by all models revealed that stylistic and structural regularization could improve LLM accuracy by up to 30 percentage points, shifting errors from structural to lexical. This suggests that while both paradigms have their merits, the future of automated requirements classification may lie in hybrid systems that leverage the strengths of both. This work contributes to the field by providing a direct comparative benchmark and offering insights into the practical application of LLMs in SRE.

Item Type: Thesis (Masters)
Subjects: Computer
Department: College of Computing and Mathematics > Information and Computer Science
Committee Advisor: Mahmood Khan, Niazi
Committee Members: Irfan, Ahmed and Omar Jamal, Hammad
Depositing User: HAMDAN AHMED (g202303850)
Date Deposited: 23 Dec 2025 07:25
Last Modified: 23 Dec 2025 07:25
URI: http://eprints.kfupm.edu.sa/id/eprint/143786