做文档翻译或长文本处理的团队终于有了不依赖昂贵 LLM 的上下文建模方案——G^2C-MT 用图结构替代暴力检索,翻译质量提升且成本可控,做 NLP 应用的建议点开看看方法细节。
文档级机器翻译需要捕捉长距离的篇章依赖关系,现有方法缺乏对结构化篇章依赖的显式建模。本文提出 G^2C-MT,将上下文选择视为轻量级篇章图上的结构化路径发现问题,通过将段落表示为节点并建模语义相似度、邻接和关键词重叠关系,再使用深度偏置随机游走采样上下文路径,引导大模型翻译。该方法支持多路径采样,能聚合多样候选翻译以提升鲁棒性。实验表明,G^2C-MT 在 DeepSeek-V3、Gemini-2.5-Flash-lite 和 Qwen-2.5/3 系列等多个大模型上均优于强基线。
G^2C-MT: Graph-Guided Context Selection for Document-Level Machine Translation
Effective document-level machine translation (DocMT) requires capturing long-range discourse dependencies. Recent work has explored retrieval-based and discourse-aware context selection. However, these approaches often lack an explicit mechanism for modeling structured discourse dependencies between distant paragraphs in a document. In this paper, we propose G^2C-MT (Graph-Guided Context for Machine Translation), which views DocMT context selection as a structured path discovery problem on a lightweight discourse graph, rather than retrieving unstructured context sets or relying on expensive LLM-based discourse modeling. In detail, we represent each paragraph as a node and model the relationship between each pair of nodes, considering their semantic similarity, adjacency, and keyword overlap. Furthermore, we propose a depth-biased random walk over the graph to sample a backward context path for each target paragraph. The context path will be used to prompt a large language model (LLM) for translation. This framework naturally supports multi-path context sampling, which can improve robustness by aggregating diverse translation candidates for discourse-ambiguous inputs. Experiments conducted across various domains show that G^2C-MT outperforms strong baselines on multiple LLMs, including DeepSeek-V3, Gemini-2.5-Flash-lite, and the Qwen-2.5/3 series.