[Paper Review] Semi-Supervised Web Wrapper Repair via Recursive Tree Matching.
XTPath is a semi-supervised wrapper repair method that uses recursive tree matching to locate structurally and contextually similar DOM nodes across evolving web pages, leveraging annotated training data to improve extraction robustness. It outperforms XPath and a commercial system on 117,422 pages from 75 diverse websites across 8 vertical markets.
Continuous data extraction pipelines using wrappers have become common and integral parts of businesses dealing with stock, flight, or product information. Extracting data from websites that use HTML templates is difficult because available wrapper methods are not designed to deal with websites that change over time (the inclusion or removal of HTML elements). We are the first to perform large scale empirical analyses of the causes of shift and propose the concept of domain entropy to quantify it. We draw from this analysis to propose a new semi-supervised search approach called XTPath. XTPath combines the existing XPath with carefully designed annotation extraction and informed search strategies. XTPath is the first method to store contextual node information from the training DOM and utilize it in a supervised manner. We utilize this data with our proposed recursive tree matching method which locates nodes most similar in context. The search is based on a heuristic function that takes into account the similarity of a tree compared to the structure that was present in the training data. We systematically evaluate XTPath using 117,422 pages from 75 diverse websites in 8 vertical markets that covers vastly different topics. Our XTPath method consistently outperforms XPath and a current commercial system in terms of successful extractions in a blackbox test. We are the first supervised wrapper extraction method to make our code and datasets available (online here: this http URL).
Motivation & Objective
- To address the challenge of wrapper failure due to dynamic changes in HTML templates across websites.
- To quantify the causes of structural shifts in web pages using domain entropy, a novel metric for measuring template instability.
- To develop a semi-supervised method that leverages contextual node information from training DOMs to guide search in evolving web structures.
- To enable robust, scalable wrapper repair without requiring full retraining or manual reconfiguration for each site change.
Proposed method
- XTPath combines XPath with a recursive tree matching algorithm that compares subtree structures based on node content, attributes, and positional context.
- It introduces a heuristic function that scores candidate nodes by their similarity to the training DOM structure, prioritizing nodes with high contextual alignment.
- The method stores and reuses annotated contextual node information from the training DOM to guide search, enabling supervised adaptation to structural shifts.
- It performs informed search over candidate XPath expressions using a cost function that balances structural similarity and path validity.
- Domain entropy is computed to quantify the degree of template instability across websites, informing the design of robust search heuristics.
- The approach is trained and evaluated on a large-scale dataset of 117,422 pages from 75 websites across 8 vertical markets.
Experimental results
Research questions
- RQ1What are the primary causes of structural shifts in web templates that lead to wrapper failure?
- RQ2How can domain entropy be used to quantify and predict template instability across diverse web domains?
- RQ3Can recursive tree matching with contextual node information improve wrapper repair accuracy compared to standard XPath?
- RQ4To what extent does XTPath outperform existing commercial and open-source wrapper systems in real-world, black-box evaluation?
Key findings
- Domain entropy effectively quantifies template instability across diverse websites, revealing that structural shifts are frequent and systematic across web verticals.
- XTPath significantly outperforms standard XPath in terms of successful data extractions across all 75 websites in the evaluation.
- XTPath achieves higher extraction success rates than a current commercial wrapper system in blackbox testing on the same dataset.
- The method demonstrates consistent performance improvements across all 8 vertical markets, including high-variability domains like flight and product listings.
- The integration of contextual node information via recursive tree matching leads to more accurate and stable node selection under template changes.
- XTPath is the first supervised wrapper extraction method to publicly release both its code and training datasets for reproducibility and benchmarking.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.