WhoBuilt

Building security around ML

Feb 8, 2025· 25 min· 481 views·Watch on YouTube

Speaker

AI Engineer channel guest Dr. Andrew Davis, chief data scientist at HiddenLayer, discusses securing machine learning systems.

Data poisoning and provenance

Davis describes how expired ImageNet URLs can point to different images than those originally collected, making dataset contents vulnerable to change. He recommends verifying checksums and provenance, treating public and user submitted data skeptically, and applying the same care to material pulled into RAG systems.

Model theft and adversarial examples

An attacker can query a deployed model, collect input and prediction pairs, and train a surrogate model; soft targets such as logits can make that easier. Davis recommends logging request patterns, investigating unusually high usage, and returning only the information users need. He also says defenses against adversarial examples remain limited, and that practical threats vary across images, tabular data, and LLM prompts.

Prompt injection in multimodal systems

Davis explains that prompt injections exploit models trained to follow instructions, and describes Spotlighting, which marks Base64 encoded content as data rather than instructions. He notes that defenses can be bypassed and that multimodal injections are harder to detect because image pixels can be altered in many ways. He recommends considering worst case misuse and keeping application activity observable.

Model supply chain and software vulnerabilities

Davis warns that model files can execute code through framework features such as Keras Lambda functions, and says public repositories may contain unexpected uploads. He recommends checking model provenance and download counts, scanning files, and isolating uncertain models. For software vulnerabilities, he advises tracking issues in ML tools, patching images, and scanning deployments.

Takeaways

  • Verify dataset provenance and checksums before training, and scrutinize data supplied by users or public sources.
  • Log model API activity and investigate request volumes that depart sharply from normal patterns.
  • Return only the prediction detail a product needs, since richer outputs can help users reproduce a model.
  • Plan for prompt injection through both text and images when designing LLM applications.
  • Check downloaded model origins, scan suspicious files, and keep ML software patched.

Mentioned in this talk

Search inside this talk

What was claimed 5

  • works at
    Chief Data Scientist
    “I’m the chief data scientist at a company called HiddenLayer.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • feature
    HiddenLayer: Monitors requester and API transaction patterns to detect adversarial attacks and model theft
    “We look at the requester or API level of transactions coming into your model”
    YouTube
    Unverified1 source· Talk
  • metric
    Llama 7B: LLaMA 7B was fine-tuned using about 52,000 demonstrations generated for roughly $600 in OpenAI queries
    “For $600 worth of queries, they were able to significantly improve LLaMA 7B's benchmark numbers”
    YouTube
    Unverified1 source· Talk
  • feature
    Spotlighting: Encodes untrusted input and instructs the LLM to treat the payload as data rather than instructions
    “it should never follow instructions in the Base64-encoded payload”
    YouTube
    Unverified1 source· Talk
  • metric
    Ollama: A CVE was published two or three days before the talk
    “a CVE that was published just two or three days ago for Ollama”
    YouTube
    Unverified1 source· Talk

Related talks