Document Open Access Logo

Triangle Counting with Local Edge Differential Privacy

Authors Talya Eden , Quanquan C. Liu , Sofya Raskhodnikova , Adam Smith

Thumbnail PDF


  • Filesize: 1.04 MB
  • 21 pages

Document Identifiers

Author Details

Talya Eden
  • Bar Ilan University, Ramat Gan, IL
Quanquan C. Liu
  • Northwestern University, Evanston, IL, US
Sofya Raskhodnikova
  • Boston University, MA, US
Adam Smith
  • Boston University, MA, US


We thank Iden Kalemaj and Satchit Sivakumar for helpful comments on the initial version of our results.

Cite AsGet BibTex

Talya Eden, Quanquan C. Liu, Sofya Raskhodnikova, and Adam Smith. Triangle Counting with Local Edge Differential Privacy. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 261, pp. 52:1-52:21, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)


Many deployments of differential privacy in industry are in the local model, where each party releases its private information via a differentially private randomizer. We study triangle counting in the noninteractive and interactive local model with edge differential privacy (that, intuitively, requires that the outputs of the algorithm on graphs that differ in one edge be indistinguishable). In this model, each party’s local view consists of the adjacency list of one vertex. In the noninteractive model, we prove that additive Ω(n²) error is necessary, where n is the number of nodes. This lower bound is our main technical contribution. It uses a reconstruction attack with a new class of linear queries and a novel mix-and-match strategy of running the local randomizers with different completions of their adjacency lists. It matches the additive error of the algorithm based on Randomized Response, proposed by Imola, Murakami and Chaudhuri (USENIX2021) and analyzed by Imola, Murakami and Chaudhuri (CCS2022) for constant ε. We use a different postprocessing of Randomized Response and provide tight bounds on the variance of the resulting algorithm. In the interactive setting, we prove a lower bound of Ω(n^{3/2}) on the additive error. Previously, no hardness results were known for interactive, edge-private algorithms in the local model, except for those that follow trivially from the results for the central model. Our work significantly improves on the state of the art in differentially private graph analysis in the local model.

Subject Classification

ACM Subject Classification
  • Theory of computation → Problems, reductions and completeness
  • local differential privacy
  • reconstruction attacks
  • lower bounds
  • triangle counting


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Mohammad Al Hasan and Vachik S Dave. Triangle counting in large networks: a review. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 8(2):e1226, 2018. Google Scholar
  2. Differential Privacy Team Apple. Learning with privacy at scale differential, 2017. Google Scholar
  3. Sepehr Assadi, Michael Kapralov, and Sanjeev Khanna. A simple sublinear-time algorithm for counting arbitrary subgraphs via edge sampling. In ITCS, volume 124 of LIPIcs, pages 6:1-6:20. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2019. Google Scholar
  4. Prakash Balachandran, Eric D. Kolaczyk, and Weston D. Viles. On the propagation of low-rate measurement error to subgraph counts in large networks. JMLR, 18(61):1-33, 2017. Google Scholar
  5. Luca Becchetti, Paolo Boldi, Carlos Castillo, and Aristides Gionis. Efficient semi-streaming algorithms for local triangle counting in massive graphs. In Proceedings of the 14th ACM SIGKDD, pages 16-24, 2008. Google Scholar
  6. Amos Beimel, Kobbi Nissim, and Eran Omri. Distributed private data analysis: Simultaneously solving how and what. In CRYPTO, pages 451-468. Springer, 2008. Google Scholar
  7. Amartya Shankha Biswas, Talya Eden, Quanquan C. Liu, Ronitt Rubinfeld, and Slobodan Mitrovic. Massively parallel algorithms for small subgraph counting. In Amit Chakrabarti and Chaitanya Swamy, editors, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2022, September 19-21, 2022, University of Illinois, Urbana-Champaign, USA (Virtual Conference), volume 245 of LIPIcs, pages 39:1-39:28. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. URL:
  8. Andrea Bittau, Úlfar Erlingsson, Petros Maniatis, Ilya Mironov, Ananth Raghunathan, David Lie, Mitch Rudominer, Ushasree Kode, Julien Tinnes, and Bernhard Seefeld. Prochlo: Strong privacy for analytics in the crowd. In Proceedings of the 26th SOSP, SOSP '17, pages 441-459, New York, NY, USA, 2017. Google Scholar
  9. Jeremiah Blocki, Avrim Blum, Anupam Datta, and Or Sheffet. Differentially private data analysis of social networks via restricted sensitivity. In Robert D. Kleinberg, editor, ITCS '13, Berkeley, CA, USA, January 9-12, 2013, pages 87-96. ACM, 2013. URL:
  10. TH Hubert Chan, Elaine Shi, and Dawn Song. Optimal lower bound for differentially private multi-party aggregation. In ESA, pages 277-288. Springer, 2012. Google Scholar
  11. Jinyuan Chang, Eric D. Kolaczyk, and Qiwei Yao. Estimation of subgraph densities in noisy networks. Journal of the American Statistical Association, 117(537):361-374, 2022. Google Scholar
  12. Justin Y Chen, Talya Eden, Piotr Indyk, Honghao Lin, Shyam Narayanan, Ronitt Rubinfeld, Sandeep Silwal, Tal Wagner, David Woodruff, and Michael Zhang. Triangle and four cycle counting with predictions in graph streams. In ICLR, 2021. Google Scholar
  13. Shixi Chen and Shuigeng Zhou. Recursive mechanism: towards node differential privacy and unrestricted joins. In Kenneth A. Ross, Divesh Srivastava, and Dimitris Papadias, editors, Proceedings of the ACM SIGMOD International Conference on Management of Data, SIGMOD 2013, New York, NY, USA, June 22-27, 2013, pages 653-664. ACM, 2013. URL:
  14. Graham Cormode, Somesh Jha, Tejas Kulkarni, Ninghui Li, Divesh Srivastava, and Tianhao Wang. Privacy at scale: Local differential privacy in practice. In Proceedings of the 2018 SIGMOD, SIGMOD '18, pages 1655-1658, New York, NY, USA, 2018. Google Scholar
  15. Anindya De. Lower bounds in differential privacy. In TCC, pages 321-338. Springer, 2012. Google Scholar
  16. Laxman Dhulipala, Quanquan C. Liu, Sofya Raskhodnikova, Jessica Shi, Julian Shun, and Shangdi Yu. Differential privacy from locally adjustable graph algorithms: k-core decomposition, low out-degree ordering, and densest subgraphs. In FOCS 2022, Denver, CO, USA, October 31 - November 3, 2022, pages 754-765. IEEE, 2022. URL:
  17. Bolin Ding, Janardhan Kulkarni, and Sergey Yekhanin. Collecting telemetry data privately. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pages 3574-3583, Red Hook, NY, USA, 2017. Curran Associates Inc. Google Scholar
  18. Irit Dinur and Kobbi Nissim. Revealing information while preserving privacy. In Frank Neven, Catriel Beeri, and Tova Milo, editors, Proceedings of the Twenty-Second ACM SIGACT-SIGMOD-SIGART PODS, June 9-12, 2003, San Diego, CA, USA, pages 202-210. ACM, 2003. URL:
  19. John Duchi, Michael Jordan, and Martin Wainwright. Local privacy and statistical minimax rates. In IEEE Symposium on Foundations of Computer Science, FOCS '13, pages 429-438, Berkeley, CA, USA, 2013. URL:
  20. John C Duchi, Michael I Jordan, Martin J Wainwright, et al. Minimax optimal procedures for locally private estimation. Journal of the American Statistical Association, 113(521):182-201, 2018. Google Scholar
  21. Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Serge Vaudenay, editor, EUROCRYPT 2006, St. Petersburg, Russia, May 28 - June 1, 2006, Proceedings, volume 4004 of Lecture Notes in Computer Science, pages 486-503. Springer, 2006. URL:
  22. Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Proceedings of the Third Conference on Theory of Cryptography, TCC'06, pages 265-284, Berlin, Heidelberg, 2006. Springer-Verlag. Google Scholar
  23. Cynthia Dwork, Frank McSherry, and Kunal Talwar. The price of privacy and the limits of LP decoding. In Proceedings of the Thirty-Ninth ACM STOC, pages 85-94. ACM, 2007. Google Scholar
  24. Cynthia Dwork and Sergey Yekhanin. New efficient attacks on statistical disclosure control mechanisms. In CRYPTO, pages 469-480. Springer, 2008. Google Scholar
  25. Jean-Pierre Eckmann and Elisha Moses. Curvature of co-links uncovers hidden thematic layers in the world wide web. Proceedings of the national academy of sciences, 99(9):5825-5829, 2002. Google Scholar
  26. Talya Eden, Amit Levi, Dana Ron, and C Seshadhri. Approximately counting triangles in sublinear time. SIAM Journal on Computing, 46(5):1603-1646, 2017. Google Scholar
  27. Talya Eden, Quanquan C. Liu, Sofya Raskhodnikova, and Adam D. Smith. Triangle counting with local edge differential privacy. CoRR, abs/2305.02263, 2023. URL:
  28. Úlfar Erlingsson, Vasyl Pihur, and Aleksandra Korolova. Rappor: Randomized aggregatable privacy-preserving ordinal response. In Proceedings of the 2014 ACM SIGSAC CCS, CCS '14, pages 1054-1067, New York, NY, USA, 2014. Google Scholar
  29. Alexandre V. Evfimievski, Johannes Gehrke, and Ramakrishnan Srikant. Limiting privacy breaches in privacy preserving data mining. In Frank Neven, Catriel Beeri, and Tova Milo, editors, Proceedings of the Twenty-Second ACM SIGACT-SIGMOD-SIGART PODS, June 9-12, 2003, San Diego, CA, USA, pages 211-222. ACM, 2003. URL:
  30. Illés J Farkas, Imre Derényi, Albert-László Barabási, and Tamas Vicsek. Spectra of “real-world” graphs: Beyond the semicircle law. Physical Review E, 64(2):026704, 2001. Google Scholar
  31. Tianchong Gao, Feng Li, Yu Chen, and XuKai Zou. Local differential privately anonymizing online social networks under hrg-based model. IEEE Transactions on Computational Social Systems, 5(4):1009-1020, 2018. Google Scholar
  32. Anupam Gupta, Aaron Roth, and Jonathan R. Ullman. Iterative constructions and private data release. In Ronald Cramer, editor, Theory of Cryptography - 9th Theory of Cryptography Conference, TCC 2012, Taormina, Sicily, Italy, March 19-21, 2012. Proceedings, volume 7194 of Lecture Notes in Computer Science, pages 339-356. Springer, 2012. URL:
  33. Jacob Imola, Takao Murakami, and Kamalika Chaudhuri. Locally differentially private analysis of graph statistics. In 30th USENIX Security Symposium, USENIX Security 2021, August 11-13, 2021, pages 983-1000, 2021. URL:
  34. Jacob Imola, Takao Murakami, and Kamalika Chaudhuri. Communication-efficient triangle counting under local differential privacy. In 31st USENIX Security Symposium, USENIX Security 2022, August 10-12, 2022, 2022. URL:
  35. Jacob Imola, Takao Murakami, and Kamalika Chaudhuri. Differentially private subgraph counting in the shuffle model. CoRR, abs/2205.01429, 2022., URL:
  36. Matthew Joseph, Jieming Mao, Seth Neel, and Aaron Roth. The role of interactivity in local differential privacy. In David Zuckerman, editor, 60th IEEE Annual FOCS 2019, Baltimore, Maryland, USA, November 9-12, 2019, pages 94-105. IEEE Computer Society, 2019. URL:
  37. John Kallaugher and Eric Price. A hybrid sampling scheme for triangle counting. In Proceedings of the Annual ACM-SIAM SODA, pages 1778-1797, 2017. Google Scholar
  38. Vishesh Karwa, Sofya Raskhodnikova, Adam D. Smith, and Grigory Yaroslavtsev. Private analysis of graph structure. ACM Trans. Database Syst., 39(3):22:1-22:33, 2014. URL:
  39. Vishesh Karwa, Aleksandra B. Slavković, and Pavel Krivitsky. Differentially private exponential random graphs. In Privacy in Statistical Databases, pages 143-155. Springer International Publishing, 2014. Google Scholar
  40. Shiva Prasad Kasiviswanathan, Homin K Lee, Kobbi Nissim, Sofya Raskhodnikova, and Adam Smith. What can we learn privately? SIAM Journal on Computing, 40(3):793-826, 2011. Google Scholar
  41. Shiva Prasad Kasiviswanathan, Kobbi Nissim, Sofya Raskhodnikova, and Adam D. Smith. Analyzing graphs with node differential privacy. In Amit Sahai, editor, 10th Theory of Cryptography Conference, TCC 2013, Tokyo, Japan, March 3-6, 2013. Proceedings, volume 7785 of Lecture Notes in Computer Science, pages 457-476. Springer, 2013. URL:
  42. Shiva Prasad Kasiviswanathan, Mark Rudelson, Adam Smith, and Jonathan Ullman. The price of privately releasing contingency tables and the spectra of random matrices with correlated rows. In Proceedings of the 42nd ACM STOC, STOC '10, pages 775-784. ACM, 2010. Google Scholar
  43. Shiva Prasad Kasiviswanathan, Mark Rudelson, and Adam D. Smith. The power of linear reconstruction attacks. In Sanjeev Khanna, editor, Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, New Orleans, Louisiana, USA, January 6-8, 2013, pages 1415-1433. SIAM, 2013. URL:
  44. Andrew McGregor and Sofya Vorotnikova. Triangle and four cycle counting in the data stream model. In ACM SIGMOD-SIGACT-SIGART PODS, pages 445-456, 2020. Google Scholar
  45. Andrew McGregor, Sofya Vorotnikova, and Hoa T Vu. Better algorithms for counting triangles in data streams. In Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI PODS, pages 401-411, 2016. Google Scholar
  46. Ron Milo, Shai Shen-Orr, Shalev Itzkovitz, Nadav Kashtan, Dmitri Chklovskii, and Uri Alon. Network motifs: simple building blocks of complex networks. Science, 298(5594):824-827, 2002. Google Scholar
  47. Kobbi Nissim, Sofya Raskhodnikova, and Adam D. Smith. Smooth sensitivity and sampling in private data analysis. In David S. Johnson and Uriel Feige, editors, Proceedings of the 39th Annual ACM Symposium on Theory of Computing, San Diego, California, USA, June 11-13, 2007, pages 75-84. ACM, 2007. Full paper: URL:
  48. Rasmus Pagh and Charalampos E Tsourakakis. Colorful triangle counting and a mapreduce implementation. Information Processing Letters, 112(7):277-281, 2012. Google Scholar
  49. Gergely Palla, Imre Derényi, Illés Farkas, and Tamás Vicsek. Uncovering the overlapping community structure of complex networks in nature and society. Nature, 435(7043):814-818, 2005. Google Scholar
  50. Ha-Myung Park, Francesco Silvestri, U Kang, and Rasmus Pagh. Mapreduce triangle enumeration with guarantees. In Proceedings of the 23rd ACM International Conference on Conference on Information and Knowledge Management, pages 1739-1748, 2014. Google Scholar
  51. Arnau Prat-Pérez, David Dominguez-Sal, Josep M. Brunat, and Josep Lluís Larriba-Pey. Put three and three together: Triangle-driven community detection. ACM Trans. Knowl. Discov. Data, 10(3):22:1-22:42, 2016. URL:
  52. Zhan Qin, Ting Yu, Yin Yang, Issa Khalil, Xiaokui Xiao, and Kui Ren. Generating synthetic decentralized social graphs with local differential privacy. In Proceedings of the 2017 ACM SIGSAC CCS, CCS '17, pages 425-438, New York, NY, USA, 2017. Google Scholar
  53. Sofya Raskhodnikova and Adam D. Smith. Differentially private analysis of graphs. In Encyclopedia of Algorithms, pages 543-547. Springer, 2016. URL:
  54. Haipei Sun, Xiaokui Xiao, Issa Khalil, Yin Yang, Zhan Qin, Hui (Wendy) Wang, and Ting Yu. Analyzing subgraph statistics from extended local views with decentralized differential privacy. In Proceedings of the 2019 ACM CCS, CCS '19, pages 703-717, New York, NY, USA, 2019. Google Scholar
  55. Stanley L Warner. Randomized response: A survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63-69, 1965. Google Scholar
  56. Qingqing Ye, Haibo Hu, Man Ho Au, Xiaofeng Meng, and Xiaokui Xiao. Towards locally differentially private generic graph metric estimation. In 2020 IEEE 36th ICDE, pages 1922-1925, 2020. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail