Efficient collaborative learning relies on productive interaction among learners. Previous studies have suggested that group gender composition might affect the group dynamics. While previous studies have generally focused on the learning performance of different gender groups, relatively little effort has been devoted to scrutinising the learning process. Therefore, this study seeks to further explore students' cognitive processing patterns in the collaborative learning process among different gender groups, namely, five female-only groups (4 female students in each group), five male-only groups (4 male students in each group), and five balanced-gender groups (2 male and 2 female students in each group). This study employed quantitative content analysis and lag sequential analysis to explore students' cognitive processing patterns in a Facebook-based online discussion learning activity. A total of 3230 messages in the online discussion were retrieved and analysed. The results indicate that the female-only groups were the most active groups in terms of the messages generated. By contrast, male-only groups were the least active but exhibited a more diverse discussion pattern. Meanwhile, the balanced-gender groups showed the most diverse cognitive transition patterns. Our findings could serve as a guideline for gender grouping and collaborative learning activity design.