Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
143 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
46 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

LILAC: Log Parsing using LLMs with Adaptive Parsing Cache (2310.01796v3)

Published 3 Oct 2023 in cs.SE

Abstract: Log parsing transforms log messages into structured formats, serving as the prerequisite step for various log analysis tasks. Although a variety of log parsing approaches have been proposed, their performance on complicated log data remains compromised due to the use of human-crafted rules or learning-based models with limited training data. The recent emergence of powerful LLMs demonstrates their vast pre-trained knowledge related to code and logging, making it promising to apply LLMs for log parsing. However, their lack of specialized log parsing capabilities currently hinders their accuracy in parsing. Moreover, the inherent inconsistent answers, as well as the substantial overhead, prevent the practical adoption of LLM-based log parsing. To address these challenges, we propose LILAC, the first practical log parsing framework using LLMs with adaptive parsing cache. To facilitate accurate and robust log parsing, LILAC leverages the in-context learning (ICL) capability of the LLM by performing a hierarchical candidate sampling algorithm and selecting high-quality demonstrations. Furthermore, LILAC incorporates a novel component, an adaptive parsing cache, to store and refine the templates generated by the LLM. It helps mitigate LLM's inefficiency issue by enabling rapid retrieval of previously processed log templates. In this process, LILAC adaptively updates the templates within the parsing cache to ensure the consistency of parsed results. The extensive evaluation on public large-scale datasets shows that LILAC outperforms state-of-the-art methods by 69.5% in terms of the average F1 score of template accuracy. In addition, LILAC reduces the query times to LLMs by several orders of magnitude, achieving a comparable efficiency to the fastest baseline.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (72)
  1. K. Yao, M. Sayagh, W. Shang, and A. E. Hassan, “Improving state-of-the-art compression techniques for log management tools,” IEEE Transactions on Software Engineering (TSE), vol. 48, no. 8, pp. 2748–2760, 2021.
  2. X. Wang, X. Zhang, L. Li, S. He, H. Zhang, Y. Liu, L. Zheng, Y. Kang, Q. Lin, Y. Dang et al., “Spine: a scalable log parser with feedback guidance,” in Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (FSE), 2022, pp. 1198–1208.
  3. X. Zhang, Y. Xu, Q. Lin, B. Qiao, H. Zhang, Y. Dang, C. Xie, X. Yang, Q. Cheng, Z. Li et al., “Robust log-based anomaly detection on unstable log data,” in Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2019, pp. 807–817.
  4. N. Zhao, H. Wang, Z. Li, X. Peng, G. Wang, Z. Pan, Y. Wu, Z. Feng, X. Wen, W. Zhang et al., “An empirical investigation of practical log anomaly detection for online service systems,” in Proceedings of the 29th ACM joint meeting on european software engineering conference and symposium on the foundations of software engineering (FSE), 2021, pp. 1404–1415.
  5. C. Zhang, X. Peng, C. Sha, K. Zhang, Z. Fu, X. Wu, Q. Lin, and D. Zhang, “Deeptralog: Trace-log combined microservice anomaly detection through graph-based deep learning,” in Proceedings of the 44th International Conference on Software Engineering (ICSE), 2022, pp. 623–634.
  6. J. Liu, J. Huang, Y. Huo, Z. Jiang, J. Gu, Z. Chen, C. Feng, M. Yan, and M. R. Lyu, “Scalable and adaptive log-based anomaly detection with expert in the loop,” arXiv preprint arXiv:2306.05032, 2023.
  7. S. Ali, C. Boufaied, D. Bianculli, P. Branco, L. Briand, and N. Aschbacher, “An empirical study on log-based anomaly detection using machine learning,” arXiv preprint arXiv:2307.16714, 2023.
  8. W. Xu, L. Huang, A. Fox, D. Patterson, and M. Jordan, “Largescale system problem detection by mining console logs,” Proceedings of SOSP’09, 2009.
  9. A. R. Chen, T.-H. Chen, and S. Wang, “Pathidea: Improving information retrieval-based bug localization by re-constructing execution paths using logs,” IEEE Transactions on Software Engineering (TSE), vol. 48, no. 8, pp. 2905–2919, 2021.
  10. A. Amar and P. C. Rigby, “Mining historical test logs to predict bugs and localize faults in the test logs,” in 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).   IEEE, 2019, pp. 140–151.
  11. L. Wang, N. Zhao, J. Chen, P. Li, W. Zhang, and K. Sui, “Root-cause metric location for microservice systems via log anomaly detection,” in 2020 IEEE international conference on web services (ICWS).   IEEE, 2020, pp. 142–150.
  12. P. Notaro, S. Haeri, J. Cardoso, and M. Gerndt, “Logrule: Efficient structured log mining for root cause analysis,” IEEE Transactions on Network and Service Management, 2023.
  13. R. Vaarandi, “A data clustering algorithm for mining patterns from event logs,” in Proceedings of the 3rd IEEE Workshop on IP Operations & Management (IPOM)(IEEE Cat. No. 03EX764).   Ieee, 2003, pp. 119–126.
  14. M. Nagappan and M. A. Vouk, “Abstracting log lines to log event types for mining software system logs,” in 2010 7th IEEE Working Conference on Mining Software Repositories (MSR).   IEEE, 2010, pp. 114–117.
  15. P. He, J. Zhu, Z. Zheng, and M. R. Lyu, “Drain: An online log parsing approach with fixed depth tree,” in 2017 IEEE international conference on web services (ICWS).   IEEE, 2017, pp. 33–40.
  16. V.-H. Le and H. Zhang, “Log parsing with prompt-based few-shot learning,” arXiv preprint arXiv:2302.07435, 2023.
  17. M. Du and F. Li, “Spell: Streaming parsing of system event logs,” in 2016 IEEE 16th International Conference on Data Mining (ICDM).   IEEE, 2016, pp. 859–864.
  18. H. Dai, H. Li, C.-S. Chen, W. Shang, and T.-H. Chen, “Logram: Efficient log parsing using n𝑛nitalic_n n-gram dictionaries,” IEEE Transactions on Software Engineering (TSE), vol. 48, no. 3, pp. 879–892, 2020.
  19. S. Yu, P. He, N. Chen, and Y. Wu, “Brain: Log parsing with bidirectional parallel tree,” IEEE Transactions on Services Computing (TSC), 2023.
  20. Y. Huo, Y. Su, C. Lee, and M. R. Lyu, “Semparser: A semantic parser for log analysis,” arXiv preprint arXiv:2112.12636, 2021.
  21. Y. Liu, X. Zhang, S. He, H. Zhang, L. Li, Y. Kang, Y. Xu, M. Ma, Q. Lin, Y. Dang et al., “Uniparser: A unified log parser for heterogeneous log data,” in Proceedings of the ACM Web Conference 2022 (WWW), 2022, pp. 1893–1901.
  22. V.-H. Le and H. Zhang, “Log-based anomaly detection with deep learning: How far are we?” in Proceedings of the 44th International Conference on Software Engineering (ICSE), 2022, pp. 1356–1367.
  23. Z. Li, C. Luo, T.-H. Chen, W. Shang, S. He, Q. Lin, and D. Zhang, “Did we miss something important? studying and exploring variable-aware log abstraction,” arXiv preprint arXiv:2304.11391, 2023.
  24. Z. A. Khan, D. Shin, D. Bianculli, and L. Briand, “Guidelines for assessing the accuracy of log message template identification techniques,” in Proceedings of the 44th International Conference on Software Engineering (ICSE), 2022, pp. 1095–1106.
  25. Z. Jiang, J. Liu, J. Huang, Y. Li, Y. Huo, J. Gu, Z. Chen, J. Zhu, and M. R. Lyu, “A large-scale benchmark for log parsing,” arXiv preprint arXiv:2308.10828, 2023.
  26. S. Petrescu, F. d. Hengst, A. Uta, and J. S. Rellermeyer, “Log parsing evaluation in the era of modern software systems,” arXiv preprint arXiv:2308.09003, 2023.
  27. Z. Yang, Z. Zhao, C. Wang, J. Shi, D. Kim, D. Han, and D. Lo, “What do code models memorize? an empirical study on large language models of code,” arXiv preprint arXiv:2308.09932, 2023.
  28. Y. Peng, C. Wang, W. Wang, C. Gao, and M. R. Lyu, “Generative type inference for python,” arXiv preprint arXiv:2307.09163, 2023.
  29. A. Mastropaolo, L. Pascarella, and G. Bavota, “Using deep learning to generate complete log statements,” in Proceedings of the 44th International Conference on Software Engineering, 2022, pp. 2279–2290.
  30. Y. Li, Y. Huo, Z. Jiang, R. Zhong, P. He, Y. Su, and M. R. Lyu, “Exploring the effectiveness of llms in automated logging generation: An empirical study,” arXiv preprint arXiv:2307.05950, 2023.
  31. J. Wei, M. Bosma, V. Y. Zhao, K. Guu, A. W. Yu, B. Lester, N. Du, A. M. Dai, and Q. V. Le, “Finetuned language models are zero-shot learners,” arXiv preprint arXiv:2109.01652, 2021.
  32. J. MacGlashan, M. K. Ho, R. Loftin, B. Peng, G. Wang, D. L. Roberts, M. E. Taylor, and M. L. Littman, “Interactive learning from policy-dependent human feedback,” in International conference on machine learning.   PMLR, 2017, pp. 2285–2294.
  33. V.-H. Le and H. Zhang, “Log parsing: How far can chatgpt go?” arXiv preprint arXiv:2306.01590, 2023.
  34. P. Mudgal and R. Wouhaybi, “An assessment of chatgpt on log data,” arXiv preprint arXiv:2309.07938, 2023.
  35. Y. Du, S. Li, A. Torralba, J. B. Tenenbaum, and I. Mordatch, “Improving factuality and reasoning in language models through multiagent debate,” arXiv preprint arXiv:2305.14325, 2023.
  36. N. Mündler, J. He, S. Jenko, and M. Vechev, “Self-contradictory hallucinations of large language models: Evaluation, detection and mitigation.” 2023.
  37. B. Peng, M. Galley, P. He, H. Cheng, Y. Xie, Y. Hu, Q. Huang, L. Liden, Z. Yu, W. Chen et al., “Check your facts and try again: Improving large language models with external knowledge and automated feedback,” arXiv preprint arXiv:2302.12813, 2023.
  38. X. Li, H. Zhang, V.-H. Le, and P. Chen, “Logshrink: Effective log compression by leveraging commonality and variability of log data,” arXiv preprint arXiv:2309.09479, 2023.
  39. K. Rodrigues, Y. Luo, and D. Yuan, “{{\{{CLP}}\}}: Efficient and scalable search on compressed text logs,” in 15th {normal-{\{{USENIX}normal-}\}} Symposium on Operating Systems Design and Implementation ({normal-{\{{OSDI}normal-}\}} 21), 2021, pp. 183–198.
  40. T. Dettmers, M. Lewis, Y. Belkada, and L. Zettlemoyer, “Llm. int8 (): 8-bit matrix multiplication for transformers at scale,” arXiv preprint arXiv:2208.07339, 2022.
  41. Y. Wang, K. Chen, H. Tan, and K. Guo, “Tabi: An efficient multi-level inference system for large language models,” in Proceedings of the Eighteenth European Conference on Computer Systems, 2023, pp. 233–248.
  42. J. Zhu, S. He, J. Liu, P. He, Q. Xie, Z. Zheng, and M. R. Lyu, “Tools and benchmarks for automated log parsing,” in 2019 IEEE/ACM 41st International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP).   IEEE, 2019, pp. 121–130.
  43. A. Pecchia, M. Cinque, G. Carrozza, and D. Cotroneo, “Industry practices and event logging: Assessment of a critical software development process,” in 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering (ICSE), vol. 2.   IEEE, 2015, pp. 169–178.
  44. D. Schipper, M. Aniche, and A. van Deursen, “Tracing back log data to its log statement: from research to practice,” in 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR).   IEEE, 2019, pp. 545–549.
  45. Z. M. Jiang, A. E. Hassan, P. Flora, and G. Hamann, “Abstracting execution logs to execution events for enterprise applications (short paper),” in 2008 The Eighth International Conference on Quality Software.   IEEE, 2008, pp. 181–186.
  46. S. Yu, N. Chen, Y. Wu, and W. Dou, “Self-supervised log parsing using semantic contribution difference,” Journal of Systems and Software, vol. 200, p. 111646, 2023.
  47. J. Xu, R. Yang, Y. Huo, C. Zhang, and P. He, “Prompting for automatic log template extraction,” arXiv preprint arXiv:2307.09950, 2023.
  48. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” Advances in neural information processing systems, vol. 30, 2017.
  49. T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell et al., “Language models are few-shot learners,” Advances in neural information processing systems, vol. 33, pp. 1877–1901, 2020.
  50. J. Xu, Q. Fu, Z. Zhu, Y. Cheng, Z. Li, Y. Ma, and P. He, “Hue: A user-adaptive parser for hybrid logs,” arXiv preprint arXiv:2308.07085, 2023.
  51. Q. Dong, L. Li, D. Dai, C. Zheng, Z. Wu, B. Chang, X. Sun, J. Xu, and Z. Sui, “A survey for in-context learning,” arXiv preprint arXiv:2301.00234, 2022.
  52. P. Liu, W. Yuan, J. Fu, Z. Jiang, H. Hayashi, and G. Neubig, “Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing,” ACM Computing Surveys, vol. 55, no. 9, pp. 1–35, 2023.
  53. J. Wei, X. Wang, D. Schuurmans, M. Bosma, F. Xia, E. Chi, Q. V. Le, D. Zhou et al., “Chain-of-thought prompting elicits reasoning in large language models,” Advances in Neural Information Processing Systems, vol. 35, pp. 24 824–24 837, 2022.
  54. H. He, H. Zhang, and D. Roth, “Rethinking with retrieval: Faithful large language model inference,” arXiv preprint arXiv:2301.00303, 2022.
  55. Y. Liu, S. Tao, W. Meng, J. Wang, W. Ma, Y. Zhao, Y. Chen, H. Yang, Y. Jiang, and X. Chen, “Logprompt: Prompt engineering towards zero-shot and interpretable log analysis,” arXiv preprint arXiv:2308.07610, 2023.
  56. S. Zheng, J. Huang, and K. C.-C. Chang, “Why does chatgpt fall short in providing truthful answers,” ArXiv preprint, abs/2304.10513, 2023.
  57. J. Liu, J. Zhu, S. He, P. He, Z. Zheng, and M. R. Lyu, “Logzip: Extracting hidden structures via iterative clustering for log compression,” in 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE).   IEEE, 2019, pp. 863–873.
  58. “Scipy,” 2023, [Online; accessed 1 Aug 2023]. [Online]. Available: https://scipy.org/
  59. S. Gao, X.-C. Wen, C. Gao, W. Wang, and M. R. Lyu, “Constructing effective in-context demonstration for code intelligence tasks: An empirical study,” arXiv preprint arXiv:2304.07575, 2023.
  60. “Jaccard index - wikipedia.” [Online]. Available: https://en.wikipedia.org/wiki/Jaccard_index
  61. Z. Zhao, E. Wallace, S. Feng, D. Klein, and S. Singh, “Calibrate before use: Improving few-shot performance of language models,” in International Conference on Machine Learning.   PMLR, 2021, pp. 12 697–12 706.
  62. S. He, J. Zhu, P. He, and M. R. Lyu, “Loghub: A large collection of system log datasets towards automated log analytics,” arXiv preprint arXiv:2008.06448, 2020.
  63. “Openai api,” 2023, [Online; accessed 1 Aug 2023]. [Online]. Available: https://openai.com/blog/openai-api
  64. X. Wang, Y. Wang, C. Xu, X. Geng, B. Zhang, C. Tao, F. Rudzicz, R. E. Mercer, and D. Jiang, “Investigating the learning behaviour of in-context learning: A comparison with supervised learning,” arXiv preprint arXiv:2307.15411, 2023.
  65. P. He, J. Zhu, S. He, J. Li, and M. R. Lyu, “An evaluation study on log parsing and its use in log mining,” in 2016 46th annual IEEE/IFIP international conference on dependable systems and networks (DSN).   IEEE, 2016, pp. 654–661.
  66. R. Vaarandi and M. Pihelgas, “Logcluster-a data clustering and pattern mining algorithm for event logs,” in 2015 11th International conference on network and service management (CNSM).   IEEE, 2015, pp. 1–7.
  67. K. Shima, “Length matters: Clustering system log messages using length of words,” arXiv preprint arXiv:1611.03213, 2016.
  68. H. Hamooni, B. Debnath, J. Xu, H. Zhang, G. Jiang, and A. Mueen, “Logmine: Fast pattern recognition for log analytics,” in Proceedings of the 25th ACM International on Conference on Information and Knowledge Management (CIKM), 2016, pp. 1573–1582.
  69. L. Tang, T. Li, and C.-S. Perng, “Logsig: Generating system events from raw textual logs,” in Proceedings of the 20th ACM international conference on Information and knowledge management (CIKM), 2011, pp. 785–794.
  70. A. A. Makanju, A. N. Zincir-Heywood, and E. E. Milios, “Clustering event logs using iterative partitioning,” in Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining (KDD), 2009, pp. 1255–1264.
  71. S. Messaoudi, A. Panichella, D. Bianculli, L. Briand, and R. Sasnauskas, “A search-based approach for accurate identification of log message formats,” in Proceedings of the 26th Conference on Program Comprehension, 2018, pp. 167–177.
  72. M. Mizutani, “Incremental mining of system log format,” in 2013 IEEE International Conference on Services Computing.   IEEE, 2013, pp. 595–602.
Citations (20)

Summary

We haven't generated a summary for this paper yet.

X Twitter Logo Streamline Icon: https://streamlinehq.com