This paper proposes an unsupervised learning-based wavefront sensing method for SHWFS with insufficient sub-apertures. By modeling the light propagation of SHWFS in the neural network, the proposed method can train the model using unlabeled datasets. Therefore, it is convenient for the proposed method to be deployed in AO systems. The performance of the method is investigated through numerical simulations. Results show that the wavefront estimation accuracy of the proposed method is comparable to the existing methods based on supervised learning. This paper proposes a novel wavefront detection approach for SHWFS, the first application of unsupervised learning in wavefront detection.