Abstract
Researchers from Baidu and Tsinghua University have developed a novel Graph Neural Network (GNN) framework that assesses webpage quality by analyzing its layout. By representing a webpage’s Document Object Model (DOM) as a graph and utilizing a specialized Graph Attention Network (GAT) with a global virtual node, the model identifies high-quality content across trillions of diverse webpages. This approach significantly improves search engine results and reduces user cognitive burden.
Introduction
In modern search engines, "relevance" is no longer the sole metric of success. A webpage might contain the exact information a user needs, but if it is cluttered with advertisements, has a chaotic layout, or buries its content under poor design, it creates a high "cognitive burden." Traditional quality assessment methods relied on hand-crafted features tailored to specific categories (e.g., shopping or medical sites), which fail to scale to the trillions of heterogeneous webpages found in modern search indices.
The challenge lies in creating a unified representation that captures the layout of vastly different websites and modeling the intricate hierarchical relationships and visual attributes—such as font size, positioning, and margins—that signal quality to a human eye.
The Virt-GAT Framework
The authors propose a Layout-aware Webpage Quality Assessment model that treats a webpage's DOM tree as a graph. In this formulation, nodes represent content pieces (text, images, videos) and edges represent their hierarchical relationships.
Each node is assigned rich features across four primary categories:
- Location: Coordinates (x, y) and dimensions.
- Content: Word count, font size, weight, and alignment.
- Layout: Padding, margins, visibility, and display styles.
- Others: Tag names and webpage categories.
The core of the model is the Virt-GAT, a Graph Attention Network designed to model local relationships (e.g., an image next to a descriptive text block). A key innovation is the introduction of a Global Virtual Node—a "super-hub" connected to every other node in the graph. This virtual node aggregates global information and acts as an attentive readout function for the entire page, allowing the model to understand how disparate elements, like a footer and a header, relate to the overall quality.
System Implementation and Workflow
To deploy this model at scale within Baidu Search, the researchers designed a two-phase pipeline: Input Data Construction and the Online System Workflow.
- Input Data Construction: Webpages are parsed into an HTML database. Layout graphs are then constructed and processed to generate the input data for the model.
- Online System Workflow: The layout-aware quality assessment model generates scores ($s_p$) for webpages. These scores are stored in a Quality Score Database. When a user performs a search, the ranking system pulls these pre-calculated scores to adjust the final results, ensuring zero real-time latency.
Experimental Results
The study utilized a massive, real-world dataset provided by Baidu Search, consisting of 600,000 training webpages and 20,000 testing webpages, all manually labeled by experts.
The proposed Virt-GAT model significantly outperformed baselines such as TreeLSTM and standard GNNs:
- Offline Performance: Achieved an absolute improvement in AUC of 24.08% and a Positive-Negative Ratio (PNR) improvement of 3.71 over the previous production model.
- Online Impact: In live A/B testing, the model improved the Good vs. Same vs. Bad (GSB) metric by +5.13%, indicating that users were presented with significantly better-organized and more useful results.
Conclusion and Future Directions
This work represents the first major application of GNNs to learn webpage quality directly from DOM structures in an end-to-end fashion. By treating layout as a universal language, the model successfully identifies "good" design across diverse web categories.
Future research will explore the trade-offs between GNN depth and computational cost, the use of heterogeneous architectures to better distinguish between different web element types (e.g., <video> vs. <div>), and self-supervised contrastive pre-training to reduce the reliance on manually labeled data.
Summary updated