Abstract
Sentence order is a critical but often overlooked signal for identifying parallel documents in massive web crawls. This work demonstrates that incorporating coarse sequence information into document embeddings, combined with a high-speed sentence alignment re-scoring step, significantly improves document alignment accuracy. On standard benchmarks, this approach achieves a 61% error reduction and enhances downstream machine translation quality for low-resource languages like Sinhala.
Introduction
The development of modern machine translation (MT) systems relies on the availability of millions of parallel sentence pairs. These pairs are typically harvested from the web through "document alignment"—the process of identifying translated versions of web pages across different languages.
However, web crawls are inherently noisy. Previous state-of-the-art methods often treated documents as unordered "bags-of-words" or simple averages of sentence embeddings. This approach ignores a fundamental structural property: parallel documents generally present information in the same relative order. By neglecting this signal, traditional models struggle to distinguish between documents that are merely topically similar and those that are true translations.
Methodology
The proposed system utilizes a two-stage pipeline designed to explicitly model document structure while maintaining computational efficiency.
Candidate Generation (Coarse Phase)
Instead of a single global average vector, documents are divided into 16 overlapping regions using a modified PERT distribution. An embedding is computed for each region, and these are concatenated to form a "position-aware" document vector. This allows for fast searching using approximate nearest neighbor libraries like FAISS. To further refine the signal, Linear Inverse Document Frequency (LIDF) is used to down-weight common "boilerplate" text (e.g., "Contact Us") that often leads to false alignments.
Candidate Re-scoring (Fine Phase)
For the top 32 candidates from the first stage, the system performs a full sentence-level alignment using Vecalign. Document pairs are then re-scored based on alignment quality, semantic similarity of aligned sentences, and Language ID probabilities to filter out un-translated copies. To optimize resource usage, 1024-dimensional LASER embeddings are compressed to 128 dimensions via Principal Component Analysis (PCA), reducing storage requirements by 97% with negligible impact on accuracy.
Experimental Results
The method was evaluated on the WMT16 Document Alignment Shared Task (French-English) and a low-resource ParaCrawl setting (Sinhala-English).
Alignment Performance
On the WMT16 benchmark, the proposed method achieved a state-of-the-art recall of 98.5%, a significant improvement over the previous best of 96.2%. This represents a 61% relative reduction in the false positive rate.
The effectiveness of the position-aware embeddings is further highlighted by the Recall @ K metrics. As shown in Figure 1, the proposed method consistently outperforms standard averaging techniques, requiring fewer candidates to locate the correct match.
Impact on Machine Translation
For the low-resource Sinhala–English pair, the alignment method improved downstream MT performance by 1.2 BLEU points compared to existing ParaCrawl baselines. This confirms that maintaining document context and respecting sentence order produces higher-quality training data than simple sentence mining.
Discussion and Future Work
The core insight of this research is that sentence order serves as a powerful filter. Even semantically similar documents can be disqualified if their information is shuffled. Despite its success, the method has limitations. It depends heavily on the quality of pre-trained LASER embeddings and assumes a roughly linear progression of information, which may not hold for complex web layouts. Future work could involve optimizing structural hyperparameters to further enhance performance across diverse document types.
Conclusion
By treating documents as structured sequences rather than unordered sets, this work sets a new standard for document alignment. The combination of position-aware embeddings and efficient re-scoring provides a scalable solution for building high-quality parallel corpora from the noisy web.
Summary updated