The heterogeneity of microstructure has significant impacts on the material properties of ultrafine interconnects, and thus should be quantified and used to facilitate high-fidelity reliability predictions. In order to address this challenge, a method based on autocorrelation and singular value decomposition for quantitative microstructural characterization is proposed in this work. The method is applied to study the size and geometry effects on the microstructure and the stress state in ultrafine Sn37Pb solder joints. The degree of the microstructural heterogeneity related to the preferred growth directions of the phases is quantified with a scalar microstructural index by using this method. It is found that the degree of microstructural heterogeneity increases with the decrease of the standoff height, and is higher in the hourglass-shaped solder joints. The maximum von Mises stress is lower in the hourglass-shaped joints in most cases studied in this work, which indicates a higher strength and longer lifetime than the barrel-shaped joints. The average von Mises stress increases almost monotonically with the degree of the microstructural heterogeneity. The strong correlation between the microstructural index and the average von Misse stress is confirmed by a nonlinear regression analysis using artificial neural network. Based on the microstructural index, the mechanical behavior of the ultrafine interconnects can be predicted more accurately.