arXiv:2511.23119cs.CL2025-11KDD被引 8

用轻量模型高效精准提取网页正文,兼顾速度与准确性。

Dripper: Token-Efficient Main HTML Extraction with a Lightweight LM

  • 将提取任务转为约束序列标注,避免生成幻觉,单卡每秒处理3.08页。
  • 在7809页多语言数据集上,性能超越传统工具,媲美千亿参数大模型。
  • 开源轻量模型与代码,适合构建高质量网页数据集的研究者使用。

从网页中高质量提取主内容是构建大规模训练语料的关键前提。传统启发式提取器虽高效,但缺乏处理现代网页结构异构性的语义理解能力;而高性能生成式大模型虽有更强文档理解力,却因计算成本高、上下文窗口有限及幻觉风险,在网页规模应用中受限。本文提出轻量级框架 Dripper,通过四项贡献突破瓶颈:(1) 将提取重构为基于小语言模型(SLMs)的约束序列标注任务,消除生成幻觉,实现极高效率,单 A100 GPU 达到每秒 3.08 页的吞吐量;(2) 构建 WebMainBench 基准,包含 7,809 条人工标注网页,覆盖 5,434 个唯一域名和多种语言,评估显示 Dripper-0.6B 模型在准确率上优于 Trafilatura 等启发式工具,媲美 DeepSeek-V3.2(685B)、GPT-5 和 Gemini-2.5-Pro,兼具优异的效率-精度平衡;(3) 通过在 Dripper 清洗的语料(630亿词元)上预训练 1B 参数模型,显著提升下游任务表现,验证了提取质量对模型性能的关键影响;(4) 开源 Dripper-0.6B 模型权重与代码库,助力高质量网页数据集建设。

原文摘要 · Abstract (English)

High-quality main content extraction from web pages is a critical prerequisite for constructing large-scale training corpora. While traditional heuristic extractors are efficient, they lack the semantic reasoning required to handle the structural heterogeneity of the modern web. Conversely, well-pretrained generative Large Language Models (LLMs) offer superior document comprehension but are prohibited by excessive computational costs, limited context windows, and hallucination risks when applied at web scale. We present \textbf{Dripper}, a lightweight framework that resolves these bottlenecks through four contributions: (1) We reformulate extraction as a \textbf{constrained sequence labeling} task using SLMs (Small Language Models). This paradigm eliminates generative hallucinations and achieves exceptional efficiency, reaching a throughput of 3.08 pages per second on a single A100 GPU. (2) We construct \textbf{WebMainBench}, a rigorous benchmark of 7,809 human-annotated pages covering 5,434 unique domains and multiple languages. Evaluations show our Dripper-0.6B model \textbf{outperforms} heuristics like Trafilatura and rivals massive models like DeepSeek-V3.2(685B), GPT-5 and Gemini-2.5-Pro, offering an optimal efficiency-accuracy trade-off. (3) We demonstrate infrastructural value by \textbf{pre-training a 1B model} on a Dripper-curated corpus (63B tokens). This model significantly outperforms baselines in downstream tasks, proving the critical role of extraction quality and the effectiveness of our framework. (4) We \textbf{open-source} the Dripper-0.6B weights and codebase to facilitate the construction of high-quality datasets.

网页提取轻量模型数据构建序列标注

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。