Sludge bulking is a major problem in activated sludge processes. It is of great practically useful to predict the sludge settleability through water quality (influent and effluent) and the operation patterns. In this study, the artificial neural network (ANN) to predict the variation of sludge settleability was established with MLSS, organic loading rate and NH4+‐N loading rate as basic input variables. Additional input variables were optimized through comparing the performance of multilayer perceptron artificial neural network (MLPANN) with different combinations. The results showed that excellent nitrification will improve sludge settleability, and the famine phase would promote the growth of filamentous bacteria. Furthermore, the model performance of MLPANN and long short‐term memory networks (LSTM) were compared by using optimized input variables. The results indicated the MLPANN performed better than LSTM with optimized inputs. This study provided a reference of optimizing variables to predict the variation of sludge settleability in activated sludge process. This study will provide a reference for selecting appropriate variables to predict sludge settleability in activated sludge processes.