[Paper Review] LogQA: Question Answering in Unstructured Logs
LogQA is a novel question answering framework for unstructured system logs that decomposes the task into log retrieval and answer reading, using a dual-component architecture with hard negative sampling to improve retrieval robustness. It achieves state-of-the-art performance on three public log datasets, outperforming baselines by over 30 points in top-5 accuracy on challenging datasets.
Modern systems produce a large volume of logs to record run-time status and events. System operators use these raw logs to track a system in order to obtain some useful information to diagnose system anomalies. One of the most important problems in this area is to help operators find the answers to log-based questions efficiently and user-friendly. In this work, we propose LogQA, which aims at answering log-based questions in the form of natural language based on large-scale unstructured log corpora. Our system presents the answer to a question directly instead of returning a list of relevant snippets, thus offering better user-friendliness and efficiency. LogQA represents the first approach to solve question answering in lod domain. LogQA has two key components: Log Retriever and Log Reader. Log Retriever aims at retrieving relevant logs w.r.t. a given question, while Log Reader is responsible for inferring the final answer. Given the lack of a public dataset for log questing answering, we manually labelled a QA dataset of three open-source log corpus and will make them publicly available. We evaluated our proposed model on these datasets by comparing its performance with 6 other baseline methods. Our experimental results demonstrate that LogQA has outperformed other baseline methods.
Motivation & Objective
- To address the inefficiency and poor user-friendliness of manual log analysis in system administration.
- To develop a question-answering system that directly answers natural language questions about logs, rather than returning raw snippets.
- To overcome the lack of public datasets for log-based question answering by manually labeling a QA dataset on HDFS, OpenSSH, and Spark.
- To improve log retrieval performance through an iterative hard negative sampling strategy for training the Log Retriever.
- To achieve state-of-the-art results in both log retrieval and answer reading tasks on real-world log corpora.
Proposed method
- LogQA consists of two components: Log Retriever for retrieving relevant log entries based on a natural language question, and Log Reader for predicting the exact answer span from the retrieved logs.
- The Log Retriever uses a Siamese network architecture with BERT-based sentence encoding to compute semantic similarity between questions and log entries.
- Hard negative examples are generated iteratively during training to improve the model's ability to distinguish between relevant and irrelevant logs.
- Negative sampling is employed during Log Retriever training to simulate difficult negative cases, enhancing model robustness.
- The Log Reader uses a span-prediction mechanism (e.g., BERT-style span extraction) to identify the answer within the top-k retrieved logs.
- The system is trained end-to-end with joint optimization, and the final answer is selected based on the highest probability span prediction.

Experimental results
Research questions
- RQ1Can a question-answering system directly return answers to natural language questions about unstructured logs, improving usability over traditional log search?
- RQ2How effective is hard negative sampling in improving the performance of log retrieval models in low-data regimes?
- RQ3Can a unified retrieval-reading framework outperform existing log analysis methods in terms of accuracy and efficiency?
- RQ4To what extent does domain-specific terminology (e.g., IP addresses, block IDs) affect the performance of standard NLP models on log QA?
- RQ5How does the number of training iterations and hard negative sampling impact the final retrieval and reading performance?
Key findings
- LogQA's Log Retriever achieved a top-5 accuracy over 30 points higher than the second-best method on the most challenging dataset, demonstrating significant performance gains.
- The inclusion of hard negative examples during training improved the robustness and generalization of the Log Retriever, especially in distinguishing subtle differences between relevant and irrelevant logs.
- The Log Reader outperformed four baseline methods (Logistic Regression, BiDAF, QANet, BERT) across all three datasets, showing strong answer span prediction capability.
- Even when the top-1 retrieved log was incorrect, Log Reader correctly identified the answer from the top-5 logs, proving its robustness to noisy retrieval results.
- The system achieved state-of-the-art performance in both retrieval and reading components, validating the effectiveness of the two-stage framework.
- The authors released a manually annotated QA dataset from HDFS, OpenSSH, and Spark, which is publicly available to support future research in log-based question answering.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.