Lev-3B: A Data Recipe for Compact Probabilistic Log Decision Models
Organizations: Cisco
Abstract
Many log-analysis tasks involve choosing among known options, such as detecting anomalous sessions or identifying attack techniques, and benefit from calibrated probabilities. We present Lev-3B, an open 3B-parameter decision model built on Granite-4.1-3B-Base with a shared pointer readout, and study its training recipe. The recipe has two key parts. First, training follows a curriculum: the model learns bounded natural-language decisions, using no log data, before it sees any logs. Second, the log stage mixes the target tasks with general log data spanning 35 auxiliary tasks unrelated to either evaluation task. We evaluate one shared checkpoint on sources seen in training and on sources excluded from training, calibration and model selection. The two-stage recipe transfers substantially better than training on log data alone. Adding general log data improves performance on excluded sources. At a fraction of their serving cost, Lev-3B outperforms prompted frontier models on anomaly detection, including on an excluded logging system, but trails them on attack-technique classification. Its probabilities are well calibrated on familiar sources, but on the excluded logging system it confidently misses anomalies. We release the checkpoint, recipe, data manifests, and prediction-level artifacts.
Figures & tables
| Source and task | Unit | Train | Dev. | Cal. | Test |
|---|---|---|---|---|---|
| BGL anomaly | Window/session | 55,775 | 9,295 | 9,297 | 18,592 |
| Spirit anomaly | Window/session | 34,624 | 3,808 | 3,977 | 7,858 |
| Thunderbird anomaly | Window/session | 61,758 | 10,294 | 10,293 | 20,587 |
| HDFS anomaly (excluded) | Block session | 0 | 0 | 0 | 115,013 |
| ATT&CK, represented | Grouped record | 544 real | 51 | 38 | 134 |
| ATT&CK, withheld (excluded) | Grouped record | 0 | 0 | 0 | 178 |
| Represented (F1) | HDFS (excluded) | |||||
|---|---|---|---|---|---|---|
| System | BGL | Spirit | TB | AUROC | AUPRC | F1 |
| Granite-4.1-3B-Base | 0.19 | 0.00 | 0.44 | 0.6063 | 0.1579 | 12.21 |
| Granite-3B instruct, prompted | 63.59 | 16.36 | 2.41 | – | – | 14.93 |
| Jev (0-shot) | 57.67 | 18.12 | 3.12 | 0.6168 | 0.0537 | 5.65 |
| Jev (5-shot) | 57.68 | 21.16 | 6.55 | 0.7074 | 0.0958 | 6.54 |
| Microsoft Decision-1 (0-shot) | 60.03 | 21.98 | 3.10 | 0.7162 | 0.2376 | 14.29 |
| Represented sourcetypes | Withheld sourcetypes | |||
|---|---|---|---|---|
| System | Accuracy | Macro-F1 | Accuracy | Macro-F1 |
| Granite-4.1-3B-Base | 0.00 | 0.00 | 0.00 | 0.00 |
| Granite-3B instruct, prompted | 3.0 | 0.1 | 5.1 | 1.6 |
| Jev (0-shot) | 24.6 | 20.6 | 32.6 | 28.1 |
| Jev (5-shot) | 29.9 | 23.2 | 34.3 | 25.6 |
| Microsoft Decision-1 (0-shot) | 22.4 | 17.3 | 28.1 | 23.9 |
| Model | BGL+Lib TB | Lib+BGL TB | TB+Lib BGL | BGL+TB Lib | TB+Lib HDFS |
|---|---|---|---|---|---|
| LogRobust [ 52 ] | 57.36/91.79/70.60 | 18.07/4.59/7.32 | 66.48/31.69/42.92 | 79.15/5.29/9.91 | 2.43/82.50/4.73 |
| LogPrompt [ 29 ] | 51.10/70.65/59.30 | — | 39.49/76.72/52.15 | 66.54/47.30/55.29 | 8.73/84.07/15.81 |
| MetaLog [ 51 ] | 42.10/86.23/56.58 | 56.70/73.50/64.01 | 29.16/23.35/25.93 | 90.72/10.02/18.04 | 3.50/0.05/0.10 |
| LogICL [ 49 ] | 70.16/79.83/74.68 | 65.96/66.06/66.01 | 40.21/34.71/37.25 | 82.39/69.70/75.52 | 72.87/22.75/ 34.67 |
| Lev (two-source) | 83.21/97.88/ 89.95 | 86.15/94.52/ 90.14 | 85.21/47.40/ 60.91 | 96.97/93.22/ 95.06 | 100.00/19.86/33.14 |
| Training data | Represented (F1) | HDFS (excluded) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Variant | D | A | L | T | Steps | BGL | Spirit | TB | AUROC | AUPRC | F1 |
| Granite-4.1-3B-Base (no adaptation) | 0 | 0.19 | 0.00 | 0.44 | 0.6063 | 0.1579 | 12.21 | ||||
| Log data only (A+L+T) | ✓ | ✓ | ✓ | 1 | 99.33 | 85.96 | 92.71 | 0.7154 | 0.1039 | 11.80 | |
| Granite-4.1-3B-Base D | ✓ | 1 | 65.93 | 17.97 | 2.82 | 0.6981 | 0.2724 | 9.05 | |||
| D A | ✓ | ✓ | 2 | 99.64 | 91.82 | 94.63 | 0.7787 | 0.3117 | 31.23 | ||
| D A+ T | ✓ | ✓ | ✓ | 2 | 99.30 | 77.47 | 91.36 | 0.7509 | 0.2485 | 25.31 | |
| Training data | Represented | Withheld | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Variant | D | A | L | T | Steps | Acc. | Macro-F1 | Acc. | Macro-F1 |
| Granite-4.1-3B-Base (no adaptation) | 0 | 0.00 | 0.00 | 0.00 | 0.00 | ||||
| Log data only (A+L+T) | ✓ | ✓ | ✓ | 1 | 29.10 | 24.27 | 28.09 | 24.34 | |
| Granite-4.1-3B-Base D | ✓ | 1 | 4.48 | 4.02 | 8.43 | 3.89 | |||
| D A | ✓ | ✓ | 2 | 4.48 | 4.02 | 5.06 | 4.89 | ||
| D A+T | ✓ | ✓ | ✓ | 2 | 35.8 | 31.7 | 34.3 | 19.8 | |
| NLL | ECE | |||
| Source / system | Raw | Fit | Raw | Fit |
| Represented | ||||
| BGL anomaly | 0.0189 | 0.0173 | 0.0046 | 0.0070 |
| Spirit anomaly | 0.0791 | 0.0578 | 0.0094 | 0.0025 |
| Thunderbird anomaly | 0.0259 | 0.0286 | 0.0083 | 0.0166 |
| ATT&CK represented | 3.8512 | 3.1198 | 0.3099 | 0.1272 |
| Source | Version | Conf. error rate (errors / accepted) | Coverage | FA / miss |
|---|---|---|---|---|
| HDFS | Lev-3B raw | 1.94% (2189 / 113021) | 0.9827 | 84 / 2105 |
| HDFS | Lev-3B fitted | 1.73% (1913 / 110757) | 0.9630 | 1 / 1912 |
| HDFS | Jev (0-shot) | 86.1% (6593 / 7657) | 0.0666 | 6509 / 84 |
| HDFS | Jev (5-shot) | 72.4% (5819 / 8036) | 0.0699 | 5789 / 30 |
| HDFS | Microsoft Decision-1 (0-shot) | 8.18% (3672 / 44905) | 0.3904 | 3068 / 604 |
| HDFS | Microsoft Decision-1 (5-shot) | 5.59% (4157 / 74330) | 0.6463 | 3337 / 820 |
| Attack classification | Anomaly detection | |||
|---|---|---|---|---|
| System | Latency | Cost/1,000 | Latency | Cost/1,000 |
| Lev-3B, A10G on-demand | 1,429 ms | $0.5147 | 924 ms | $0.2583 |
| Lev-3B, A10G 3yr-reserved | 1,429 ms | $0.2226 | 924 ms | $0.1117 |
| Jev (0-shot) | 167 ms | $0.2527 | 143 ms | $0.2497 |
| Microsoft Decision-1 (0-shot) | 675 ms | $0.3596 | 497 ms | $0.2279 |
| OpenAI Decisions (0-shot) | 453 ms | $0.8055 | 434 ms | $0.3849 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Fixed | Source | Mean OT | Median OT | Shrink | Shrink | Shrink | Med./IQR |
|---|---|---|---|---|---|---|---|---|
| Lev-3B | 43.32 | 28.37 | 18.20 | 34.58 | 43.08 | 41.02 | 34.42 | 43.02 |
| Jev | 5.65 | 11.85 | 8.97 | 11.87 | 11.24 | 11.77 | 11.87 | 8.63 |
| Represented sourcetypes | Withheld sourcetypes | |||
|---|---|---|---|---|
| Checkpoint | Accuracy | Macro-F1 | Accuracy | Macro-F1 |
| D A+T, real only | 31.3 | 24.7 | 34.8 | 19.7 |
| D A+T, real + synthetic | 35.8 | 31.7 | 34.3 | 19.8 |
| Accuracy | Macro-F1 | |||||
| Split | Real support | Jev | Lev-3B | Jev | Lev-3B | |
| Test | High ( ) | 28.1 | 40.4 | 36.6 | 43.6 | |
| Test | Medium (2–9) | 19.7 | 31.1 | 18.2 | 31.8 | |
| Test | Low (1) | 37.5 | 37.5 | 33.3 | 35.4 | |
| Withheld | High ( ) | 24.4 | 43.9 | 33.2 | 35.1 | |
| Withheld | Medium (2–9) | 35.3 | 27.9 | 33.8 | 23.5 | |
| Real-support floor | (of 178) | Lev-3B | Jev (0-shot) | GPT-5.6 Luna | GPT-5.6 Sol |
|---|---|---|---|---|---|
| None | 178 | 42.1 / 29.5 | 32.6 / 28.1 | 51.7 / 42.7 | 51.7 / 45.4 |
| (19 techniques) | 117 | 41.9 / 25.3 | 22.2 / 22.6 | 45.3 / 31.9 | 44.4 / 37.0 |
| (11 techniques) | 82 | 48.8 / 33.3 | 26.8 / 34.0 | 56.1 / 37.9 | 53.7 / 45.9 |
| (4 techniques) | 25 | 52.0 / 50.0 | 28.0 / 38.6 | 60.0 / 54.9 | 64.0 / 56.4 |
| Source | Decision content | Requests | Questions | Share (%) |
| AG News | News topic and binary topic propositions | 1,000 | 3,000 | 8.0 |
| Amazon reviews | Five-level product-review rating | 1,000 | 1,000 | 8.0 |
| Banking77 | Banking intent, 77 alternatives | 1,000 | 1,000 | 8.0 |
| BoolQ | Yes/no question answering | 1,000 | 1,000 | 8.0 |
| DBpedia14 | Encyclopedia category, 14 alternatives | 1,000 | 1,000 | 8.0 |
| IMDB | Binary movie-review sentiment | 1,000 | 1,000 | 8.0 |
| Task family | Question content | Tasks | Requests | Share (%) |
|---|---|---|---|---|
| LogGLUE-derived | Summaries, semantic relations, tokens, and contrasts | 6 | 7,568 | 26.3 |
| LogQA-style | Answer selection and log-field or template aspects | 5 | 4,769 | 16.6 |
| Trace LogQA | Trace, event, timing, and evidence questions | 1 | 4,000 | 13.9 |
| Template classification | Original and derived log-template choices | 2 | 2,000 | 7.0 |
| Java build results | Build success and failure category | 2 | 2,000 | 7.0 |
| LO2v2 | Fault-injection status and affected service | 2 | 2,000 | 7.0 |
Language Model Calibration
Language model calibration studies whether models’ confidence estimates match their actual accuracy across tasks, prompts, and deployment settings.
See all 386 papers