[Paper Review] GP4P4: Enabling Self-Programming Networks
GP4P4 is a genetic programming framework that automatically generates P4 programs for programmable switches directly from high-level network intents, using Linear Genetic Programming (LGP) with a synthetic trace-based evaluation engine. It achieves self-programming of small network functions in under 8 minutes, demonstrating a key step toward self-driving networks with minimal human intervention.
Recent advances in programmable switches have enabled network operators to build high-speed customized network functions. Although this is an important step towards self-* networks, operators are now faced with the burden of learning a new language and maintaining a repository of network function code. Inspired by the Intent-Based Networking paradigm, we propose a new framework, GP4P4: a genetic programming approach able to autonomously generate programs for P4-programmable switches directly from network intents. We demonstrate that GP4P4 is able to generate various small network functions in up to a few minutes; an important first step towards realizing the vision of `Self-Driving' networks.
Motivation & Objective
- To address the growing complexity and maintenance burden of manually writing and updating P4 programs for programmable switches.
- To enable network operators to define network behavior through high-level, human-readable behavioral rules instead of low-level P4 code.
- To automate the generation of correct and efficient P4 programs using machine learning, reducing human error and development time.
- To create a self-sufficient framework that evaluates programs via synthetic network traces, eliminating dependency on real switches or live traffic.
- To demonstrate feasibility and efficiency of autonomous P4 program generation for practical network functions.
Proposed method
- GP4P4 uses Linear Genetic Programming (LGP) to evolve a population of P4 programs from an initial random set toward satisfying a given set of behavioral rules.
- The framework defines behavioral rules as IF-THEN predicates on packet headers and metadata, specifying desired input-output behavior.
- A custom evaluation module generates synthetic network traces tailored to each rule set and simulates P4 program outputs to compute fitness scores.
- Genetic operations—crossover and mutation—are applied to evolve better-performing programs across generations.
- Selection is performed via tournament selection, and the process iterates until a program satisfies all behavioral rules.
- The framework includes default rules to preserve unmatched packet attributes, ensuring correctness by default.
Experimental results
Research questions
- RQ1Can a genetic programming framework automatically generate correct P4 programs from high-level network intents without human-written templates?
- RQ2How efficient is the program generation process in terms of time and computational resources?
- RQ3What impact do genetic programming parameters (e.g., population size, crossover rate) have on generation time and success rate?
- RQ4Can the framework generate diverse, correct network functions (e.g., NAT, firewall, router) using only synthetic traces and no real network data?
- RQ5Is the evaluation mechanism based on synthetic traces sufficient to guide effective evolution toward correct P4 programs?
Key findings
- GP4P4 successfully generated 7 small network functions—including NAT, firewall, and router—within a median time of under 8 minutes, with 95% of runs completing in less than 10 minutes.
- The framework achieved a 100% success rate in generating correct P4 programs for all tested network functions across 100 independent runs.
- Limiting the maximum initial program length to 10 lines significantly reduced average generation time, suggesting early convergence on minimal, correct solutions.
- Crossover was found to be essential for reducing both average generation time and variance, especially for complex functions like the Router.
- A low tournament size ratio (≤0.1) improved convergence speed and reduced variance by allowing more diverse program exploration.
- Mutation had a measurable positive effect on the Router function, reducing both average time and variance, and did not degrade performance on other functions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.