Information about college students’ social networks plays a pivotal role in college students’ mental health monitoring and student management. While there have been many studies to infer social networks by data mining, the mining of college students’ social networks lacks consideration of homophily. College students’ social behaviors show significant homophily in the aspect of major and grade. Consequently, the inferred inter-major and inter-grade social ties will be erroneously omitted without considering such an effect. In this work, we aimed to increase the fidelity of the extracted networks by alleviating the homophily effect. To achieve this goal, we propose a method that combines the sliding time-window method with the hierarchical encounter model based on association rules. Specifically, we first calculated the counts of spatial–temporal co-occurrences of each student pair. The co-occurrences were acquired by the sliding time-window method, which takes advantage of the symmetry of the social ties. We then applied the hierarchical encounter model based on association rules to extract social networks by layer. Furthermore, we propose an adaptive method to set co-occurrence thresholds. Results suggested that our model infers the social networks of students with better fidelity, with the proportion of extracted inter-major social ties in entire social ties increasing from 0.89% to 5.45% and the proportion of inter-grade social ties rising from 0.92% to 4.65%.