{"data":{"slug":"joeddav-devol","name":"devol","tagline":"Genetic neural architecture search for deep learning models","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":951,"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":"DEvol is an early proof-of-concept tool for automating the design of neural network architectures using genetic algorithms within Keras.","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-08-04T06:00:43.821177+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"}],"tags":[{"slug":"automl","name":"automl"},{"slug":"computer-vision","name":"computer-vision"},{"slug":"deep-learning","name":"deep-learning"},{"slug":"genetic-algorithm","name":"genetic-algorithm"},{"slug":"keras","name":"keras"},{"slug":"machine-learning","name":"machine-learning"},{"slug":"neural-architecture-search","name":"neural-architecture-search"}],"trust":{"provenance":{"is_fork":false,"github_id":81520737,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-04T06:00:42.693Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":1166,"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-08-04T06:00:43.344Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-08-04T06:00:43.344Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-04T06:00:43.344Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"Available under MIT license meaning it is free for personal and commercial use but the author cannot be held responsible or liable from damages caused by using DEvol."},"requirements":null,"constraints":{"pricing_model":"freemium"},"when_to_use":["Use DEvol when you need an early proof-of-concept tool to automate the design of neural network architectures with limited parameters, focusing specifically on classification problems.","Consider it if your project involves shallow networks where computational resources are more manageable and parallel training setups can be established for evaluating multiple models."],"when_not_to_use":["Avoid using DEvol in situations requiring deep or highly complex architectures due to the significant computational expense associated with evolutionary search over such a large parameter space.","Do not use if you lack the infrastructure for parallel processing or do not want to optimize for shorter training epochs, as this can affect model accuracy and fitness evaluations."],"source":"enrich:decision_facts","observed_at":"2026-07-17T04:07:34.504Z"},"constraint_facets":{"pricing_model":"freemium"},"decision_summary":[{"label":"Pricing","value":"freemium - Available under MIT license meaning it is free for personal and commercial use but the author cannot be held responsible or liable from damages caused by using DEvol."},{"label":"Adopt for","value":"Devolution of neural network architectures through genetic algorithms in Keras for automating design."}]}}