--- library_name: transformers tags: - Website Classification license: mit datasets: - Shahriar/websector-corpus language: - en base_model: FacebookAI/roberta-base pipeline_tag: text-classification --- # WebSector-Flexible Model Card ## Model Overview The WebSector-Flexible model is a transformer-based multi-sector website classification model, fine-tuned using the RoBERTa architecture with LoRA and trained on the WebSector dataset, consisting of 109,476 websites in the training set. The flexible mode is designed to maximize recall by identifying both primary and secondary sectors of websites, making it suitable for applications that require broad coverage across multiple sectors. This mode is ideal for exploratory tasks or when it's critical to capture all possible sector associations. ## Model Details - **Model type**: Transformer-based (RoBERTa + LoRA) - **Training dataset**: WebSector Corpus (Training set: 109,476 websites) - **Prediction modes**: Flexible mode - **Task**: Multi-sector website classification - **Architecture**: RoBERTa transformer fine-tuned with LexRank summarization for handling lengthy content - **Special Technique**: Single Positive Label (SPL) paradigm for multi-label classification with WAN loss ## Intended Uses & Limitations ### Use Cases - **Website categorization**: Classifies websites into multiple sectors for general exploration or broader categorization tasks. - **Research**: Suitable for research on multi-sector classification or multi-label classification tasks where label dependencies are important. - **Content Management**: Can be used in platforms where it's important to categorize content across multiple industries or sectors. ### Limitations - **Single Positive Label**: Trained with only the primary sector observable, potentially limiting its accuracy in predicting secondary sectors. - **Flexible mode**: Focuses on recall, which may lead to over-predicting some sectors in websites with ambiguous content. - **Data Imbalance**: Some sectors are underrepresented in the dataset, which may affect model performance on certain sectors. ## Dataset - **Dataset name**: WebSector Corpus - **Training set size**: 109,476 websites - **Sectors**: 1. Finance, Marketing & HR 2. Information Technology & Electronics 3. Consumer & Supply Chain 4. Civil, Mechanical & Electrical 5. Medical 6. Sports, Media & Entertainment 7. Education 8. Government, Defense & Legal 9. Travel, Food & Hospitality 10. Non-Profit - **Labeling**: Each website is labeled with its primary sector, derived from self-declared industry categories. ## Evaluation Metrics - **Top-1 Recall**: Measures the model's ability to correctly identify the primary sector as the most likely predicted sector. - **Top-3 Recall**: Evaluates the model's capacity to have the true sector within the top three predicted labels. - **Recall**: Assesses the model's ability to predict all relevant sectors, not just the primary one. The flexible mode maximizes recall, making it ideal for capturing as many relevant sectors as possible, though it may compromise precision. ## Training Process ### Hyperparameters: - Number of epochs: 7 - Batch size: 8 - Learning rate: 5×10^-6 - Weight decay: 0.1 - LoRA rank: 128 - LoRA alpha: 512 - Dropout rate: 0.1 ### Training Setup: - **Hardware**: Four GPUs, including two NVIDIA RTX A5000 and two NVIDIA TITAN RTX units for parallel processing. - **Software**: PyTorch framework and Hugging Face Transformers library. - **Strategy**: Distributed training across four GPUs, with model selection based on the lowest validation loss. ## Model Performance - Top-1 Recall: 68% - Top-3 Recall: 85% - Recall: 86% - Precision: 68% These metrics show that the flexible mode of the WebSector model is optimized for recall, allowing it to capture multiple relevant sectors while maintaining a solid precision score. ## Ethical Considerations - **Privacy Enforcement**: This model can assist in classifying websites into sectors relevant to privacy regulations like CCPA or HIPAA. - **Bias**: As the model was trained on self-declared sector labels, there is potential for bias due to inaccurate or incomplete labeling. ## Citation If you use this model in your research, please cite the following paper: ``` Shahriar Shayesteh, Mukund Srinath, Lee Matheson, Florian Schaub, C. Lee Giles, and Shomir Wilson. "WebSector: A New Insight into Multi-Sector Website Classification Using Single Positive Labels". Conference acronym 'XX, June 03–05, 2018, Woodstock, NY. ```