
Web query classification is a crucial process in understanding user intent behind search queries. It helps web search engines provide more accurate and relevant results.
There are several techniques used for web query classification, including supervised learning, unsupervised learning, and deep learning. Supervised learning, for instance, involves training a model on labeled data to learn patterns and relationships.
Web query classification has numerous applications, such as improving search engine results, enhancing user experience, and increasing website engagement. It can also be used to identify spam or malicious queries.
One of the key challenges in web query classification is dealing with noisy or ambiguous data, which can lead to inaccurate results.
Readers also liked: Can Nextjs Be Used on Traditional Web Application
Methodology
Query clustering method tries to associate related queries by clustering "session data", which contain multiple queries and click-through information from a single user interaction.
Using a query clustering approach is effective because it takes into account terms from result documents that a set of queries has in common.
You might like: Azure Boards Queries
To mine association rules between query terms, the selectional preference based method exploits some association rules between the query terms to help with query classification.
These rules are mined from unlabeled query log data and used to validate the effectiveness of the approach on some labeled queries.
The use of query keywords together with session data is shown to be the most effective method of performing query clustering.
A unique perspective: Santee Cooper Lake Data
Problem Definition
The problem definition is a crucial step in understanding the hierarchical query classification problem. We have a set of queries Q={q1,q2,…,qN} where each query is a sequence of words.
For simplicity, we assume a two-level category hierarchy, but the proposed method can be extended to accommodate a multi-level category hierarchy. A query is represented as qi=x1,x2,…,xi,… where xis is the i-th word in a query.
We can divide the query set Q into two groups: unlabeled queries QU and labeled queries QL. Each labeled query has its child category ck and parent category pj. The parent category pj consists of a set of child categories, and ck is one of those child categories.
The goal is to learn a function ℱ(qi)→ck,pj that leverages information from both labeled and unlabeled queries. This function takes a query qi and outputs its child category ck and parent category pj.
Semi-supervised Text Classification
Semi-supervised Text Classification is a promising research direction that utilizes both labeled and unlabeled data points in machine learning, alleviating the high cost of data annotation. This approach has been widely used in various applications.
Self-training is a commonly used semi-supervised learning technique where a model is initially trained on a limited set of labeled data points, and then iteratively expands the training datasets by using classified unlabeled data points. This process can be repeated multiple times to improve the model's accuracy.
Different selection methods have been developed to choose which data points for augmentation, including probability-based and uncertainty-based solutions. These methods help to identify the most informative unlabeled data points that can be used to improve the model's performance.
A probability-based solution involves selecting data points with high confidence scores, while an uncertainty-based solution selects data points with low confidence scores. Both approaches have been shown to be effective in improving the model's performance.
Here's an interesting read: Social Data Analysis
The use of unlabeled query logs can also be beneficial in semi-supervised text classification. These logs contain a vast amount of data that can be used to train a model, and they are often readily available. By leveraging this data, researchers can develop more accurate models that can handle a wide range of text classification tasks.
Here are some examples of semi-supervised text classification techniques:
- Self-training
- Probability-based selection
- Uncertainty-based selection
These techniques have been shown to be effective in various applications, including query classification and text classification. By leveraging both labeled and unlabeled data points, researchers can develop more accurate models that can handle a wide range of text classification tasks.
Broaden your view: Why Is Classification Important
Hyperparameter Tuning
The best value for the intra-class hierarchy parameter is 0.9, indicating that the intra-class hierarchy contributes more than the inter-class hierarchy.
In this parameter, higher values generally lead to better performance, except for a value of 1, which suggests that the intra-class hierarchy is more important than the inter-class hierarchy.
The best value for the contrastive loss parameter is 0.1, which helps improve classification performance when added to the classification loss.
A large weight for the contrastive loss parameter can actually harm performance, so it's essential to find the right balance.
The best value for the child category information parameter is 0.3, indicating that utilizing both child and parent category information in the sampling stage requires careful choice and tuning of the weight.
Here's a summary of the best values for each parameter:
Data and Evaluation
We used two benchmark datasets for hierarchical text classification: Web-of-Science and RCV1-V2. These datasets are widely used in related research and provide a good starting point for evaluating our approach.
The Web-of-Science dataset contains keywords and abstracts of academic papers across several disciplines, with a hierarchical domain-area label representing the hierarchical nature of the discipline. This makes it suitable for hierarchical query classification tasks.
The RCV1-V2 dataset is a benchmark corpus for text categorization research with over 800,000 manually categorized newswire stories from Reuters Ltd. Its hierarchical categorization scheme includes four main topics, which are further divided into subtopics, leading to over 100 leaf-level categories.
We adopted standard imbalanced data classification metrics, specifically the Micro and Macro F1 score, as used in existing related works.
You might enjoy: Which Web Browser Is Most Used Worldwide
Public Datasets
We've adopted two benchmark datasets for hierarchical text classification, which are widely used in the field: Web-of-Science and RCV1-V2. These datasets provide a great starting point for our evaluation.
The Web-of-Science dataset contains keywords and abstracts of academic papers across various disciplines, such as economy and science. It's a great fit for hierarchical query classification tasks.
The RCV1-V2 dataset, on the other hand, is a benchmark corpus for text categorization research with over 800,000 manually categorized newswire stories from Reuters Ltd. It's an excellent dataset for hierarchical classification tasks.
Here's a breakdown of the public datasets we're using:
- Web of Science (WoS)
- RCV1-V2
Here are the data statistics for each dataset:
These datasets offer a great foundation for our evaluation, allowing us to compare the performance of different models on hierarchical text classification tasks.
Proprietary Dataset
Our proprietary dataset is based on Amazon search queries, which we sampled to create a dataset of 9~10 million user queries. This dataset is a great representation of real-world application settings.
A significant portion of the dataset consists of unlabeled queries, making up 40% to 50% of the total.
Labeled non-sensitive queries represent a substantial segment, comprising 45% to 58% of the data.
Queries related to adult-oriented products form a notable portion, ranging from 3% to 6% of the labeled sensitive categories.
Adult content is relatively rare, constituting only 0.3% to 0.5% of the dataset.
A small fraction of queries are potentially harmful, with those related to self-harm and harm to others present in 0.003% to 0.005% and 0.01% to 0.03%, respectively.
The remaining sensitive queries make up a small percentage, counting for 0.04% to 0.07% of the total.
Recommended read: Adult Webcam Models Seo
Experimental Evaluation
Experimental Evaluation is a crucial step in any research project, and it's where we put our proposed framework to the test. We conducted extensive experiments to answer three key research questions.
Our first research question (RQ1) aimed to determine how effective our proposed method is compared to other methods. To do this, we evaluated its performance against existing approaches.
We used two evaluation metrics: Micro and Macro F1 score, which are standard measures for imbalanced data classification tasks, as seen in related works. Specifically, we followed the measurement used by Wang et al. (2022a, b).
Our second research question (RQ2) focused on understanding the contribution of each component in our proposed framework. We examined how each part of the framework impacts the overall performance.
Lastly, our third research question (RQ3) investigated how sensitive the model performance is when we change the parameters. This helped us understand the robustness of our framework.
Approaches and Techniques
Class imbalance is a common issue in text classification, especially in the hierarchical setting. This can lead to biased models that favor the majority class.
To address class imbalance, researchers often use re-sampling techniques such as oversampling the minority class, undersampling the majority class, or combining both to achieve a balanced class distribution.
The Synthetic Minority Over-sampling Technique is another notable approach that generates synthetic instances of the minority class to balance the class distribution. This technique has been used in various studies to improve classifier performance.
In contrast, the proposed method utilizes unlabeled queries predicted as minority classes to augment datasets. This approach takes advantage of unlabeled data to improve model performance.
Cost-sensitive learning is another strategy that involves assigning higher costs to the misclassification of minority classes during model training. This makes the model more sensitive to the minority class and can lead to better performance.
The proposed method also employs a neighborhood-aware sampling technique to selectively choose high-quality unlabeled data points with pseudo labels to augment existing labeled data for model re-training. This technique helps to improve model performance by incorporating more data into the training process.
Take a look at this: RAM Mobile Data
Adaptation and Improvement
Adapting to changes in queries and categories over time is crucial for effective web query classification. The meanings of queries can evolve rapidly, making old labeled training queries useless soon.
For instance, the term "Barcelona" had a different meaning before 2007, referring to a city or football club, but now it refers to a new micro-processor of AMD. This highlights the importance of having a classifier that can adapt to changing query distributions over time.
Using an intermediate taxonomy, such as the Open Directory Project (ODP), can help build a bridging classifier that is adaptive for each new set of target categories and incoming queries. This approach only needs to be trained once, making it a cost-effective solution.
A unique perspective: Webrtc Web Real Time Communication
Adapting to Query and Category Changes Over Time

Adapting to query and category changes over time is crucial for maintaining a relevant and accurate classification system. The meanings of queries can evolve over time, making old labeled training queries useless soon.
The word "Barcelona" is a great example of this, as it now refers to a new micro-processor of AMD, whereas previously it referred to a city or football club before 2007.
To make a classifier adaptive over time, an intermediate taxonomy based method can be used, which first builds a bridging classifier on an intermediate taxonomy like Open Directory Project (ODP). This bridging classifier can then be used to map user queries to target categories via the intermediate taxonomy.
The advantage of this approach is that the bridging classifier needs to be trained only once and is adaptive for each new set of target categories and incoming queries.
Take a look at this: Dwell Time (information Retrieval)
Learning to Classify Inappropriate Completions
Learning to Classify Inappropriate Completions is a crucial task in various fields, including Biological Taxonomy, Categorization, Data Mining and Knowledge Discovery, and Library Science. These fields often require classifying query-completions to ensure accuracy and relevance.
Semi-supervised learning is a promising approach to tackle this task, as it utilizes both labeled and unlabeled data points. This method alleviates the high cost of data annotation, making it a more feasible solution.
Self-training is a widely used semi-supervised learning technique that involves initially training a model on a limited set of labeled data points, and then iteratively expanding the training datasets by using classified unlabeled data points. This process allows the model to learn from both labeled and unlabeled data.
Different selection methods are developed to choose which data points for augmentation, including probability-based and uncertainty-based solutions. These methods help determine which data points are most likely to be incorrect or uncertain, and can be used to improve the model's performance.
Here are some examples of fields that benefit from classifying query-completions:
- Biological Taxonomy
- Categorization
- Data Mining and Knowledge Discovery
- Library Science
Applications and Effectiveness
Web query classification has numerous applications that make our online experience more efficient and relevant. Metasearch engines, for example, send a user's query to multiple search engines and blend the top results from each into one overall list, making it easier for users to navigate the web.
You might like: Timeline of Web Search Engines
Metasearch engines can also organize the large number of web pages in the search results according to the potential categories of the issued query, providing users with a more organized and convenient search experience. This is especially useful when searching for specific information that falls under a particular category.
Vertical search, on the other hand, focuses on specific domains and addresses the particular information needs of niche audiences and professions. By predicting the category of information a user is looking for, a search engine can select a certain vertical search engine automatically, without forcing the user to access it explicitly.
Here are some ways that web query classification is used in real-world applications:
- Metasearch engines
- Vertical search
- Online advertising
These services rely on understanding web users' search intents through their web queries, which is made possible by information retrieval techniques and internet search.
Applications
Metasearch engines are a great example of how search engines can be applied in practice. They send a user's query to multiple search engines and blend the top results from each into one overall list.

This makes it easier for users to navigate through the large number of Web pages in the search results, organized according to the potential categories of the issued query.
Vertical search, on the other hand, focuses on specific domains and addresses the particular information needs of niche audiences and professions. It can predict the category of information a Web user is looking for and select a certain vertical search engine automatically.
Online advertising can also provide interesting advertisements to Web users during their search activities. The search engine can provide relevant advertising to Web users according to their interests, saving them time and effort in research while reducing the advertisers' costs.
Here are some examples of how search engines can be applied:
- Metasearch engines
- Vertical search
- Online advertising
These services all rely on the understanding of Web users' search intents through their Web queries. Information retrieval techniques and internet search are used to achieve this understanding.
Effectiveness of the Proposed Framework

Our proposed framework has been extensively tested and its effectiveness has been proven in various datasets. It outperforms the baseline fine-tuned BERT in most cases, with the largest margin on the Amazon dataset.
The comparison results in Table 2 show that our proposed method beats the advanced HPT and HGCLR solutions, indicating the necessity of designing sophisticated approaches for performance gain. This is achieved through our instance hierarchy, label hierarchy, and neighborhood-aware sampling technique.
On the Amazon dataset, our proposed method achieves a Micro-F1 score of +3.26, which is the highest among all the methods compared. This demonstrates the efficacy of our proposed method, especially on this dataset.
Our neighborhood-based sampling technique also contributes to the performance gain by selecting high-quality data points for self-training. This is particularly important in real-world applications, such as sensitive query classification on Amazon, where critical categories have fewer data points.
Here's a summary of the comparison results on the Amazon dataset:
Even though we are weaker than HiTIN regarding Micro-F1 on Web of Science and RCV1-V2, we are better in Macro-F1, which is more crucial in real-world applications. This is because Macro-F1 treats each category equally, rather than each data point equally, during evaluation.
Experimental Setup
To conduct our experimental evaluation, we set up a comprehensive experimental setup. We aimed to answer three research questions, including how effective our proposed method is when compared to other methods.
We conducted extensive experiments to examine the performance of our proposed framework. Specifically, we aimed to answer RQ1, which investigates the effectiveness of our proposed method.
Our experimental setup included a thorough evaluation of the proposed framework's components. We sought to determine the contribution of each component in the proposed framework, as outlined in RQ2.
To assess the sensitivity of the model performance, we changed the parameters and observed the impact on the results. This aligns with RQ3, which investigates the sensitivity of the model performance when parameters are changed.
We evaluated the performance of our proposed method against other methods, as outlined in RQ1. Our experiments aimed to provide a comprehensive understanding of the proposed framework's strengths and weaknesses.
The experimental setup involved a detailed analysis of the proposed framework's components and their individual contributions. This is in line with RQ2's objective of identifying the contribution of each component.
Here's a summary of the research questions we aimed to answer through our experimental evaluation:
- RQ1: How effective is our proposed method when compared to other methods?
- RQ2: What is the contribution of each component in the proposed framework?
- RQ3: How sensitive is the model performance when we change the parameters?
Challenges and Limitations
Web query classification is a complex task, and there are several challenges that hinder its progress.
One of the major difficulties is that web query topic classification is different from traditional document classification tasks.
Automatic query assignment to predefined categories is a significant challenge due to the complexities of web queries.
The task requires understanding the nuances of web queries, which can be quite different from traditional documents.
Different from traditional document classification tasks, web query classification faces unique difficulties.
Frequently Asked Questions
What is a web classification?
Web classification is the process of organizing websites into categories based on their content and structure. This helps users quickly find similar websites and makes online browsing more efficient.
What is an example of a website query?
A navigational query example is entering a website name, like "youtube", into a search engine to find the site directly. This type of query helps users quickly access specific websites without typing the URL or using bookmarks.
Featured Images: pexels.com


