Stope structural parameters, which are human-controllable, directly impact the safety and economics performance of underground mineral extraction. Current stope design still relies heavily on empirical methods such as stability graphs, due to the complex nature of rock masses and varied stope failure mechanisms. This study aims to enhance stability graphs with machine learning techniques. Firstly, a dataset of 980 records from unsupported stopes was compiled, representing perhaps the largest dataset of its kind so far in the literature. This was achieved through extensive literature review and the collation of an additional 289 records from Chinese mines which were previously not included. An analysis of data reveals that over 90 % of the records fall within a stability coefficient of 0–100 and a hydraulic radius of 0–20 m. Secondly, a stability graphs optimization process was established using Python, eliminating the subjectivity of partitioning. Nine supervised machine learning algorithms were employed and trained to test their performance in partitioning form and predicting accuracy. It was found that the neural network algorithm demonstrated the best overall performance. At last, a neural network with the Keras framework was used to establish a new multilayer perceptron model to generate safety factor probability curves, which were then used to construct the stability graph. To facilitate practical use, mathematical functions fitting safety factor curves within the unstable zone were further formulated. Compared with other empirical stability graphs, our new approach allows designers to more efficiently and reliably select safety factors to determine the stability state according to site specific conditions and technical support systems, thereby providing enhanced guidance for stope design.