Search arXiv⌕ Search

arXiv subjects

Nishavi Ranaweera

Publications and source records attributed to Nishavi Ranaweera.

3 recordsLinked to original sources

Mining the Shadows: Distilling Dark Ranking Knowledge for OOD Detection

Out-of-distribution (OOD) detection remains a notoriously challenging problem for deep learning classifiers. Recent work has introduced an effective new class of OOD detectors, based on a simple insight: whilst OOD samples may spuriously receive high-confidence predictions for a certain target class, their ranking over non-target classes may not reflect typical semantic patterns. While such ranking-based OOD detectors have achieved impressive empirical success, they have two shortcomings: (i) empirically, such methods can degrade in-distribution test accuracy; (ii) conceptually, a precise formalism for why a class ranking signal can improve OOD detection remains elusive. In this paper, we address both of these gaps by relating ranking-based OOD detectors to a specific form of knowledge distillation (KD). We use this perspective to design a new instance-level Plackett-Luce Knowledge Distillation loss (PL-KD) that maintains the strong OOD detection performance of ranking-based detectors, while boosting the in-distribution test accuracy. On CIFAR-10, CIFAR-100, and ImageNet-200, PL-KD reduces FPR95 relative to RANKOOD in every dataset and logit-based scoring-function combination we evaluate, while improving in-distribution accuracy by up to 5.3 points. Relative to standard cross-entropy training, it approximately halves both near- and far-OOD FPR95 on CIFAR-10. Finally, we provide a formal justification for ranking-based OOD detectors, extending the classic notion of 'dark knowledge' in KD to the OOD detection setting.

cs.CV↗

BERTDetect: A Neural Topic Modelling Approach for Android Malware Detection

Web access today occurs predominantly through mobile devices, with Android representing a significant share of the mobile device market. This widespread usage makes Android a prime target for malicious attacks. Despite efforts to combat malicious attacks through tools like Google Play Protect and antivirus software, new and evolved malware continues to infiltrate Android devices. Source code analysis is effective but limited, as attackers quickly abandon old malware for new variants to evade detection. Therefore, there is a need for alternative methods that complement source code analysis. Prior research investigated clustering applications based on their descriptions and identified outliers in these clusters by API usage as malware. However, these works often used traditional techniques such as Latent Dirichlet Allocation (LDA) and k-means clustering, that do not capture the nuanced semantic structures present in app descriptions. To this end, in this paper, we propose BERTDetect, which leverages the BERTopic neural topic modelling to effectively capture the latent topics in app descriptions. The resulting topic clusters are comparatively more coherent than previous methods and represent the app functionalities well. Our results demonstrate that BERTDetect outperforms other baselines, achieving ~10% relative improvement in F1 score.

cs.CR↗

LLMs are One-Shot URL Classifiers and Explainers

Malicious URL classification represents a crucial aspect of cyber security. Although existing work comprises numerous machine learning and deep learning-based URL classification models, most suffer from generalisation and domain-adaptation issues arising from the lack of representative training datasets. Furthermore, these models fail to provide explanations for a given URL classification in natural human language. In this work, we investigate and demonstrate the use of Large Language Models (LLMs) to address this issue. Specifically, we propose an LLM-based one-shot learning framework that uses Chain-of-Thought (CoT) reasoning to predict whether a given URL is benign or phishing. We evaluate our framework using three URL datasets and five state-of-the-art LLMs and show that one-shot LLM prompting indeed provides performances close to supervised models, with GPT 4-Turbo being the best model, followed by Claude 3 Opus. We conduct a quantitative analysis of the LLM explanations and show that most of the explanations provided by LLMs align with the post-hoc explanations of the supervised classifiers, and the explanations have high readability, coherency, and informativeness.

cs.AI↗