# GEML: A Grammar-based Evolutionary Machine Learning Approach for Design-Pattern Detection

arXiv: https://arxiv.org/abs/2401.07042 · HTML: https://mlsanity.com/paper/2401.07042/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 1 of its 68 references that are in the map.
- First posted on arXiv 13 Jan 2024.

## Builds on (most cited first, 1 of 1)

- [Feature Maps: A Comprehensible Software Representation for Design Pattern Detection](https://mlsanity.com/paper/1812.09873/) (2018)

## Built on by (most cited first, 3 of 3)

- [Automatic selection of primary studies in systematic reviews with evolutionary rule-based classification](https://mlsanity.com/paper/2509.23981/) (2025)
- [LLM-Based Design Pattern Detection](https://mlsanity.com/paper/2502.18458/) (2025)
- [A Methodology for Investigating AI Patterns Prevalence in Software Repositories](https://mlsanity.com/paper/2607.00558/) (2026)

## Abstract (arXiv)

Design patterns (DPs) are recognised as a good practice in software development. However, the lack of appropriate documentation often hampers traceability, and their benefits are blurred among thousands of lines of code. Automatic methods for DP detection have become relevant but are usually based on the rigid analysis of either software metrics or specific properties of the source code. We propose GEML, a novel detection approach based on evolutionary machine learning using software properties of diverse nature. Firstly, GEML makes use of an evolutionary algorithm to extract those characteristics that better describe the DP, formulated in terms of human-readable rules, whose syntax is conformant with a context-free grammar. Secondly, a rule-based classifier is built to predict whether new code contains a hidden DP implementation. GEML has been validated over five DPs taken from a public repository recurrently adopted by machine learning studies. Then, we increase this number up to 15 diverse DPs, showing its effectiveness and robustness in terms of detection capability. An initial parameter study served to tune a parameter setup whose performance guarantees the general applicability of this approach without the need to adjust complex parameters to a specific pattern. Finally, a demonstration tool is also provided.
