Skip to main content
Log in

HMGCL: Heterogeneous multigraph contrastive learning for LBSN friend recommendation

  • Published:
World Wide Web Aims and scope Submit manuscript

Abstract

Friend recommendation from user trajectory is a vital real-world application of location-based social networks (LBSN) services. Previous statistical analysis indicated that social network relationships could explain 10% to 30% of human movement, especially long-distance travel. Therefore, it is necessary to recognize patterns from human mobility to assist the friend recommendation. However, previous works either modelled friendships and check-in records by simple graphs with only one connection between any two nodes or ignored a large amount of vital spatio-temporal information and semantic information in raw LBSN data. To overcome the limitation of the simple graph commonly seen in previous works, we leverage heterogeneous multigraph to model LBSN data and define various semantic connections between nodes. Against this background, we propose a Heterogeneous Multigraph Contrastive Learning (HMGCL) model to capture spatio-temporal characteristics of human trajectories for user node embedding learning. Extensive experiments show that our method outperforms the state-of-the-art approaches in six real-world city datasets.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data Availability

All datasets used in this paper are open datasets.

Notes

  1. https://gz.meituan.com/

  2. https://foursquare.com/

  3. https://www.dianping.com/

  4. https://sites.google.com/site/yangdingqi/home/foursquare-dataset

  5. https://github.com/yangzhangalmo/walk2friends

  6. https://github.com/dishashur/lbsn2vec

  7. https://github.com/libertyeagle/gcn-mobility-relationship

  8. https://github.com/runnerxin/MVMN

  9. https://ericdongyx.github.io/metapath2vec/m2v.html

  10. https://github.com/PetarV-/GAT

  11. https://github.com/Jhy1993/HAN

  12. https://github.com/jianhao2016/AllSet

References

  1. Cho, E., Myers, S. A., Leskovec, J.: Friendship and mobility: user movement in location-based social networks. In: Apté, C., Ghosh, J., Smyth, P. (eds.) Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Diego, CA, USA, August 21-24, 2011, pp. 1082–1090. https://doi.org/10.1145/2020408.2020579 (2011)

  2. Zhang, W., Lai, X., Wang, J.: Social link inference via multiview matching network from spatiotemporal trajectories. IEEE Trans. Neural. Netw. Learn. Syst., 1–12. https://doi.org/10.1109/TNNLS.2020.2986472https://doi.org/10.1109/TNNLS.2020.2986472 (2020)

  3. Wu, Y., Lian, D., Jin, S., Chen, E.: Graph convolutional networks on user mobility heterogeneous graphs for social relationship inference. In: IJCAI, pp. 3898–3904 (2019)

  4. Schlichtkrull, M., Kipf, T.N., Bloem, P., Van Den Berg, R., Titov, I., Welling, M.: Modeling relational data with graph convolutional networks. In: European Semantic Web Conference, pp. 593–607. Springer (2018)

  5. Zhou, F., Wu, B., Yang, Y., Trajcevski, G., Zhang, K., Zhong, T.: Vec2link: Unifying heterogeneous data for social link prediction. In: Proceedings of the 27th ACM International Conference on Information and Knowledge Management, pp. 1843–1846 (2018)

  6. Backes, M., Humbert, M., Pang, J., Zhang, Y.: walk2friends: Inferring social links from mobility profiles. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pp. 1943–1957 (2017)

  7. Gunel, B., Du, J., Conneau, A., Stoyanov, V.: Supervised contrastive learning for pre-trained language model fine-tuning. In: International Conference on Learning Representations, ICLR (2020)

  8. Shang, S., Deng, K., Xie, K.: Best point detour query in road networks. In: Proceedings of the 18th SIGSPATIAL International Conference on Advances in Geographic Information Systems. GIS ’10, pp. 71–80. Association for Computing Machinery. https://doi.org/10.1145/1869790.1869804 (2010)

  9. Shang, S., Yuan, B., Deng, K., Xie, K., Zhou, X.: Finding the most accessible locations: Reverse path nearest neighbor query in road networks. In: Proceedings of the 19th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems. GIS ’11, pp. 181–190. Association for Computing Machinery. https://doi.org/10.1145/2093973.2093999 (2011)

  10. Shang, S., Yuan, B., Deng, K., Xie, K., Zheng, K., Zhou, X.: PNN Query processing on compressed trajectories. GeoInformatica 16(3), 467–496 (2012). https://doi.org/10.1007/s10707-011-0144-5

    Article  Google Scholar 

  11. Zheng, K., Shang, S., Yuan, N. J., Yang, Y.: Towards efficient search for activity trajectories. In: 2013 IEEE 29Th International Conference on Data Engineering (ICDE), pp. 230–241. https://doi.org/10.1109/ICDE.2013.6544828 (2013)

  12. Shang, S., Chen, L., Jensen, C. S., Wen, J. -R., Kalnis, P.: Searching trajectories by regions of interest. IEEE Trans. Knowl. Data Eng. 29(7), 1549–1562 (2017). https://doi.org/10.1109/TKDE.2017.2685504

    Article  Google Scholar 

  13. Shang, S., Xie, K., Zheng, K., Liu, J., Wen, J.: VID Join: Mapping trajectories to points of interest to support location-based services. J. Comput. Sci. Technol. 30(4), 725–744 (2015). https://doi.org/10.1007/s11390-015-1557-7

    Article  Google Scholar 

  14. Yao, B., Chen, Z., Gao, X., Shang, S., Ma, S., Guo, M.: Flexible aggregate nearest neighbor queries in road networks. In: 2018 IEEE 34Th International Conference on Data Engineering (ICDE), pp. 761–772. https://doi.org/10.1109/ICDE.2018.00074(2018)

  15. Chen, Z., Yao, B., Wang, Z. -J., Gao, X., Shang, S., Ma, S., Guo, M.: Flexible aggregate nearest neighbor queries and its keyword-aware variant on road networks. IEEE Trans. Knowl. Data Eng. 33(12), 3701–3715 (2021). https://doi.org/10.1109/TKDE.2020.2975998

    Article  Google Scholar 

  16. Shang, S., Chen, L., Zheng, K., Jensen, C. S., Wei, Z., Kalnis, P.: Parallel trajectory-to-location join. IEEE Trans. Knowl. Data Eng. 31(6), 1194–1207 (2019). https://doi.org/10.1109/TKDE.2018.2854705

    Article  Google Scholar 

  17. Chen, L., Shang, S., Jensen, C. S., Yao, B., Kalnis, P.: Parallel semantic trajectory similarity join. In: 2020 IEEE 36Th International Conference on Data Engineering (ICDE), pp. 997–1008. https://doi.org/10.1109/ICDE48307.2020.00091(2020)

  18. Yang, C., Chen, L., Wang, H., Shang, S.: Towards efficient selection of activity trajectories based on diversity and coverage. In: Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Virtual Event, February 2-9, 2021, pp. 689–696 (2021)

  19. Shang, S., Zhu, S., Guo, D., Lu, M.: Discovery of probabilistic nearest neighbors in traffic-aware spatial networks. World Wide Web 20(5), 1135–1151 (2017). https://doi.org/10.1007/s11280-016-0425-x

    Article  Google Scholar 

  20. Jiang, R., Zhao, J., Dong, T., Ishikawa, Y., Xiao, C., Sasaki, Y.: A density-based approach for mining movement patterns from semantic trajectories. In: TENCON 2015-2015 IEEE Region 10 Conference, pp. 1–6. IEEE (2015)

  21. Shang, S., Zheng, K., Jensen, C. S., Yang, B., Kalnis, P., Li, G., Wen, J. -R.: Discovery of path nearby clusters in spatial networks. IEEE Trans. Knowl. Data Eng. 27(6), 1505–1518 (2015). https://doi.org/10.1109/TKDE.2014.2382583

    Article  Google Scholar 

  22. Zhao, J., Shang, S., Wang, P., Lui, J. C. S., Zhang, X.: Tracking influential nodes in time-decaying dynamic interaction networks. In: 35Th IEEE International Conference on Data Engineering, ICDE 2019, Macao, China, April 8-11, 2019, pp. 1106–1117. https://doi.org/10.1109/ICDE.2019.00102 (2019)

  23. Chen, L., Shang, S., Zhang, Z., Cao, X., Jensen, C. S., Kalnis, P.: Location-Aware Top-K Term Publish/Subscribe. In: 2018 IEEE 34Th International Conference on Data Engineering (ICDE), pp. 749–760. https://doi.org/10.1109/ICDE.2018.00073 (2018)

  24. Chen, L., Shang, S.: Region-Based Message Exploration over Spatio-Temporal Data Streams. In: The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, the Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, the Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pp. 873–880. https://doi.org/10.1609/aaai.v33i01.3301873 (2019)

  25. Han, P., Shang, S., Sun, A., Zhao, P., Zheng, K., Zhang, X.: Point-of-interest recommendation with global and local context. IEEE Trans. Knowl. Data Eng. 1–12, https://doi.org/10.1109/TKDE.2021.3059744 (2021)

  26. Han, P., Shang, S., Sun, A., Zhao, P., Zheng, K., Kalnis, P.: Auc-Mf: Point of Interest Recommendation with Auc Maximization. In: 2019 IEEE 35Th International Conference on Data Engineering (ICDE), pp. 1558–1561. https://doi.org/10.1109/ICDE.2019.00141 (2019)

  27. Han, P., Li, Z., Liu, Y., Zhao, P., Li, J., Wang, H., Shang, S.: Contextualized point-of-interest recommendation. In: Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence. IJCAI’20. https://doi.org/10.24963/ijcai.2020/344 (2021)

  28. Wang, Y., Li, J., Zhong, Y., Zhu, S., Guo, D., Shang, S.: Discovery of accessible locations using region-based geo-social data. World Wide Web 22(3), 929–944 (2019). https://doi.org/10.1007/s11280-018-0538-5

    Article  Google Scholar 

  29. Scellato, S., Noulas, A., Mascolo, C.: Exploiting place features in link prediction on location-based social networks. In: Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1046–1054 (2011)

  30. Yu, Y., Wang, H., Li, Z.: Inferring mobility relationship via graph embedding. Proc. ACM Interact Mob. Wearable Ubiquitous Technol. 2(3) https://doi.org/10.1145/3264957 (2018)

  31. Yang, D., Qu, B., Yang, J., Cudre-Mauroux, P.: Revisiting User Mobility and Social Relationships in Lbsns: a Hypergraph Embedding Approach. In: The World Wide Web Conference. WWW ’19, pp. 2147–2157. Association for Computing Machinery. https://doi.org/10.1145/3308558.3313635 (2019)

  32. Yang, D., Qu, B., Yang, J., Cudré-Mauroux, P.: Lbsn2vec++: Heterogeneous hypergraph embedding for location-based social networks. IEEE Trans. Knowl. Data Eng. 34(4), 1843–1855 (2022). https://doi.org/10.1109/TKDE.2020.2997869

    Google Scholar 

  33. Diestel, R.: Graph theory springer. https://doi.org/10.1007/978-3-662-53622-3(2018)

  34. Scarselli, F., Gori, M., Tsoi, A. C., Hagenbuchner, M., Monfardini, G.: The graph neural network model. IEEE Trans. Neural Netw. 20(1), 61–80 (2008)

    Article  Google Scholar 

  35. Bruna, J., Zaremba, W., Szlam, A., LeCun, Y.: Spectral networks and deep locally connected networks on graphs. In: 2Nd International Conference on Learning Representations, ICLR 2014 (2014)

  36. Perozzi, B., Al-Rfou, R., Skiena, S.: Deepwalk: Online learning of social representations. In: Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 701–710 (2014)

  37. Feng, S., Chen, L., Zhao, K., Wei, W., Li, F., Shang, S.: Node2lv: squared lorentzian representations for node proximity. In: 2021 IEEE 37Th International Conference on Data Engineering (ICDE), pp. 2015–2020. https://doi.org/10.1109/ICDE51399.2021.00193 (2021)

  38. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Liò, P., Bengio, Y.: Graph attention networks. In: International Conference on Learning Representations (2018)

  39. Dong, Y., Chawla, N. V., Swami, A.: metapath2vec: Scalable representation learning for heterogeneous networks. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 135–144 (2017)

  40. Wang, X., Ji, H., Shi, C., Wang, B., Ye, Y., Cui, P., Yu, P. S.: Heterogeneous graph attention network. In: The World Wide Web Conference, pp. 2022–2032 (2019)

  41. Zhang, C., Song, D., Huang, C., Swami, A., Chawla, N. V.: Heterogeneous graph neural network. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 793–803 (2019)

  42. Fu, X., Zhang, J., Meng, Z., King, I.: Magnn: Metapath aggregated graph neural network for heterogeneous graph embedding. In: Proceedings of The Web Conference 2020, pp. 2331–2341 (2020)

  43. Chien, E., Pan, C., Peng, J., Milenkovic, O.: You are Allset: a Multiset Function Framework for Hypergraph Neural Networks. In: International Conference on Learning Representations (ICLR) (2022)

  44. Feng, Y., You, H., Zhang, Z., Ji, R., Gao, Y.: Hypergraph neural networks. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 3558–3565. https://doi.org/10.1609/aaai.v33i01.33013558https://doi.org/10.1609/aaai.v33i01.33013558 (2019)

  45. Yin, D., Jiang, R., Deng, J., Li, Y., Xie, Y., Wang, Z., Zhou, Y., Song, X., Shang, J. S.: Mtmgnn: Multi-time multi-graph neural network for metro passenger flow prediction. GeoInformatica, 1–29. https://doi.org/10.1007/s10707-022-00466-1 (2022)

  46. Zhang, C., Wang, Y., Zhu, L., Song, J., Yin, H.: Multi-graph heterogeneous interaction fusion for social recommendation. ACM Trans. Inf. Syst. 40 (2), 28–12826 (2022). https://doi.org/10.1145/3466641

    Article  Google Scholar 

  47. Wang, Z., Xia, T., Jiang, R., Liu, X., Kim, K.-S., Song, X., Shibasaki, R.: Forecasting ambulance demand with profiled human mobility via heterogeneous multi-graph neural networks. In: 2021 IEEE 37th International Conference on Data Engineering (ICDE), pp. 1751–1762. IEEE (2021)

  48. Sen, P., Namata, G., Bilgic, M., Getoor, L., Gallagher, B., Eliassi-Rad, T.: Collective classification in network data. AI Mag. 29(3), 93–106 (2008). https://doi.org/10.1609/aimag.v29i3.2157

    Google Scholar 

  49. Namata, G., London, B., Getoor, L., Huang, B., Edu, U.: Query-driven active surveying for collective classification. In: 10Th International Workshop on Mining and Learning with Graphs, Vol. 8, P. 1 (2012)

  50. Jiang, R., Yin, D., Wang, Z., Wang, Y., Deng, J., Liu, H., Cai, Z., Deng, J., Song, X., Shibasaki, R.: DL-Traff: Survey and Benchmark of Deep Learning Models for Urban Traffic Prediction, pp. 4515–4525. Association for Computing Machinery. https://doi.org/10.1145/3459637.3482000 (2021)

  51. Deng, J., Chen, X., Jiang, R., Song, X., Tsang, I. W.: St-Norm: spatial and temporal normalization for multi-variate time series forecasting. In: Zhu, F., Ooi, B.C., Miao, C. (eds.) KDD ’21: The 27Th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, Singapore, August 14-18, 2021, pp. 269–278. https://doi.org/10.1145/3447548.3467330 (2021)

  52. Wu, Z., Pan, S., Long, G., Jiang, J., Zhang, C.: Graph wavenet for deep spatial-temporal graph modeling. In: Kraus, S. (ed.) Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pp. 1907–1913. https://doi.org/10.24963/ijcai.2019/264 (2019)

  53. Gao, T., Yao, X., Chen, D.: SimCSE: Simple Contrastive Learning of Sentence Embeddings. Association for Computational Linguistics. https://doi.org/10.18653/v1/2021.emnlp-main.552 (2021)

  54. Lee, K., Zhu, Y., Sohn, K., Li, C. -L., Shin, J., Lee, H.: i-Mix: A Strategy for Regularizing Contrastive Representation Learning. In: International Conference on Learning Representations (ICLR) (2021)

  55. Chen, T., Kornblith, S., Norouzi, M., Hinton, G.: A simple framework for contrastive learning of visual representations. In: International Conference on Machine Learning, pp. 1597–1607. PMLR (2020)

  56. Khosla, P., Teterwak, P., Wang, C., Sarna, A., Tian, Y., Isola, P., Maschinot, A., Liu, C., Krishnan, D.: Supervised contrastive learning. In: Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., Lin, H. (eds.) Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, Virtual (2020)

  57. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., Polosukhin, I.: Attention is All You Need. In: Guyon, I., von Luxburg, U., Bengio, S., Wallach, H. M., Fergus, R., Vishwanathan, S. V. N., Garnett, R (eds.) Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pp. 5998–6008 (2017)

Download references

Acknowledgements

We acknowledge the editorial committee’s support and all anonymous reviewers for their insightful comments and suggestions, which improved the content and presentation of this manuscript.

Funding

This work was partially supported by Grant in-Aid for Scientific Research B (22H03573) of Japan’s Ministry of Education, Culture, Sports, Science, and Technology (MEXT); National Key Research and Development Project (2021YFB1714400) of China and Guangdong Provincial Key Laboratory (2020B121201001).

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to the study conception and model design. Yongkang Li worked on the full manuscript. The first draft of the manuscript was written by Yongkang Li and all authors commented on previous versions of the manuscript. Zipei Fan prepared the abstract and Section 1–3. Renhe Jiang makes critical revisions to Section 3–4. Yin Du and Jinliang Deng assisted in Section 5. This work was supervised by Xuan Song and Zipei Fan. All authors commented on previous versions of the manuscript. All authors proof-read and approved the final manuscript.

Corresponding authors

Correspondence to Zipei Fan or Xuan Song.

Ethics declarations

Competing interests

The authors have no competing interests to declare that are relevant to the content of this article.

Ethics approval and consent to participate

Not applicable

Human and Animal Ethics

Not applicable

Consent for Publication

Not applicable

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article belongs to the Topical Collection: Special issue on spatiotemporal data management and analytics for recommender systems

Guest Editors: Shuo Shang, Xiangliang Zhang and Panos Kalnis

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, Y., Fan, Z., Yin, D. et al. HMGCL: Heterogeneous multigraph contrastive learning for LBSN friend recommendation. World Wide Web 26, 1625–1648 (2023). https://doi.org/10.1007/s11280-022-01092-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11280-022-01092-5

Keywords

Navigation