Papers for

legal document processors

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

System handles degraded historical archives with noisy ocr errors

Reading Beyond OCR Noise: Robust Cross-Lingual RAG for Legislative Archives

Abstract: India's historical public archives present severe computer vision and document image analysis challenges: decades of parliamentary records survive only as degraded, multi-column scanned pages featuring mixed scripts, complex layouts, and dense visual noise where OCR failure is the primary obstacle to information retrieval. We present an end-to-end framework that couples vision-based layout segmentation and multi-script OCR with an agentic retrieval-augmented generation (RAG) pipeline. Our approach specifically addresses how visual degradation and layout fragmentation propagate into text extraction errors, using an iterative agentic loop to navigate around OCR noise and layout ambiguities before generating answers. Evaluated on the 200,000-page Punjab Vidhan Sabha archive, our system demonstrates robust handling of historical document degradation, outperforming standard text-only baselines.

Mon 26 OctComputer Vision and Pattern RecognitionArtificial IntelligenceInformation Retrieval
The gist
Old government papers from India are hard to read because the pages are damaged and scanned with different languages and tricky layouts. The authors created a system that combines reading these mixed scripts with a smart, back-and-forth process to fix mistakes caused by bad text recognition. This approach helps the system better find information from the messy scanned documents. They tested it on a large collection of 200,000 pages and it worked better than usual methods that just use plain text.
Open → 2610.35240v1

Engine improves reversible pseudonymisation for uk english and russian documents

Reversible Pseudonymisation of Documents Sent to External LLMs: an Open Bilingual Benchmark and an Engine

Abstract: Professionals send working documents to external large language models. A common safeguard is reversible pseudonymisation: personal data are replaced with placeholders before the request and restored locally in the answer. We present an open benchmark of five existing open tools and a regular-expression baseline on Russian and UK English, and an open engine built on the two strongest tools. The benchmark excludes each tool's own authors' dataset from its verdict, compares the engine with each tool on identical datasets for detection, reports masking precision, and tests on a held-out set of synthetic documents whose files, hashes, decision rules, run plan and stopping rule were published before any run. Two local LLMs test whether placeholders survive. All evaluation data are synthetic, and the benchmark was run by the author of the engine; code, data, predictions and raw answers are released. On external datasets no existing tool meets all predefined thresholds: in UK English the identifier and leak thresholds are not met, in Russian the identifier threshold is borderline. On the last held-out set of 1,000 documents per language, the best existing tools leave a whole value visible in 61% (Russian) and 58% (UK) of documents. On these documents, from the generator it was developed on, the engine does so in 0.3% [0.1; 0.9] and 0.2% [0.1; 0.7], leaves any part of a value visible in 0.8% and 0.2%, and meets all detection thresholds in both languages. In UK English it also restores at least 99% of its placeholders after 760 answers. In Russian it restores only 94.6% [93.6; 95.6] of name placeholders, against a 99% threshold, mainly because the inflection it borrows from pii-guard produces wrong surname forms. The engine was developed over six earlier held-out sets from the same generator; real documents were not tested.

Sun 25 OctComputation and LanguageCryptography and Security
The gist
Many professionals send documents containing personal data to external AI language tools. To protect privacy, sensitive details are replaced with placeholders before sending and restored afterward. The authors tested several existing tools and created a new engine that better masks and recovers personal data in English and Russian documents. Their engine drastically reduces visible personal data compared to others and restores placeholders accurately, although some issues remain with Russian name forms. The work is based on synthetic data and has yet to be tested on real documents.
Open → 2610.34012v1

Copygen improves exact span reproduction in large language models

When Copying Is Hard: Copy-Constrained Decoding for Exact Span Reproduction

Abstract: Precisely reproducing a target span verbatim within a long context is a fundamental capability test for LLMs: even when the target string is present in context, models often still drift within the span or fail to stop correctly, revealing limitations in source grounding and boundary control. This capability has broad practical relevance. For instance, code generation often requires embedding sensitive strings such as API keys exactly as they appear in context. In this work, we construct a benchmark to test exact span reproduction ability across contracts, scientific literature, code, and random sequences, and find that current models still make surprisingly frequent errors. To address this, we propose CopyGen, a lightweight copy-constrained plugin for frozen LLMs that turns copying from a byproduct of next-token prediction into a controlled process. Our key idea is to decompose copying into three distinct decisions: when to copy, how far to copy, and when to stop. Concretely, CopyGen first determines whether to enter copy mode, then predicts a tentative copy length, and finally verifies the generated span token by token. During verification, we adaptively adjust the logits of copy continuation tokens to incentivize or suppress continuation, and emit only the longest valid prefix. Across three LLM backbones and four benchmark tasks, CopyGen improves average exact match by 35% relative without model finetuning, and integrates seamlessly with SFT to further improve it by 4%, while substantially accelerating generation. These results suggest that reliable exact copying is not something LLMs obtain for free, but a decoding-time control problem that requires explicit modeling. Code is available at https://github.com/mbzuai-nlp/CopyGen.

Tue 20 OctComputation and Language
The gist
Sometimes language models struggle to copy exact pieces of text from a large amount of information, even when the text appears there. This is a problem for tasks like writing code with exact keys. The authors created a test to measure this problem and found current models make many copying mistakes. They designed CopyGen, a new technique that helps models decide when and how much to copy exactly, making copying much more reliable without changing the model itself. CopyGen improves exact copying accuracy significantly and speeds up text generation.
Open → 2610.28393v1

Coding agents improve digitizing clinical trial protocols but struggle with final structuring

The Last Mile of Coding Agents for Long-Document Tasks: An Empirical Study on Clinical Trial Protocol Digitization

Abstract: Clinical trial protocols serve as the source of truth for study design, but are mostly written and used as unstructured PDF documents. Digitizing protocols turns static content into structured, machine-readable data that clinical software can analyze, validate, and execute. Coding agents, which select tools, execute code, and revise their approach as they work, are increasingly applied to such long-document tasks, yet it remains unclear how reliably they turn complete documents into accurate structured outputs. We study this question using protocol digitization as a testbed. We introduce TrialPD-Bench, an expert-annotated benchmark of 150 publicly available protocol PDFs spanning four task categories. Beyond final-answer performance, our evaluation measures evidence recall from agent traces, agent behavior, and cost. Across nine proprietary and open-weight models in five coding-agent harnesses, even the strongest agents do not fully solve protocol digitization. Our analysis further shows that agents usually locate the required evidence but fail in the last mile of transcribing and structuring it. We further develop TrialScribe, a domain-specific harness that equips coding agents with task skills and a verification loop. TrialScribe improves a locally served open-weight model by 6.2-59.4 points across eight metrics, enabling it to match or surpass proprietary models such as GPT-5.6-Sol.

Tue 13 OctComputation and Language
The gist
Clinical trial protocols are long documents that describe how a medical trial should be done, but they are usually hard to read by computers. The authors studied how AI coding agents can turn these protocols into structured data that computers can use. They created a special test called TrialPD-Bench with many real protocols and found that current AI systems often find the right information but have trouble turning it perfectly into structured data. They also made a new tool, TrialScribe, that helps the AI check its work and improves accuracy, sometimes beating even strong commercial AI models.
Open → 2610.18507v1

Direct workspace tabs help tracking complex knowledge tasks in lLM agents

RunningTab: Direct Workspace Interaction with Environment-Side Tabs

Abstract: Much knowledge work produces new deliverables from files a workspace already holds, and LLM agents are beginning to take such work over. Through direct corpus interaction, an agent can search and read any of those files from a terminal with no indexing, and producing a deliverable from many of them in this way is what we call direct workspace interaction (DWI). Reaching the files, however, is only half the task: nothing keeps track of what the task asks for, what has been read, and what was listed but never opened, all of which slip through the context window without leaving a trace, so an agent may extract a figure and still deliver a report without it. To address this, we present RunningTab, a framework that equips direct workspace interaction with an environment-side tab: a per-task record of what the task still owes, kept by the environment alongside the agent. Specifically, the agent adds its requirements, while the environment records every file read as an excerpt with its provenance and every listed but unopened file as a candidate; the agent can then see each requirement beside its best-matching excerpts and top unopened candidates, resolve it against matching content or set it aside with a reason, and, should it try to finish with requirements still open, receive them in a finish check. We validate RunningTab on three benchmarks with three LLMs, where it consistently outperforms plain DWI and baselines that keep the record in the model, while its tab usually holds the values a deliverable needs once seen.

Wed 7 OctArtificial IntelligenceComputation and Language
The gist
Handling many files for a single task is tricky, especially when an AI assistant reads some files but forgets others it should check. The authors introduced RunningTab, a system that keeps track of what an AI has read, which files it should still consider, and what requirements remain unmet, all stored alongside the task environment rather than inside the AI model. This helps the AI better organize information and avoid missing important parts before delivering results.
Open → 2610.10444v1

Multimodal ai learns expert tricks to spot forged text in documents

From Sharp Eyes to Expert Mind: Internalizing Expert Knowledge in MLLMs for Tampered Text Detection

Abstract: Tampered Text Detection (TTD) is essential for safeguarding document authenticity in security-critical workflows. Existing expert models are effective at capturing subtle manipulation traces but often generalize poorly across diverse document domains, while Multimodal Large Language Models (MLLMs) offer stronger semantic understanding and transferability yet remain insensitive to fine-grained forensic artifacts. This complementarity motivates us to investigate how expert forensic perception can be internalized into an MLLM rather than merely accessed through an external module. We identify a fundamental Double Mismatch that hinders this goal: a Spatial Precision Mismatch between coarse visual tokens and tiny tampered regions, and a Perceptual Granularity Mismatch between semantics-oriented pre-training and low-level forensic perception. To address these challenges, we propose Expert Knowledge Internalization (EKI), a progressive two-stage framework that transfers forensic expertise into the MLLM itself. In Stage 1, Text-Focused and Image-Focused strategies establish precise spatial focus on small text regions. In Stage 2, the proposed Forensic-General Representation Alignment (FGRA) loss aligns shallow LLM representations with those of a pre-trained forensic expert, enabling the model to acquire fine-grained artifact perception before such cues are diluted by deeper semantic abstraction. Extensive experiments on multiple in-domain and cross-domain benchmarks demonstrate that EKI achieves state-of-the-art performance and stronger generalization than existing expert-model-based and MLLM-based methods. Moreover, the expert is required only during training, allowing the resulting MLLM to maintain inference efficiency nearly identical to the vanilla model without relying on any external expert at inference.

Mon 28 SeptComputer Vision and Pattern Recognition
The gist
Detecting fake or tampered text in documents is important for keeping them trustworthy, especially in security settings. The paper shows that while expert models can spot tiny changes, they don’t work well across many document types. Large language models that understand images and text better miss small details. The authors teach these big models to see small, tricky changes by training them with expert knowledge, making them both smart and precise at spotting forgery without needing extra tools each time.
Open → 2609.36145v1