Lune

ACL2026Top-tier venue

Just Pass Twice: Efficient Token Classification with LLMs for Zero-Shot NER

Ahmed Ewais, Ahmed Hashish, Amr Ali

Abstract

Large language models encode extensive world knowledge valuable for zero-shot named entity recognition. However, their causal attention mechanism, where tokens attend only to preceding context, prevents effective token classification when disambiguation requires future context. Existing approaches use LLMs generatively, prompting them to list entities or produce structured outputs, but suffer from slow autoregressive decoding, hallucinated entities, and formatting errors. We propose Just Pass Twice (JPT), a simple yet effective method that enables causal LLMs to perform discriminative token classification with full bidirectional context. Our key insight is that concatenating the input to itself lets each token in the second pass attend to the complete sentence, requiring no architectural modifications. We combine these representations with definition-guided entity embeddings for flexible zero-shot generalization. Our approach achieves state-of-the-art results on zeroshot NER benchmarks, surpassing the previous best method by +7.9 F1 on average across CrossNER and MIT benchmarks, being over 20× faster than comparable generative methods. Code and pretrained model weights will be available through our project page.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction cites LoRA: Low-Rank Adaptation of Large Language Models
  • GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction cites CrossNER: Evaluating Cross-Domain Named Entity Recognition
  • LoRA: Low-Rank Adaptation of Large Language Models cites Deberta: decoding-Enhanced Bert with Disentangled Attention
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on17

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  2. Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
  3. Splitwise: Efficient Generative LLM Inference Using Phase SplittingPratyush Patel, Esha Choukse, Chaojie Zhang, Aashaka Shah et al.ISCA 2024 · 282 citations
  4. CrossNER: Evaluating Cross-Domain Named Entity RecognitionZihan Liu, Yan Xu, Tiezheng Yu, Wenliang Dai et al.AAAI 2021 · 201 citations
  5. GoLLIE: Annotation Guidelines improve Zero-Shot Information-ExtractionOscar Sainz, Iker García-Ferrero, Rodrigo Agerri, Oier Lopez de Lacalle et al.ICLR 2024 · 168 citations

Related papers

  1. ZeroNER: Fueling Zero-Shot Named Entity Recognition via Entity Type DescriptionsAlessio Cocchieri, Marcos Martínez Galindo, Giacomo Frisoni, Gianluca Moro et al.ACL Findings 2025 · 3 citations
  2. NER Retriever: Zero-Shot Named Entity Retrieval with Type-Aware EmbeddingsOr Shachar, Uri Katz, Yoav Goldberg, Oren GlickmanEMNLP Findings 2025 · 1 citation
  3. Scalable Zero-shot Entity Linking with Dense Entity RetrievalLedell Wu, Fabio Petroni, Martin Josifoski, Sebastian Riedel et al.EMNLP 2020 · 336 citations
  4. Gen-Z: Generative Zero-Shot Text Classification with Contextualized Label DescriptionsSachin Kumar, Chan Young Park, Yulia TsvetkovICLR 2024 · 8 citations
  5. Generating Training Data with Language Models: Towards Zero-Shot Language UnderstandingYu Meng, Jiaxin Huang, Yu Zhang, Jiawei HanNeurIPS 2022 · 309 citations
Dusk over the sea between two cliffs drawn in fine vertical lines