AE2608 — "Security Mechanisms for Artificial Intelligence in Agricultural Tractor Systems"
Supplementary material: reproduction scripts for the experiments in Section 5 (Figures 6–9, Table 2).

DATASET (not included here; download separately)
  Götz, K.; Kusuma, A.; Dörfler, A.; Lienkamp, M. (2025): "Agricultural Load Cycles:
  Tractor Mission Profiles from Recorded GNSS and CAN Bus Data." Data in Brief.
  Zenodo: https://doi.org/10.5281/zenodo.14619787  (CC-BY-4.0)
  This study uses the Fendt 211 recordings (scenarios: "Power harrowing", "Precision air seeding").
  The plotted speed signal is the wheel-based vehicle speed (SAE J1939 SPN 84), decoded to km/h.

CONTENTS (run in this order to reproduce)
  adslib.py            Data loading, LSTM predictor ADS, anomaly injection, black-box attack,
                       lightweight conditional self-information (CSI) detector.
  run_final.py         Main driver: trains detectors, runs baseline vs. black-box attack per
                       scenario, writes out/measured_results.json. Usage:
                           python run_final.py "<path to Fendt 211 folder>"
  make_fig_arrays.py   Extracts the arrays behind Figures 6–9 from out/measured_results.json
                       (must be run after run_final.py, from the same out/ folder). Usage:
                           python make_fig_arrays.py "<path to Fendt 211 folder>"
  make_figs.py         Renders Figures 6–9 (PNG) from the arrays produced above. Usage:
                           python make_figs.py
  measured_results.json  The measured per-scenario results reported in the paper (copy of
                       out/measured_results.json as written by run_final.py).
  Figure6–9.png        The figures as used in the manuscript.

ENVIRONMENT
  Python 3.11, numpy, pandas, scikit-learn, matplotlib, torch (CPU). Fixed random seed (42);
  results are deterministic.

SUMMARY OF MEASURED RESULTS
  LSTM-based ADS: balanced detection accuracy ~0.99 at baseline; under the black-box attack it
    falls to ~0.49 for stealthy low-magnitude speed spoofing on the precision-seeding scenario
    (up to ~50% relative decrease), while larger spoofs and the power-harrowing scenario stay
    reliably detected.
  Lightweight CSI ADS: baseline up to ~0.90 (power harrowing); under the statistics-preserving
    injection it falls to ~0.47–0.50 (up to ~45% relative decrease).
  Both effects are scenario-dependent.
