A neurodevelopmental disorder is called an autism spectrum disorder (ASD) that influences a person’s assertion, interaction, and learning abilities. The consequences and severity of symptoms of ASD will vary from person to person; the disorder is mainly diagnosed in children aged 1–5 years and older, and its symptoms may include unusual behaviors, interests, and social challenges. If it is not resolved at this stage, it will become severe in the coming days. So, in this manuscript, we propose a way to automatically tell if someone has ASD that works well by using a combination of feature selection and deep learning. Four phases comprise the proposed model: preprocessing, feature extraction, feature selection, and prediction. At first, the collected images are given to the preprocessing stage to remove the noise. Then, for each image, three types of features are extracted: the shape feature, texture feature, and histogram feature. Then, optimal features are selected to minimize computational complexity and time consumption using a new technique based on a combination of adaptive bacterial foraging optimization (ABFO), support vector machines-recursive feature elimination (SVM-RFE), minimum redundancy and maximum relevance (mRMR). Then, the graph convolutional network (GCN) classifier uses the selected features to identify an image as normal or autistic. According to the research observations, our model’s accuracy is enhanced to 97.512%. © 2023, The Author(s), under exclusive licence to Springer Nature Singapore Pte Ltd.