We introduce a state-of-the-art approach for URL categorization that leverages the power of Large Language Models (LLMs) to address the primary objectives of web content filtering: safeguarding organizations from legal and ethical risks, limiting access to high-risk or suspicious websites, and fostering a secure and professional work environment. Our method utilizes LLMs to generate accurate classifications and then employs established knowledge distillation techniques to create smaller, more specialized student models tailored for web content filtering. Distillation results in a student model with a 9% accuracy rate improvement in classifying websites, sourced from customer telemetry data collected by a large security vendor, into 30 distinct content categories based on their URLs, surpassing the current state-of-the-art approach. Our student model matches the performance of the teacher LLM with 175 times less parameters, allowing the model to be used for in-line scanning of large volumes of URLs, and requires 3 orders of magnitude less manually labeled training data than the current state-of-the-art approach. Depending on the specific use case, the output generated by our approach can either be directly returned or employed as a pre-filter for more resource-intensive operations involving website images or HTML.
翻译:我们提出了一种先进的URL分类方法,该方法利用大型语言模型(LLMs)的能力来应对网页内容过滤的主要目标:保护组织免受法律和道德风险、限制对高风险或可疑网站的访问,以及营造安全专业的工作环境。我们的方法利用LLMs生成准确分类,然后采用既定知识蒸馏技术创建更小、更专业化的学生模型,专门用于网页内容过滤。蒸馏后的学生模型在将来自大型安全供应商收集的客户遥测数据的网站(基于其URL)分类为30个不同内容类别时,准确率提升了9%,超越了目前最先进的方法。学生模型以教师LLM参数量的1/175倍实现了与之匹配的性能,从而可用于海量URL的在线扫描,且所需人工标注训练数据量比现有最先进方法少三个数量级。根据具体用例,我们方法生成的输出可直接返回,也可作为预过滤器用于涉及网站图像或HTML等资源密集型操作。