{"data":{"slug":"joeddav-devol","name":"devol","tagline":"Early POC of genetic neural architecture search","github_url":"https://github.com/joeddav/devol","owner":"joeddav","repo":"devol","owner_avatar_url":"https://avatars.githubusercontent.com/u/9353833?v=4","primary_language":"Python","stars":950,"forks":114,"topics":["automl","computer-vision","deep-learning","genetic-algorithm","keras","machine-learning","neural-architecture-search"],"archived":false,"github_pushed_at":"2023-05-25T14:45:47+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/joeddav-devol","markdown_url":"https://www.graphcanon.com/tools/joeddav-devol.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/joeddav-devol","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=joeddav-devol","description":"Early POC of genetic neural architecture search","homepage_url":null,"license":"MIT","open_issues":7,"watchers":42,"ai_summary":null,"readme_excerpt":"# DEvol - Deep Neural Network Evolution\n\nDEvol (DeepEvolution) is a basic proof of concept for genetic architecture\nsearch in Keras. The current setup is designed for classification problems,\nthough this could be extended to include any other output type as well.\n\nSee `example/demo.ipynb` for a simple example.\n\n## Evolution\n\nEach model is represented as fixed-width genome encoding information about the\nnetwork's structure. In the current setup, a model contains a number of\nconvolutional layers, a number of dense layers, and an optimizer. The\nconvolutional layers can be evolved to include varying numbers of feature maps,\ndifferent activation functions, varying proportions of dropout, and whether to\nperform batch normalization and/or max pooling. The same options are available\nfor the dense layers with the exception of max pooling. The complexity of these\nmodels could easily be extended beyond these capabilities to include any\nparameters included in Keras, allowing the creation of more complex\narchitectures.\n\nBelow is a highly simplified visualization of how genetic crossover might take\nplace between two models.\n\n<img width=\"75%\" src=\"https://preview.ibb.co/gdMDak/crossover.png\">\n<i>Genetic crossover and mutation of neural networks</i>\n\n## Results\n\nFor demonstration, we ran our program on the MNIST dataset (see `demo.ipynb` for\nan example setup) with 20 generations and a population size of 50. We allowed\nthe model up to 6 convolutional layers and 4 dense layers (including the softmax\nlayer). The best accuracy we attained with 10 epochs of training under these\nconstraints was 99.4%, which is higher than we were able to achieve when\nmanually constructing our own models under the same constraints. The graphic\nbelow displays the running maximum accuracy for all 1000 nets as they evolve\nover 20 generations.\n\nKeep in mind that these results are obtained with simple, relatively shallow\nneural networks with no data augmentation, transfer learning, ensembling,\nfine-tuning, or other optimization techniques. However, virtually any of these\nmethods could be incorporated into the genetic program. \n\n<img width=\"75%\" src=\"https://preview.ibb.co/i4BDak/running_max.png\">\n<i>Running max of MNIST accuracies across 20 generations</i>\n\n## Application\n\nThe most significant barrier in using DEvol on a real problem is the complexity\nof the algorithm. Because training neural networks is often such a\ncomputationally expensive process, training hundreds or thousands of different\nmodels to evaluate the fitness of each is not always feasible. Below are some\napproaches to combat this issue:\n\n- **Parallel Training** - The nature of evaluating the fitness of multiple\n  members of a population simultaneously is *embarassingly parallel*. A task\n  like this would be trivial to distribute among many GPUs and even machines.\n- **Early Stopping** - There's no need to train a model for 10 epochs if it\n  stops improving after 3; cut it off early.\n- **Train on Fewer Epochs** - Training in a genetic program serves one purpose:\n  to evaluate a model's fitness in relation to other models. It may not be\n  necessary to train to convergence to make this comparison; you may only need 2\n  or 3 epochs. However, it is important you exercise caution in decreasing\n  training time because doing so could create evolutionary pressure toward\n  simpler models that converge quickly. This creates a trade-off between\n  training time and accuracy which, depending on the application, may or may not\n  be desirable. \n- **Parameter Selection** - The more robust you allow your models to be, the\n  longer it will take to converge; i.e., don't allow horizontal flipping on a\n  character recognition problem even though the genetic program will eventually\n  learn not to include it. The less space the program has to explore, the faster\n  it will arrive at an optimal solution. \n\nFor some problems, it may be ideal to simply plug the data into DEvol and let\nthe program build a complete model for you, but","github_created_at":"2017-02-10T03:07:54+00:00","created_at":"2026-07-11T23:33:48.284944+00:00","updated_at":"2026-07-11T23:34:05.131965+00:00","categories":[{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"},{"slug":"evaluation-observability","name":"Evaluation & Observability","url":"https://www.graphcanon.com/categories/evaluation-observability","markdown_url":"https://www.graphcanon.com/categories/evaluation-observability.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/evaluation-observability"},{"slug":"computer-vision","name":"Computer Vision","url":"https://www.graphcanon.com/categories/computer-vision","markdown_url":"https://www.graphcanon.com/categories/computer-vision.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/computer-vision"}],"tags":[{"slug":"automl","name":"automl"},{"slug":"neural-architecture-search","name":"neural-architecture-search"},{"slug":"deep-learning","name":"deep-learning"},{"slug":"machine-learning","name":"machine-learning"},{"slug":"python","name":"python"},{"slug":"genetic-algorithm","name":"genetic-algorithm"},{"slug":"keras","name":"keras"},{"slug":"computer-vision","name":"computer-vision"}],"trust":{"provenance":{"is_fork":false,"github_id":81520737,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:33:54.138Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":1143,"last_release_at":null},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:33:54.496Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:33:53.844Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-07-11T23:33:53.844Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-11T23:33:53.844Z"}}}}