LLMs for Qualitative Data Analysis Fail on Security-specificComments in Human Experiments
Organizations: University of Trento (Italy) · Vrije Universiteit Amsterdam (The Netherlands)
Abstract
[Background:] Thematic analysis of free-text justifications in human experiments provides significant qualitative insights. Yet, it is costly because reliable annotations require multiple domain experts. Large language models (LLMs) seem ideal candidates to replace human annotators. [Problem:] Coding security-specific aspects (code identifiers mentioned, lines-of-code mentioned, security keywords mentioned) may require deeper contextual understanding than sentiment classification. [Objective:] Explore whether LLMs can act as automated annotators for technical security comments by human subjects. [Method:] We prompt four top-performing LLMs on LiveBench to detect nine security-relevant codes in free-text comments by human subjects analyzing vulnerable code snippets. Outputs are compared to human annotators using Cohen's Kappa (chance-corrected accuracy). We test different prompts mimicking annotation best practices, including emerging codes, detailed codebooks with examples, and conflicting examples. [Negative Results:] We observed marked improvements only when using detailed code descriptions; however, these improvements are not uniform across codes and are insufficient to reliably replace a human annotator. [Limitations:] Additional studies with more LLMs and annotation tasks are needed.
Figures & tables
| Abbr. | Code Definition | Code applicable Comments | Code inapplicable Comments |
|---|---|---|---|
| Var | Variable/Method identifiers are mentioned | I think it had something to do with inv and debug. | header buffer capacity is not checked. |
| Lin | Lines number mentioned | In this line, the memory at constant address is copied, this memory will most likely not stay consistent among systems. | The null value may cause the function crash. |
| Key | Relevant Keywords mentioned | If the file attribute in the code is tampered with for an instance of the BlockDriverState it might happen that the code runs an infinite recursion, essentially stopping the machine. | I don’t see any vulnerabilities. |
| Vul | Text is related to the specific vulnerability | Might modify environment variable with strtol. | I think that negative checkin triggers the vulnerability for the ML, not sure. |
| Sec | Text related to security | A check should be added which checks if the buffer is not overflowing. | the datatype of debug wont support strtol. |
| Exp | Potential exploit is mentioned | The memcpy() function might be injected with a size that is too big for the program to handle, therefore freezing the computer’s resources. | stderr is not created. |
| Replaceability and Rationale | |
|---|---|
| Hallucinate (✗) - The LLM has worse performance than random guessing in controlled experiments. It is not recommended to use it. | |
| Unusable (★) - The LLM will rarely generate the expected annotations and will almost always disagree with the human annotator. | |
| Limited (★★), The LLM only partly generates the annotations of a human coder. It might not converge when resolving conflicts with other annotators. | |
| Moderate (★★★), The LLM is not able to generate human annotation for around half the time. It might or might not converge when discussing conflicts. | |
| Substantial (★★★★) - The LLM will generate codes close to a human annotator in practice. Multiple interactions over conflicts are likely to converge. | |
| Almost Perfect (★★★★★) - The LLM would generate almost the same annotations as human coders, or at least will disagree with them only in a few cases. |
| LLM | Precision | Recall | Acc | Replace | |
|---|---|---|---|---|---|
| GPT-5 | 0.62 | 0.47 | 0.74 | 0.26 | ★★ |
| Claude-4 | 0.57 | 0.51 | 0.74 | 0.30 | ★★ |
| DeepSeek-V3.2 | 0.79 | 0.64 | 0.83 | 0.53 | ★★★ |
| Qwen3-Max | 0.74 | 0.73 | 0.86 | 0.61 | ★★★★ |
| Human* | GPT-5 | Claude-4 | DeepSeek-V3.2 | Qwen3-Max | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Agreement | Replace | Replace | Replace | Replace | ||||||
| Var | 0.98 | ★★★★★ | 0.00 | ★ | 0.52 | ★★★ | 0.79 | ★★★★ | 0.79 | ★★★★ |
| Lin | 0.94 | ★★★★★ | 0.57 | ★★★ | 0.46 | ★★★ | 0.31 | ★★ | 0.42 | ★★★ |
| Key | 0.98 | ★★★★★ | 0.30 | ★★ | 0.14 | ★ | 0.34 | ★★ | 0.56 | ★★★ |
| Vul | 0.98 | ★★★★★ | 0.50 | ★★★ | 0.44 | ★★★ | 0.39 | ★★ | 0.50 | ★★★ |
| Sec | 0.98 | ★★★★★ | 0.11 | ★ | 0.15 | ★ | 0.50 | ★★★ | 0.66 | ★★★★ |
| Prompt | Precision | Recall | Acc | Replaceability | |
|---|---|---|---|---|---|
| 0.63 | 0.51 | 0.78 | 0.37 | ★★ | |
| 0.67 | 0.56 | 0.79 | 0.42 | ★★★ | |
| 0.59 | 0.54 | 0.76 | 0.35 | ★★ | |
| 0.68 | 0.58 | 0.79 | 0.42 | ★★★ |
| Contrast | Wilcoxon’s | -value | |
|---|---|---|---|
| 181 | 0.037 | ||
| 292 | 0.890 | ||
| 30 | 0.004 | ||
| LLM | Contrast | Wilcoxon’s | -value | |
|---|---|---|---|---|
| GPT-5 | 3 | 0.04 | ||
| 45 | 1.0 | |||
| 0 | 0.004 | |||
| Claude-4 | 9 | 0.06 | ||
| 31 | 0.85 | |||
| 16 | 0.42 | |||
LLM-Assisted Annotation
Large language model-assisted annotation uses AI to label, classify, and structure data, often with human review to improve scale and consistency.
See all 197 papers