Introduction
A large share of enterprise language work consists of classification under a fixed label set. A bank routes customer messages to support teams, a lender files complaints under a regulator's taxonomy, a legal department labels contract clauses, a reporting team tags figures in financial filings and a security team assigns a weakness type to each new vulnerability. Each task runs at high volume, has an objectively correct answer and follows conventions specific to the organization or its regulator.
Frontier models perform these tasks well when the label set is supplied in the prompt. Their inference costs recur on every request. A small open model fine-tuned on the organization's own records can learn the label set and its conventions. It must still match the baseline and keep up as the work changes.
The Conscious Loop treats specialization as a continual process. New labeled records accumulate, a new version is trained and evidence from a comparison with the live version informs promotion.
The Conscious Loop
A task has an instruction, a finite label set and a stream of examples with their correct labels. The Loop maintains disjoint training records, a held-back set and a fixed benchmark. Training fits new versions. The held-back records compare the candidate with the live version. The fixed benchmark, typically 20 to 200 records, gives a consistent measure over time.
One training cycle
- Wait for new labeled records from production or an import.
- Build the training set, remove duplicates and set aside the held-back records.
- Set the sequence length, number of passes and evaluation interval for the size of the attempt's data.
- Train a LoRA adapter and keep the best evaluated checkpoint.
- Deploy the candidate beside the live version.
- Score both on held-back records and apply the sign test at the 5% level.
- Replay the fixed benchmark on both versions.
- Promote the candidate if it clears the gate. Keep the current version when the evidence falls short.
- Record every score and decision before waiting for more examples.
Training recipe
The trainer packs short records into sequences. The Loop derives sequence length from the measured record lengths and targets about 1,100 optimizer steps across 3 to 15 passes. It keeps 5% of the training rows for validation, with a minimum of 50 and a maximum of 500. It evaluates every tenth of the planned steps and stops after three evaluations without improvement. The checkpoint with the best validation loss is retained.
Promotion
A judge scores both answers against the reference and compares them in both orders. A win counts only when both orders agree. The candidate must clear a minimum case count, a mean score threshold, a win rate threshold and a one-sided sign test. A fixed benchmark can use exact match. Promotion can require approval or run automatically. The Study B experiments used the benchmark promotion rule described below.
Training from an earlier version
When enabled, the next attempt can train from the live version using new examples, data from unsuccessful attempts and a replay sample. If a previously learned record is deleted, the next attempt starts again from the base model using the remaining records.
Experimental design
Study A used the Run BiOS training interface under researcher control to vary training volume, data recency, the base model and the instruction format. It used 2 to 3 fixed epochs and selected versions by validation accuracy where available. Study B ran pipelines using their own training recipe, comparisons and fixed benchmarks.
Datasets and splits
Every task used 500 test cases from public records. The training counts are for the final Study A models. No synthetic examples were used.
| Task | Public data source | License | Labels | Training rows | Validation rows |
|---|---|---|---|---|---|
| Banking intent routing | Banking77 | CC BY 4.0 | 77 | 9,968 | 300 |
| Consumer complaint triage | CFPB Consumer Complaint Database | CC0 | 45 | 15,000 | 286 |
| Contract clause classification | LEDGAR from LexGLUE | CC BY 4.0 | 100 | 66,737 | 300 |
| XBRL numeric tagging | FiNER-139 | CC BY-SA 4.0 | 139 | 124,454 | 297 |
| Vulnerability root-cause triage | NIST National Vulnerability Database | Public domain | 54 | 34,906 | 300 |
Banking77, LEDGAR and FiNER-139 used their official test splits. Complaint test records were received in January and February 2024, after the training records. The vulnerability test used CVEs published from July to September 2026, also after the training records.
Complaint narratives came from a CC0 mirror. A random sample of 2,000 IDs matched the official CFPB file for the product and issue labels. The study kept CFPB redactions and removed CVE descriptions that revealed the correct weakness label.
Models and scoring
The three prompted baselines received the same task instruction and complete label list through Run BiOS at temperature 0.
- Anthropic Claude Opus 5.5 ·
anthropic/claude-opus-5-5 - OpenAI GPT-5.5 ·
openai/gpt-5.5 - OpenAI GPT-6 Astra ·
openai/gpt-6-astra
Study A fine-tuned Meta Llama-3.1-8B-Instruct, Qwen3.5-9B and Qwen3.6-27B. The researchers also tried Qwen3.6-35B-A3B on one task and measured untrained Llama-3.1-8B-Instruct as a reference.
Fine-tuning used LoRA adapters with bf16 and a maximum sequence length of 2,048 tokens. Some models used the full label list. Others used a one-sentence instruction.
Test controls
Training data was deduplicated against validation and test cases using normalized text. XBRL also used a sentence-level check without markers. Answers scored as correct when they matched the reference after lowercasing and collapsing whitespace. Test accuracy played no role in model selection.
Results
Claude Opus 5.5 was the strongest prompted baseline on all five tasks. The tuned models had statistically significant gains on banking intents, consumer complaints and contract clauses. Differences on XBRL tagging and vulnerability triage fell within sampling error.
Accuracy is exact match on 500 cases per task. Gains are in percentage points. The p values are from the exact two-sided McNemar test.
| Task | Selected fine-tuned model | Untrained Llama-3.1-8B | Fine-tuned | Claude Opus 5.5 | GPT-5.5 | GPT-6 Astra | Gain vs Claude | p value |
|---|---|---|---|---|---|---|---|---|
| Banking intent routing | Llama-3.1-8B-Instruct | 51.8% | 95.0% | 88.4% | 83.4% | 86.0% | +6.6 | <0.001 |
| Consumer complaint triage | Llama-3.1-8B-Instruct | 28.6% | 65.4% | 56.8% | 54.0% | 55.8% | +8.6 | <0.001 |
| Contract clause classification | Qwen3.6-27B | 61.6% | 89.0% | 84.8% | 79.8% | 83.0% | +4.2 | 0.004 |
| XBRL numeric tagging | Qwen3.5-9B | 58.6% | 87.4% | 86.4% | 81.8% | 80.2% | +1.0 | 0.551 |
| Vulnerability root-cause triage | Qwen3.6-27B | 53.2% | 76.6% | 76.2% | 67.0% | 69.2% | +0.4 | 0.902 |
95% Wilson confidence intervals
95% Wilson confidence intervals
| Task | Untrained Llama-3.1-8B | Fine-tuned | Claude Opus 5.5 | GPT-5.5 | GPT-6 Astra |
|---|---|---|---|---|---|
| Banking intent routing | 47.4% to 56.1% | 92.7% to 96.6% | 85.3% to 90.9% | 79.9% to 86.4% | 82.7% to 88.8% |
| Consumer complaint triage | 24.8% to 32.7% | 61.1% to 69.4% | 52.4% to 61.1% | 49.6% to 58.3% | 51.4% to 60.1% |
| Contract clause classification | 57.3% to 65.8% | 86.0% to 91.5% | 81.4% to 87.7% | 76.1% to 83.1% | 79.5% to 86.0% |
| XBRL numeric tagging | 54.2% to 62.8% | 84.2% to 90.0% | 83.1% to 89.1% | 78.2% to 84.9% | 76.5% to 83.5% |
| Vulnerability root-cause triage | 48.8% to 57.5% | 72.7% to 80.1% | 72.3% to 79.7% | 62.8% to 71.0% | 65.0% to 73.1% |
Inference and training costs
In the study, the fine-tuned models cost $0.08 to $0.61 per 1,000 requests, compared with $1.52 to $3.69 for Claude Opus 5.5, the strongest baseline. This was 4.1 to 19.0 times lower serving cost across the five tasks.
The serving columns show historical study costs in USD per 1,000 requests. Training is the separate one-time bill for the selected fine-tuning job.
| Task | Fine-tuned serving | Claude Opus 5.5 | GPT-5.5 | GPT-6 Astra | Savings vs Claude | One-time training |
|---|---|---|---|---|---|---|
| Banking intent routing | $0.08 | $1.52 | $4.53 | $5.89 | 19.0× | $10.69 |
| Consumer complaint triage | $0.50 | $3.69 | $8.45 | $9.86 | 7.3× | $17.98 |
| Contract clause classification | $0.25 | $1.67 | $4.09 | $5.76 | 6.7× | $72.53 |
| XBRL numeric tagging | $0.61 | $2.51 | $10.84 | $15.77 | 4.1× | $192.86 |
| Vulnerability root-cause triage | $0.41 | $2.28 | $8.76 | $11.09 | 5.5× | $302.88 |
The study billed the API baselines for 500 test requests per task. Fine-tuned serving cost used the dedicated GPU hourly rate and throughput measured at 32 concurrent requests in an isolated run. The report estimates that the serving savings would recover the one-time training bill after 5,640 to 162,737 requests, depending on the task.
The frontier models were evaluated as prompted APIs. Training charges were measured only for the open models fine-tuned in the study. The cost and payback figures describe the study setup and usage.
| Task | Dedicated serving configuration | Hourly rate in study | Measured requests per second |
|---|---|---|---|
| Banking intent routing | H100 NVL 94 GB | $4.47 | 15.6 |
| Consumer complaint triage | H100 NVL 94 GB | $4.47 | 2.5 |
| Contract clause classification | H200 141 GB | $7.41 | 8.2 |
| XBRL numeric tagging | H100 80 GB | $5.59 | 2.6 |
| Vulnerability root-cause triage | H200 141 GB | $7.41 | 5.0 |
Continual runs
Study B used 200 fixed cases per pipeline. A version was promoted when its benchmark score exceeded the live score, including some attempts that fell short of significance in the held-back comparison. These are separate results from the 500-case Study A comparisons.
| Task | Base model | Starting accuracy | Promoted versions | Scored attempts |
|---|---|---|---|---|
| Banking intent routing | Llama-3.1-8B | 48.5% | 90.0% then 91.5% | 3 |
| Consumer complaint triage | Llama-3.1-8B | 24.0% | 56.0% then 61.0% | 2 |
| Contract clause classification | Qwen3.6-27B | 84.0% | 85.5% then 87.0% | 4 |
| XBRL numeric tagging | Qwen3.5-9B | 70.0% | 75.0% then 79.0% | 2 |
| Vulnerability root-cause triage | Qwen3.6-27B | 64.0% | 68.5% then 69.0% then 69.5% | 3 |
An earlier banking pipeline started at 53.0% and promoted a version that reached 78.0%. A later attempt trained on 2,168 records reached 84.5%. Its held-back comparison fell short of significance and the earlier promotion rule kept the live version.
Discussion and limitations
Data volume
Increasing XBRL training from 57,466 to 124,454 examples raised accuracy from 80.6% to 87.4%. Increasing the contract set from 19,811 to 66,737 examples raised it from 85.4% to 89.0%.
Recency
Bringing in 15,554 CVEs from the first half of 2026 helped the vulnerability model reach 76.6%. On 59 cases from two related categories, the selected version answered 40 correctly compared with 20 for an earlier version trained on older records.
Instruction length
The selected contract model learned from a one-sentence instruction and did not need the full label list at inference. It reached 89.0% accuracy at $0.25 per 1,000 requests.
The study ran from 13 to 16 October 2026 in a pre-production environment. Each configuration was trained once. With 500 test cases, the 95% accuracy intervals were roughly 2 to 4 percentage points wide on either side. Model behavior and costs can change.
Banking77, LEDGAR and FiNER-139 may appear in frontier pretraining data. Validation and test splits contain duplicate text in 28 complaint cases, 7 XBRL cases and 3 vulnerability cases. The study found no matching training and test rows. Banking and complaint configurations had no scored validation runs, so the researchers selected the version trained on the most data.
Latency conditions differed between dedicated and serverless systems. The report omits latency comparisons. The Gemma-4-31B adapter trained but could not be served during evaluation.
Competing interests
The authors are affiliated with UltraSafe AI, the company behind Run BiOS. The work received no external funding.
Contributions
Arpit Sharma and Tathagat Sharma contributed equally. Bhavesh Soni, Mohit Kumar, Pranjal Bawa, Anubhav Tripathi, Suraj Sharma and Ankit Sharma contributed to the report.
Development paths and run log
Appendices A and B trace the versions tested for each task. The tables use the released run log. Validation is shown when a score was recorded. The training job IDs are abbreviated as in the report.
All scored training configurations
Banking intent routing
| Base model | Instruction | Training rows | Validation | Test accuracy | Training bill | Job |
|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | with label list | 5,000 | Unavailable | 91.0% | $3.80 | ad6b3b4b |
| Llama-3.1-8B-Instruct | with label list | 9,968 | Unavailable | 95.0% (selected) | $10.69 | 65fab674 |
Consumer complaint triage
| Base model | Instruction | Training rows | Validation | Test accuracy | Training bill | Job |
|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | with label list | 5,000 | Unavailable | 55.4% | $5.82 | 91682383 |
| Llama-3.1-8B-Instruct | with label list | 10,000 | Unavailable | 59.4% | $10.48 | 757f62d7 |
| Llama-3.1-8B-Instruct | with label list | 15,000 | Unavailable | 65.4% (selected) | $17.98 | cacd5204 |
Contract clause classification
| Base model | Instruction | Training rows | Validation | Test accuracy | Training bill | Job |
|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | with label list | 5,000 | Unavailable | 82.8% | $3.34 | 87132c8a |
| Llama-3.1-8B-Instruct | with label list | 10,000 | 84.7% | 83.4% | $5.35 | fe457926 |
| Qwen3.6-27B | with label list | 19,811 | 89.3% | 85.4% | $77.73 | 8570ccf5 |
| Qwen3.5-9B | with label list | 19,811 | 87.3% | 84.6% | $11.52 | af431527 |
| Qwen3.6-27B | one sentence | 66,737 | 90.3% | 89.0% (selected) | $72.53 | ab3dc81f |
XBRL numeric tagging
| Base model | Instruction | Training rows | Validation | Test accuracy | Training bill | Job |
|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | with label list | 5,000 | Unavailable | 77.8% | $8.16 | 37494321 |
| Llama-3.1-8B-Instruct | with label list | 10,000 | Unavailable | 80.2% | $20.50 | b03a8b80 |
| Llama-3.1-8B-Instruct | with label list | 17,706 | 84.2% | 79.0% | $39.69 | 73300605 |
| Qwen3.6-27B | with label list | 17,706 | 84.5% | 79.8% | $178.03 | 3db3afc6 |
| Qwen3.5-9B | with label list | 17,706 | 85.9% | 78.6% | $39.37 | 2751b01b |
| Qwen3.5-9B | with label list | 57,466 | 86.5% | 80.6% | $66.54 | 18521489 |
| Qwen3.5-9B | with label list | 124,454 | 91.9% | 87.4% (selected) | $192.86 | 8cdfab7f |
| Qwen3.5-9B | one sentence | 230,982 | 89.6% | 86.4% | $33.57 | 93ec534b |
| Qwen3.6-27B | one sentence | 230,982 | 89.6% | 87.6% | $201.38 | 5261301f |
Vulnerability root-cause triage
| Base model | Instruction | Training rows | Validation | Test accuracy | Training bill | Job |
|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | with label list | 5,000 | Unavailable | 58.2% | $5.56 | 03be31ff |
| Llama-3.1-8B-Instruct | with label list | 10,000 | Unavailable | 59.2% | $7.46 | fb98a631 |
| Llama-3.1-8B-Instruct | with label list | 19,352 | 60.3% | 61.8% | $16.27 | 1aed625f |
| Qwen3.6-27B | with label list | 19,352 | 69.7% | 69.8% | $136.30 | 82aa9ed0 |
| Qwen3.5-9B | with label list | 19,352 | 67.3% | 66.4% | $20.45 | d6198b3a |
| Qwen3.6-27B | with label list | 32,176 | 76.0% | 76.4% | $191.70 | 442640c5 |
| Qwen3.6-27B | with label list | 34,906 | 76.3% | 76.6% (selected) | $302.88 | caf60a4a |
| Qwen3.6-35B-A3B | with label list | 34,906 | 72.3% | 74.6% | $302.88 | c21975e6 |
| Qwen3.6-27B | one sentence | 51,336 | 74.7% | 75.8% | $64.70 | 46174866 |
| Qwen3.6-27B | with label list | 51,528 | 74.3% | 76.4% | $232.24 | ab631f76 |
| Qwen3.5-9B | with label list | 59,327 | 68.0% | 70.4% | $65.14 | db2eb516 |
| Qwen3.6-27B | with label list | 59,327 | 70.7% | 73.0% | $342.60 | 397911cc |
| Qwen3.6-27B | with label list | 99,327 | 72.0% | 71.4% | $583.16 | 02c2a747 |
Data and reproduction
Recompute Study A from the released answers using Python. The verifier checks the selected configurations and recomputes accuracy, confidence intervals, paired tests and serving costs. It runs locally without an account, an API key or third-party Python packages.
git clone --branch v1.0.0 --depth 1 https://github.com/RunBIOS-Research/gated-continual-specialization-of-small-open-models-to-frontier-level-accuracy.git
cd gated-continual-specialization-of-small-open-models-to-frontier-level-accuracy
python3 verify.py
shasum -a 256 -c MANIFEST.sha256- Reproduction guide
- Verification script
- Test and training data
- Per-case model answers
- Training and Conscious Loop logs
- Release checksums
The guide also covers rerunning the baselines, retraining a selected model and starting a Conscious Loop pipeline. These reruns use a Run BiOS account and may incur charges. The release records a banking rerun that scored 94.0% on the same 500 cases. Its training job cost $7.02. The banking pipeline reproduced on the public API rose from 47.5% to 83.5% and then to 89.0% on its fixed 200-case benchmark.
The release includes the structured records for all 41 fine-tuning jobs and the answers from 7,500 frontier test calls. The data and results are licensed under CC BY-SA 4.0. The reproduction scripts use the MIT License.
Full paper PDF
RReferences
- [P]Arpit Sharma, Tathagat Sharma, Bhavesh Soni, Mohit Kumar, Pranjal Bawa, Anubhav Tripathi, Suraj Sharma and Ankit Sharma. (2026). The Conscious Loop: Gated Continual Specialization of Small Open Models to Frontier-Level Accuracy at a Fraction of the Cost. UltraSafe AI technical report.
- [D]Evidence package v1.0.0. Data, model answers, logs and reproduction code.
- [C]Machine-readable citation (CITATION.cff).
- [1]Casanueva, I., Temčinas, T., Gerz, D., Henderson, M. and Vulić, I. Efficient Intent Detection with Dual Sentence Encoders. In Proceedings of the 2nd Workshop on Natural Language Processing for Conversational AI, Association for Computational Linguistics, 2020.
- [2]Tuggener, D., von Däniken, P., Peetz, T. and Cieliebak, M. LEDGAR: A Large-Scale Multi-label Corpus for Text Classification of Legal Provisions in Contracts. In Proceedings of the Twelfth Language Resources and Evaluation Conference (LREC), pages 1235 to 1241, 2020.
- [3]Chalkidis, I., Jana, A., Hartung, D., Bommarito, M., Androutsopoulos, I., Katz, D. and Aletras, N. LexGLUE: A Benchmark Dataset for Legal Language Understanding in English. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2022.
- [4]Loukas, L., Fergadiotis, M., Chalkidis, I., Spyropoulou, E., Malakasiotis, P., Androutsopoulos, I. and Paliouras, G. FiNER: Financial Numeric Entity Recognition for XBRL Tagging. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4419 to 4431, 2022.
- [5]Consumer Financial Protection Bureau. Consumer Complaint Database.
- [6]National Institute of Standards and Technology. National Vulnerability Database.
- [7]The MITRE Corporation. Common Weakness Enumeration, CWE-1000 Research Concepts view.
- [8]Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L. and Chen, W. LoRA: Low-Rank Adaptation of Large Language Models. In International Conference on Learning Representations (ICLR), 2022.
- [9]McNemar, Q. Note on the Sampling Error of the Difference Between Correlated Proportions or Percentages. Psychometrika 12(2), pages 153 to 157, 1947.
- [10]Wilson, E. B. Probable Inference, the Law of Succession and Statistical Inference. Journal of the American Statistical Association 22(158), pages 209 to 212, 1927.
- [11]Gururangan, S., Marasović, A., Swayamdipta, S., Lo, K., Beltagy, I., Downey, D. and Smith, N. A. Don't Stop Pretraining: Adapt Language Models to Domains and Tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8342 to 8360, 2020.
- [12]Scialom, T., Chakrabarty, T. and Muresan, S. Fine-tuned Language Models are Continual Learners. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 6107 to 6122, 2022.
- [13]Luo, Y., Yang, Z., Meng, F., Li, Y., Zhou, J. and Zhang, Y. An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning. arXiv preprint, 2023.
- [14]Wu, T., Luo, L., Li, Y.-F., Pan, S., Vu, T.-T. and Haffari, G. Continual Learning for Large Language Models: A Survey. arXiv preprint, 2024.
- [15]Biderman, D., Portes, J., Gonzalez Ortiz, J. J., Paul, M., Greengard, P., Jennings, C., King, D., Havens, S., Chiley, V., Frankle, J., Blakeney, C. and Cunningham, J. P. LoRA Learns Less and Forgets Less. Transactions on Machine Learning Research, 2024.
- [16]Dettmers, T., Pagnoni, A., Holtzman, A. and Zettlemoyer, L. QLoRA: Efficient Finetuning of Quantized LLMs. In Advances in Neural Information Processing Systems 36 (NeurIPS), 2023.
- [17]Bucher, M. J. J. and Martini, M. Fine-Tuned 'Small' LLMs (Still) Significantly Outperform Zero-Shot Generative AI Models in Text Classification. arXiv preprint, 2024.
- [18]Edwards, A. and Camacho-Collados, J. Language Models for Text Classification: Is In-Context Learning Enough? In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING), pages 10058 to 10072, 2024.
- [19]Zhao, J., Wang, T., Abid, W., Angus, G., Garg, A., Kinnison, J., Sherstinsky, A., Molino, P., Addair, T. and Rishi, D. LoRA Land: 310 Fine-tuned LLMs that Rival GPT-4, A Technical Report. arXiv preprint, 2024.
- [20]Chen, L., Zaharia, M. and Zou, J. FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance. arXiv preprint, 2023.
- [21]Ong, I., Almahairi, A., Wu, V., Chiang, W.-L., Wu, T., Gonzalez, J. E., Kadous, M. W. and Stoica, I. RouteLLM: Learning to Route LLMs with Preference Data. arXiv preprint, 2024.
- [22]Dror, R., Baumer, G., Shlomov, S. and Reichart, R. The Hitchhiker's Guide to Testing Statistical Significance in Natural Language Processing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1383 to 1392, 2018.
- [23]Card, D., Henderson, P., Khandelwal, U., Jia, R., Mahowald, K. and Jurafsky, D. With Little Power Comes Great Responsibility. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 9263 to 9274, 2020.
- [24]Miller, E. Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations. arXiv preprint, 2024.
- [25]Paleyes, A., Urma, R.-G. and Lawrence, N. D. Challenges in Deploying Machine Learning: A Survey of Case Studies. ACM Computing Surveys 55(6), article 114, 2022.