# Federated Learning for Secure In-Vehicle Communication
## 4 Experimental Setup
### Dataset  
The In-Vehicle Network Intrusion Detection Dataset (INV_IDC) [44] was established for the 2019 Information Security Research and Development Data Challenge, capturing CAN traffic information from three different vehicle models: KIA Soul, Chevrolet Spark, and Hyundai Sonata. It comprises four categories of CAN message features: CAN ID, DLC, DATA Payload, and Timestamps. It contains both normal CAN messages and three types of attacks. These attack simulations replicate genuine threats to vehicle cybersecurity. The dataset simulates three types of attack each distinguished by distinct patterns in the features of CAN bus traffic. Through examination of these features, IDS can proficiently recognize anomalies in standard traffic behaviors and differentiate between harmless and  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Category** & **Parameter** & **Value/Description** \\ \hline \multirow{6}{*}{General Setup} & Number of Clients & 3 clients (each using a separate dataset) \\  & Server Rounds & 40 \\  & Fraction of Clients per Round & 1.0 (fit), 0.5 (evaluate) \\  & Local Epochs per Round & [1, 5] \\  & Batch Size & 64 \\ \hline \multirow{6}{*}{Model Architecture} & Input Shape & (11, 1) \\  & Layer 1 & Bidirectional LSTM with 64 units, return\_sequences = True \\  & Layer 2 & Bidirectional LSTM with 64 units \\  & Dropout Layer & Dropout rate = 0.5 \\ \cline{1-1}  & Dense Layer & Dense layer with 128 units, ReLU activation \\ \cline{1-1}  & Output Layer & Dense layer with 4 units, Softmax activation \\ \cline{1-1}  & Loss Function & Categorical Crossentropy \\ \cline{1-1}  & Optimizer & Adam (learning rate = 0.001) \\ \cline{1-1}  & Metrics & Accuracy \\ \hline \hline \end{tabular}
\end{table}
Table 2: Complete Simulation Parameters and Settings.  
**Fuzzy Attack**: A fuzzy attack injects randomly generated CAN messages into the bus, affecting both ID and Data fields. These messages may include valid CAN IDs extracted from the vehicle or fabricated ones. Since the injected messages do not have meaningful data, they are either processed incorrectly by ECUs or discarded, leading to unpredictable system behavior.  
**Malfunction Attack**: This attack targets a specific CAN ID, manipulating its data field while injecting randomly selected CAN IDs. By modifying the 8-byte data values (e.g., replacing them with 00 or random values), the vehicle reacts abnormally. The manipulated messages reach the targeted ECU but contain incorrect information, causing the system to execute faulty operations or ignore valid commands.  
This analysis provides insights into the nature of these attacks and their effect on the data, which is critical for developing effective intrusion detection strategies. We chose this dataset to simulate a real-world scenario where each vehicle represents an individual client, and its data remains private to that client. Specifically, we assume that each client operates independently with its own local data. To achieve this, we assigned each vehicle in the dataset to a separate client; Hyundai: Client 1, Chevrolet: Client 2, and Kia: Client 3. This setup allows us to closely model FL core principle of decentralized training on real-world data while preserving data privacy for each vehicle.