Homepage2Vec: Language-Agnostic Website Embedding and Classification

Sylvain Lugeon, Tiziano Piccardi, Robert West

Introduction

The modern web is a diverse, multilingual ecosystem, yet tools for website classification remain predominantly English-centric. With approximately 40% of web content existing in languages other than English, there is a critical need for robust, language-agnostic categorization methods. Traditional approaches often treat websites as simple text documents, ignoring the rich visual and structural metadata that define a site's identity. Researchers from EPFL have addressed this gap with Homepage2Vec, a model designed to embed and classify websites into a 100-dimensional vector space using only their homepages.

Methodology

Homepage2Vec employs a multi-modal neural network architecture that processes a website's homepage through four distinct feature categories: textual content, visual features, metadata, and domain information.

Overview of multi-modal features extracted from a website homepage, including textual, visual, and metadata components.
  1. Textual Content: The model utilizes XLM-R, a cross-lingual transformer, to encode the first 100 sentences of a page into a language-independent vector.
  2. Visual Features: A screenshot of the homepage is processed through a ResNet-18 model to capture the visual "look and feel," which often transcends language barriers.
  3. Metadata & Tags: This includes Top-Level Domains (TLDs), meta-tags (keywords, descriptions), and outgoing link text.
  4. Domain Name: The URL itself is tokenized and embedded using XLM-R.

These features are concatenated into a 5,169-dimensional input vector. The architecture consists of a neural network with two hidden layers. Crucially, the final hidden layer (100 units) produces the website embedding, while the output layer provides classification probabilities across 14 categories.

The Homepage2Vec neural network architecture, illustrating the flow from high-dimensional input to the 100-dimensional embedding and final classification.

Dataset and Evaluation

The model was trained and validated using Curlie, a massive human-edited web directory. The researchers curated a dataset of 886,000 unique URLs across 92 languages. To ensure the model's alignment with human intuition, a subset of websites was re-labeled via Amazon Mechanical Turk. This evaluation revealed that Homepage2Vec often identifies relevant secondary categories that human curators—who typically select only one primary label—might overlook.

Key Results

Homepage2Vec demonstrates high performance and remarkable stability across diverse linguistic contexts:

  • Accuracy: The model achieved a macro-averaged F1-score of 0.90 and an AUC/ROC of 0.963.
  • Language Independence: Performance remained consistent across both high-resource and low-resource languages, validated by the model's ability to leverage visual and metadata cues when textual data is limited.
  • Embedding Utility: t-SNE visualizations of the 100-dimensional embeddings showed distinct clustering by industry and topic, suggesting high utility for downstream tasks such as recommendation systems and competitive analysis.

Conclusion and Future Work

Homepage2Vec provides a scalable, open-source solution for global web analysis. By moving beyond text-only classification, it captures the multi-faceted nature of websites. Future research may explore deeper structural features (DOM trees), stylistic visual nuances (e.g., color palettes for specific demographics), and the challenges posed by highly dynamic web applications. The model and its associated Python library are available for the research community on GitHub.

Summary updated

BibTeX
@inproceedings{lugeon2022homepage,
  author = {Sylvain Lugeon and Tiziano Piccardi and Robert West},
  title = {{Homepage2Vec: Language-Agnostic Website Embedding and Classification}},
  booktitle = {ICWSM},
  year = {2022},
}
Figure