NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Study of Fitness Gains in Evolving Finite State Machines

Gabor Zoltai, Yue Xie, Frank Neumann · DOI

Abstract

In evolutionary computing, the synthesis of Finite State Machines (FSMs) to recognize regular languages involves a delicate balance between model accuracy and structural complexity. This study investigates how the length of training samples influences the evolutionary trajectory of FSMs. Contrary to the intuition that longer, more "informative" strings would accelerate learning, our findings suggest that longer strings significantly slow down fitness gains. This phenomenon is attributed to the sparsity of the problem space and the lack of selection pressure on intermediate states, a condition we term "prefix blindness."

Introduction

Evolving simple models like Finite State Machines to perform complex tasks—such as recognizing specific patterns within a "Regular Language"—is a cornerstone of evolutionary computation. A central challenge in this field is understanding how the nature of training data influences the speed and success of the evolutionary process. Specifically, researchers face a trade-off: we require FSMs that are highly accurate (linguistic fitness) while remaining as simple as possible (low state count).

This paper addresses a fundamental question: Does providing longer, more complex training strings assist the evolutionary process by providing more information, or does it hinder it by complicating the search space?

Methodology

The study utilizes a multi-objective evolutionary approach to balance two conflicting goals:

  1. Maximizing Recognition: Correctly identifying whether a string belongs to a target language.
  2. Minimizing Complexity: Keeping the number of states in the FSM as low as possible.

The researchers employed the SMO-GP (Simple Multi-Objective Genetic Programming) algorithm. This algorithm maintains a population of FSMs and uses the concept of "dominance" to filter candidates: a new mutant is retained only if it is at least as effective as an existing one in both objectives and strictly better in at least one.

Data Sampling Strategies

To test the impact of data length, two distinct sampling methods were compared:

  • Balanced Short Strings (Bss): Generates a training set starting from the absolute shortest possible strings in the language.
  • Random Length ($Rle_n$): Draws strings uniformly at random from all possible strings up to a maximum length $n$.

Experimental Design

The experiments utilized synthetic datasets based on the "Universal Witness" ($U_n$) family of regular languages. These languages are mathematically significant because a language $U_n$ is guaranteed to require at least $n$ states for perfect recognition, allowing for precise control over task difficulty. For each experiment, a fixed-size training set of 1,000 strings (500 positive, 500 negative) was generated for $U_3, U_4,$ and $U_5$ languages.

Key Insights: The Paradox of Information

The Sparsity Problem

Intuitively, a longer string contains more information about the rules of a language than a short one. However, the study found that longer strings lead to slower evolution. As the maximum length of strings ($n$) increases, the total number of possible strings grows exponentially. Consequently, a fixed-size sample of 1,000 strings becomes a progressively smaller percentage of the total space. This "sparser coverage" makes it significantly harder for the evolutionary algorithm to identify the underlying pattern.

Prefix Blindness

A long string is composed of many leading substrings, or prefixes. If a training set consists primarily of long strings, a mutant FSM might correctly classify a long string by chance while failing on its shorter components. Because those shorter components are absent from the training set, the FSM is not penalized for these errors. This results in "prefix blindness," where selection pressure is less directed and effective, leading to a more erratic evolutionary path.

Results and Discussion

Quantitative results across 30 independent runs revealed a clear trend:

  • Speed of Convergence: For the $U_3$ language, the Bss method (shortest strings) reached perfect fitness (1000/1000) significantly faster than any $Rle_n$ method.
  • Fitness Gaps: After 10 million generations for $U_3$, the $Bss$ and $Rle_7$ methods achieved perfect scores. In contrast, the $Rle_{15}$ method—which utilized the longest strings—lagged behind with a mean score of only 951.63.
  • Consistency: This pattern—where higher $n$ (longer strings) results in slower fitness gains—was consistently observed across $U_3, U_4,$ and $U_5$ test cases.

Conclusion and Future Work

The study demonstrates that in the evolution of FSMs, "more" is not necessarily "better" when it comes to training data length. Shorter strings provide a more dense and manageable representation of the language's core logic, allowing for faster convergence.

Future research may explore the impact of population diversity on these findings, as SMO-GP typically operates with small populations. Additionally, the researchers suggest investigating "Curriculum Learning"—a method where the training set shifts over time, starting with short strings and gradually introducing longer ones—to determine if this can optimize the evolutionary path and overcome the hurdles of sparsity and prefix blindness.

Summary updated

BibTeX
@inproceedings{zoltai2023study,
  author = {Gabor Zoltai and Yue Xie and Frank Neumann},
  title = {{A Study of Fitness Gains in Evolving Finite State Machines}},
  booktitle = {AI},
  year = {2023},
  doi = {10.1007/978-981-99-8391-9\_38},
}
Figure