arXiv:2611.07853cs.CRNov 2026

Manuscript Offprint

arXiv:2611.07853

CANMentor: A Large-Small Model Collaboration Framework for CAN Bus Intrusion Detection

Zhiquan Liu, Haolin Gao, Bo Wu, Jingjing Guo, Heng Sun, Jianfeng Ma

Zhiquan Liu, Haolin Gao, Bo Wu, Jingjing Guo, Heng Sun, Jianfeng Ma

Abstract—The Controller Area Network (CAN) bus lacks built-in security mechanisms, making real-time intrusion detection necessary. However, resource and latency constraints limit vehicle-side intrusion detection systems (IDSs) to lightweight models, whose detection performance and generalization can degrade under non-independent and identically distributed (non-IID) data. Meanwhile, uploading original CAN messages to the cloud for more powerful model inference risks exposing sensitive vehicle information. We propose CANMentor, a large-small model collaboration framework in which a cloud-side large language model (LLM) teacher supervises vehicle-side lightweight IDS models for CAN bus intrusion detection. Each vehicle first performs local inference, and a privacy-aware generator then produces proxies from the original CAN messages for cloud-side teacher inference to protect data privacy. The vehicle uses the teacher prediction only when the response arrives within a prescribed latency bound and otherwise retains the local prediction; all returned teacher logits are converted into soft targets for periodic knowledge distillation. On non-IID partitions of the ROAD dataset and the HCRL Car-Hacking dataset, knowledge distillation yields maximum relative Macro F1 improvements of 25.01% and 20.79%, respectively. Teacher predictions also improve detection accuracy for CAN messages near the local decision boundary by 38.71–42.00 percentage points.

Index Terms—Controller Area Network (CAN), intrusion detection systems (IDSs), non-IID, knowledge distillation, vehicular cybersecurity.

I. INTRODUCTION

MODERN vehicles rely on electronic control units (ECUs) connected by in-vehicle networks (IVNs) to perform safety-critical functions. The Controller Area Network (CAN) bus remains widely used in the Internet of Vehicles (IoV) because of its low cost, reliability, and real-time performance [1]. CAN does not authenticate the sender of a message. A malicious node can therefore inject forged CAN messages that receiving ECUs may act on, or flood the bus and disrupt the transmission of legitimate CAN messages [2]–[4]. Detecting these intrusions on the vehicle is important because the affected functions must respond in real time.

Prior research has improved what vehicle-side intrusion detection systems (IDSs) can recognize. Learned detectors

capture patterns across CAN messages [5]–[8], while message, signal, voltage, and time-frequency features provide complementary evidence of an intrusion [9]–[14]. Federated training, transfer learning, and cloud–vehicle collaboration draw on knowledge beyond a single vehicle [15]–[19]. Language models have also been adapted to detect anomalies and classify attacks in CAN sequences [20]–[22].

The difficulty arises when a vehicle encounters an attack that was rare in its own training data. Attack exposure differs across vehicles, so a lightweight IDS trained on data that are not independent and identically distributed (non-IID) can develop detection blind spots for underrepresented attack classes. A more capable cloud model could help with such decisions, but sending the original CAN messages would expose vehicle data, and waiting for a cloud response could delay the decision. The challenge is to obtain useful supervision for the current input while keeping the original CAN messages local, and to use that supervision to improve subsequent decisions on the vehicle.

We propose CANMentor, a large-small model collaboration framework for CAN bus intrusion detection, in which a cloud-side large language model (LLM) serves as a teacher for lightweight vehicle-side IDS models (Fig. 1). Each vehicle first makes a local prediction. For selected inputs, it generates a proxy sample that preserves information useful for classification and sends the proxy, not the original CAN messages, to the teacher. The vehicle uses the teacher prediction if the response arrives within the prescribed latency bound; otherwise, it retains the local prediction. All returned teacher logits are converted into soft targets for periodic knowledge distillation of the vehicle-side IDS model.

The main contributions of this paper are summarized as follows.

  1. We propose CANMentor, a large-small model collaboration framework for CAN bus intrusion detection that combines immediate vehicle-side inference with cloud-side teacher predictions and periodic knowledge distillation from teacher soft targets.

  2. We design a privacy-aware proxy generation mechanism that supports effective knowledge distillation and accurate cloud-side detection while reducing the risk of data leakage. The maximum reconstruction advantage over the no-proxy prior is 4.22% on ROAD at d = 0.40 and 5.47% on HCRL Car-Hacking at d = 0.35.

  3. We evaluate CANMentor with three cloud-side LLM teachers on non-IID partitions of the ROAD dataset and the HCRL Car-Hacking dataset. Knowledge distillation yields maximum relative Macro F1 improvements of 25.01% and 20.79% on the two datasets, respectively.

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.

This work was supported in part by the National Natural Science Foundation of China under Grant 62272195.

Zhiquan Liu, Haolin Gao, and Bo Wu are with the College of Cyber Security, Jinan University, Guangzhou 510632, China (e-mail: zqliu@vip.qq.com; esiokg123gao@gmail.com; rdgalaxy520@gmail.com).

Jingjing Guo and Jianfeng Ma are with the School of Cyber Engineering, Xidian University, Xi'an 710071, China (e-mail: jjguo@xidian.edu.cn; jfma@mail.xidian.edu.cn).

Heng Sun is with the College of Information Science and Technology, Jinan University, Guangzhou 510632, China (e-mail: tsunheng@jnu.edu.cn).

Figure

Fig. 1. Overall framework of CANMentor. The numbered flows denote: 1) upload of proxy samples generated from selected CAN messages; 2) return of teacher logits and result selection; and 3) vehicle-side knowledge distillation and lightweight IDS model update. The local prediction is retained when the teacher response time exceeds the latency bound, while all returned logits are used for distillation.

Teacher predictions on proxy samples corresponding to low-confidence inputs outperform the local predictions by 38.71–42.00 percentage points.

References (42)