Skip to main content
QUICK REVIEW

[Paper Review] Technical Report on Neural Language Models and Few-Shot Learning for Systematic Requirements Processing in MDSE

Vincent Bertram, Miriam Boß|arXiv (Cornell University)|Jan 1, 2022
Software Engineering ResearchComputer Science2 citations
TL;DR

This paper proposes using few-shot fine-tuning of large pre-trained language models (e.g., GPT-J6B) to automatically translate informal natural language requirements into a formal, domain-specific DSL for automotive systems engineering. The key contribution is demonstrating that fewer than ten annotated examples suffice to achieve high-quality translation, enabling scalable, low-resource formalization of legacy requirements with minimal human effort and high syntactic consistency.

ABSTRACT

Systems engineering, in particular in the automotive domain, needs to cope with the massively increasing numbers of requirements that arise during the development process. To guarantee a high product quality and make sure that functional safety standards such as ISO26262 are fulfilled, the exploitation of potentials of model-driven systems engineering in the form of automatic analyses, consistency checks, and tracing mechanisms is indispensable. However, the language in which requirements are written, and the tools needed to operate on them, are highly individual and require domain-specific tailoring. This hinders automated processing of requirements as well as the linking of requirements to models. Introducing formal requirement notations in existing projects leads to the challenge of translating masses of requirements and process changes on the one hand and to the necessity of the corresponding training for the requirements engineers. In this paper, based on the analysis of an open-source set of automotive requirements, we derive domain-specific language constructs helping us to avoid ambiguities in requirements and increase the level of formality. The main contribution is the adoption and evaluation of few-shot learning with large pretrained language models for the automated translation of informal requirements to structured languages such as a requirement DSL. We show that support sets of less than ten translation examples can suffice to few-shot train a language model to incorporate keywords and implement syntactic rules into informal natural language requirements.

Motivation & Objective

  • Address the challenge of inconsistent, ambiguous natural language requirements in automotive systems engineering.
  • Reduce the high effort and cost of manual translation from natural language to formal, structured DSLs.
  • Enable scalable, low-resource formalization of legacy requirements using few-shot learning with pre-trained language models.
  • Support model-driven systems engineering (MDSE) by improving traceability, consistency, and early error detection.
  • Facilitate adoption of formal DSLs in industrial settings, especially for small teams or single projects with limited data.

Proposed method

  • Analyze an open-source automotive requirements dataset to identify common ambiguities and formulate domain-specific DSL constructs.
  • Design a domain-specific language (DSL) with syntax and semantics tailored to automotive requirements, emphasizing intuitive phrasing and formal structure.
  • Use few-shot learning with large language models (e.g., GPT-J6B) to train translation from natural language to DSL using only 1–6 support examples per translation pattern.
  • Structure training examples around specific linguistic patterns (e.g., if-then logic, modal verbs, propositional logic) to guide the model’s syntactic and semantic mapping.
  • Apply human-annotated translation examples to minimize distribution shift and ensure correctness in context-specific formulations.
  • Evaluate translation quality via human labeling (n=5 engineers) and majority voting to ensure reliability and mitigate bias.

Experimental results

Research questions

  • RQ1Can few-shot learning with large language models achieve accurate translation of informal natural language requirements into a formal, domain-specific DSL?
  • RQ2How many few-shot examples are required to achieve reliable and consistent translation for different linguistic structures in automotive requirements?
  • RQ3To what extent can pre-trained language models generalize across diverse syntactic patterns in requirements engineering without full fine-tuning?
  • RQ4How does human supervision impact the quality and consistency of automated translation in low-data regimes?
  • RQ5Can this approach be effectively applied to legacy requirements without requiring large-scale re-annotation or full fine-tuning?

Key findings

  • Few-shot learning with GPT-J6B achieved high translation accuracy using only 1 to 6 support examples per translation pattern, demonstrating feasibility in low-data settings.
  • The model successfully translated complex structures such as if-then logic, modal verbs (e.g., 'must', 'may'), and propositional logic (e.g., '≤', '≥') into formal DSL syntax with high consistency.
  • For the if-then structure, the model achieved 100% accuracy on 6-shot and 4-shot setups, with 91% accuracy on 1-shot, indicating strong few-shot generalization.
  • Translation of propositional logic constructs (e.g., 'equal to', 'less than or equal to') reached 100% accuracy when trained on keyword-specific examples, even with minimal data.
  • The model correctly extracted semantic elements such as variables and bounds (e.g., 'horn loudness ≤50dB'), enabling downstream traceability and consistency checking.
  • Human evaluation confirmed high reliability, with majority voting among five engineers used to validate results and reduce bias in labeling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.