Zing Forum

Reading

Evolving Neural Network Architectures: A Genetic Algorithm-Based System for Predicting Automotive Fuel Efficiency

This project uses the UCI Auto MPG dataset, implements a genetic algorithm to automatically search for the optimal neural network architecture, compares three models (linear regression, manually designed neural network, and evolved neural network), and demonstrates the application value of neural architecture search in regression tasks.

遗传算法神经架构搜索燃油效率预测神经网络机器学习汽车工程回归分析进化计算
Published 2026-05-21 17:43Recent activity 2026-05-21 17:50Estimated read 5 min
Evolving Neural Network Architectures: A Genetic Algorithm-Based System for Predicting Automotive Fuel Efficiency
1

Section 01

Project Introduction: A Genetic Algorithm-Based System for Predicting Automotive Fuel Efficiency

This project addresses the nonlinear challenges of automotive fuel efficiency prediction, uses the UCI Auto MPG dataset, automatically searches for the optimal neural network architecture via genetic algorithm, compares three models (linear regression, manually designed neural network, and evolved neural network), and demonstrates the application value of neural architecture search in regression tasks.

2

Section 02

Project Background and Research Motivation

Fuel efficiency prediction is critical for the automotive industry to meet environmental regulations and influence consumer decisions. However, it is affected by complex nonlinear interactions of multiple factors, and traditional physical modeling requires hard-to-obtain thermodynamic parameters. Neural networks can model nonlinear relationships, but their architecture design relies on manual parameter tuning; Neural Architecture Search (NAS) automatically explores the structure space through evolutionary algorithms. This project applies NAS to automotive engineering problems, combining predictive modeling with meta-learning.

3

Section 03

Dataset Features and Preprocessing

The UCI Auto MPG dataset is used (398 vehicles from 1970-1982, from the US, Japan, and Europe). The target variable is MPG, and predictive features include the number of cylinders, displacement, horsepower, etc. Preprocessing handles missing horsepower values, constructs a composite feature of power-to-weight ratio, and uses one-hot encoding for origin. EDA reveals regional differences: Japanese cars average 31 MPG, European cars 27 MPG, and American cars 18-19 MPG.

4

Section 04

Model Architecture and Implementation Strategy

Three comparative models are implemented: 1. Baseline linear regression (scikit-learn); 2. Manually designed neural network (TensorFlow/Keras, [64,32] structure, ReLU activation, Adam optimization); 3. Genetic algorithm-evolved neural network: The search space for neurons per layer is {8,16,32,64,128}, with a population of 10 and 5 generations of evolution. The selection strategy retains the top 4 parents, with 2 elites preserved, and a mutation probability of 30%. The optimal architecture is [8,128].

5

Section 05

Experimental Results and Performance Comparison

Performance of the three models: Linear regression (MSE 8.03, R² 0.851), manually designed NN (MSE 4.77, R² 0.911), evolved NN (MSE 5.21, R² 0.903). Key findings: NNs are significantly better than linear models; manually designed NNs slightly outperform evolved ones but the gap is small; evolved models have better MAE (1.72 vs. 1.76); genetic algorithms find optimal solutions early and maintain them via elite preservation.

6

Section 06

Technical Implementation and Engineering Practice

The code structure includes data_prep.py (preprocessing), eda_analysis.py (EDA), model_training.py (model training and NAS), and demonstration.py (interactive interface). Dependencies include pandas, numpy, scikit-learn, tensorflow, etc., compatible with Python 3.8+.

7

Section 07

Research Insights and Future Outlook

Insights: NAS entry-level example, feature engineering needs to combine domain knowledge, model selection requires balancing parameter tuning cost and performance; Future directions: expand the search space to multiple layers, try other evolutionary strategies, introduce regularization, apply to modern vehicle datasets, etc.