Fine-Grained Japanese Clinical Named Entity Recognition: A Controlled Comparison of BERT and Open-Weight Large Language Models

Feng Han, Ayako Yagahara, Kenji Hirata, Atsushi Yoshida, Kohsuke KudoarXiv 2026

TL;DR

While zero-shot Large Language Models (LLMs) struggle with the complexities of fine-grained Japanese clinical entity extraction, task-specific fine-tuning allows models with 13B+ parameters to significantly outperform traditional BERT-based baselines. A critical finding is that LLM performance is heavily dependent on the "generation budget"—the maximum number of output tokens allowed—which can bottleneck accuracy in entity-dense medical texts.

What Problem Does This Paper Address?

Named Entity Recognition (NER) is the bread and butter of clinical NLP, turning messy doctor's notes into structured data (e.g., identifying drugs, symptoms, or patient history). In Japanese, this is particularly challenging because the language lacks spaces, and clinical "fine-grained" schemes often require distinguishing between 100+ categories, including nuances like whether a finding refers to the patient or a family member.

Historically, encoder-based models like BERT (specifically UTH-BERT in Japan) have been the gold standard. Generative LLMs offer a new path, but we haven't known for sure if they actually beat BERT on these complex, niche tasks, or how sensitive they are to "generation settings" like output constraints and token limits.

Methods

The researchers conducted a controlled comparison between two fine-tuned BERT–CRF baselines and nine open-weight LLMs (ranging from 1.8B to 70B parameters).

Table 1. Encoder-based and open-weight language models included in the main comparison.

Key technical approaches included:

  • Adaptation: They compared zero-shot prompting (asking the model to do the task without examples) against QLoRA fine-tuning (an efficient way to adapt large models to specific tasks).
  • Structured Output: They tested the impact of JSON Schema constraints—forcing the model to output valid JSON—to see if better formatting leads to better extraction.
  • Generation Budget: They explicitly varied the maximum output token limit (900 vs. 2,600/4,096 tokens) to measure how truncation affects performance.
  • Evaluation: Instead of traditional character-span matching, they used sentence-level label–surface matching (relaxed and exact F1 scores), which is more suitable for generative models.
Figure 1. Study overview, from corpus partitioning and model training to the four experimental comparisons and common

Datasets

The study used iCorpus, a Japanese corpus of published case reports. It is a rigorous benchmark featuring 113 entity categories. The researchers partitioned the data into 1,672 training sentences and 433 test sentences.

Key Insights and Ideas

  • The "Generation Budget" is a Hidden Variable: In entity-dense clinical text, a single sentence might contain dozens of entities. If the LLM's output limit is too low (e.g., 900 tokens), it physically cannot list all the entities it finds. Increasing this limit was one of the biggest drivers of performance gains, highlighting that LLM benchmarks must report their generation budgets to be reproducible.
  • Zero-Shot is Not Enough: Even the best zero-shot LLMs performed poorly (max F1 ~0.34) compared to BERT (~0.84). Clinical NER requires following very specific annotation conventions that models simply don't pick up from general pre-training.
  • Medical Specialization Isn't a Silver Bullet: Surprisingly, LLMs specifically pre-trained on medical data (like Med42 or MedGemma) did not consistently outperform their general-purpose counterparts (like Llama or Gemma) after fine-tuning. Task-specific adaptation (fine-tuning) seems more important than domain-specific pre-training for this task.
  • Constraints Don't Fix Accuracy: Forcing a model to output valid JSON (via JSON Schema) ensures the output is "parsable," but it doesn't actually help the model find more entities or categorize them more accurately in a zero-shot setting.

Key Results

  • LLMs Win (Eventually): Once fine-tuned and given enough output tokens, all eight LLMs with $\ge$ 13B parameters beat the BERT baselines.
  • Top Performer: Llama-3.3-70B achieved the highest scores, with a relaxed F1 of 0.914 (compared to BERT’s 0.841).
  • The 1.8B Exception: The smallest model (LLM-jp-3.1-1.8B) was the only one that failed to clearly outperform the BERT baselines, suggesting a "size floor" for complex clinical NER.
  • Recall vs. Truncation: At a 900-token limit, models reached the limit on ~20% of sentences, which contained roughly half of all entities. Increasing the limit to 4,096 tokens drastically improved recall by preventing this truncation.

Limitations and Future Work

The authors acknowledge several limitations:

  1. Case Reports vs. EHRs: Published case reports are more "polished" than raw Electronic Health Records (EHRs). Performance might drop on real-world, messy clinical notes.
  2. Evaluation Metric: The use of surface-string matching rather than exact character-offset spans means the study didn't directly measure the model's ability to locate the exact position of an entity in the text.
  3. Training Truncation: Some long training examples were truncated during the fine-tuning process, which might have slightly hampered the models' learning.

Future research should look at how these findings translate to routine clinical records and explore more efficient ways to handle extremely long, entity-dense documents without hitting token limits.

Summary updated

Abstract

Background: Generative large language models (LLMs) offer an alternative to encoder-based clinical named entity recognition (NER), but their performance on fine-grained Japanese extraction tasks and sensitivity to generation settings remain uncertain. Methods: We compared two fine-tuned BERT-CRF baselines with nine open-weight LLMs on iCorpus, which defines 113 entity categories. The evaluation used 433 sentences from 36 test documents; 1,672 sentences were used for training. LLMs were evaluated using zero-shot prompting with and without JSON Schema constraints and three-seed QLoRA fine-tuning. Fine-tuned models were assessed under different output-token limits, including 900 and larger model-specific limits of 2,600 or 4,096 tokens. Performance was measured using sentence-level label-surface matching with relaxed and exact-surface F1. Results: The highest zero-shot relaxed F1 was 0.337, compared with 0.836-0.841 for the BERT baselines. At the larger output limits, all eight fine-tuned LLMs with at least 13B total parameters exceeded both BERT baselines (relaxed F1, 0.882-0.914; exact-surface F1, 0.840-0.880). Across three-seed means, increasing the output limit improved relaxed F1 by 0.052-0.085, alongside higher recall and fewer length-limited outputs. JSON Schema constraints changed relaxed F1 by -0.014 to +0.008 among seven models outside the two reasoning-oriented configurations, while medical-general model pairs showed no consistent advantage for medical specialization. Conclusions: On this historical Japanese case-report benchmark, task-specific fine-tuning combined with adequate generation capacity was associated with stronger LLM extraction performance. Output-token limits materially affected comparisons with BERT, whereas enforcing output structure alone did not overcome low zero-shot accuracy.
BibTeX
@misc{han2026fine,
  author = {Feng Han and Ayako Yagahara and Kenji Hirata and Atsushi Yoshida and Kohsuke Kudo},
  title = {{Fine-Grained Japanese Clinical Named Entity Recognition: A Controlled Comparison of BERT and Open-Weight Large Language Models}},
  year = {2026},
  eprint = {2611.22219},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22219},
}
Figure