Infusion: Shaping Model Behavior by Editing Training Data via Influence Functions

J Rosser, Robert Kirk, Edward Grefenstette, Jakob Nicolaus Foerster, Laura Ruis

TL;DR

This paper introduces INFUSION, a novel framework that subtly modifies training data to steer machine learning models towards specific, often adversarial, behaviors. By leveraging influence functions, INFUSION can achieve significant behavioral shifts with minimal data edits, even across different model architectures, highlighting a critical new attack surface in AI security.

What Problem Does This Paper Address?

The paper tackles the problem of data poisoning, a type of attack where malicious data is injected into a model's training set to manipulate its behavior. Existing attacks often rely on explicitly demonstrating the desired (or undesired) behavior, which can be detectable. The authors ask a more insidious question: can we achieve similar behavioral changes by making subtle, imperceptible modifications to existing training data, without explicitly showing the target behavior? This is challenging because identifying which data points to modify and how to modify them to achieve a specific parameter shift requires understanding the complex relationship between training data and model behavior. Naively retraining a model for every potential modification is computationally infeasible.

Methods

INFUSION's core innovation lies in its use of influence functions. These mathematical tools, typically used to understand why a model behaves a certain way (attribution), are repurposed here to engineer model behavior.

Here's the breakdown:

  1. Influence Function Estimation: INFUSION uses scalable influence function approximations (specifically, EK-FAC) to identify which training documents have the most impact on a target behavior (e.g., the probability of a specific class).
  2. Gradient-Based Perturbation: Using these influence scores, the framework computes small, gradient-guided perturbations to a selected subset of training documents. These perturbations are designed to maximize an adversarial objective, effectively nudging the model's parameters towards the desired behavior.
  3. Short-Horizon Retraining: The modified documents are then used to retrain the model for a short period (e.g., one epoch) from a late checkpoint. This "infusion" process aims to embed the targeted behavior without drastically altering the model's overall learned knowledge.

The key novelty is the reverse application of influence functions – from attribution to generation – and the use of efficient approximations to make this feasible for large datasets and models.

Datasets

The paper evaluates INFUSION on the following datasets:

  • CIFAR-10: A standard benchmark for image classification, used to test INFUSION on continuous pixel perturbations.
  • TinyStories: A dataset used to train a small language model (GPT-Neo-8M) for evaluating INFUSION's effectiveness on natural language tasks.
  • Caesar Cipher Task: A custom task designed to analyze the influence of number-theoretic properties on attack success in transformers.

Key Insights and Ideas

  • Data as a Control Knob: The most significant insight is that subtle, targeted edits to training data can systematically shape model behavior, acting as a powerful control mechanism. This moves beyond simply injecting "bad" data to actively engineering specific model responses.
  • Influence Functions for Generation: Repurposing influence functions from an attribution tool to a generative tool for data poisoning is a novel approach. It allows for more precise and efficient manipulation compared to random perturbations or explicit demonstrations.
  • Cross-Architecture Transfer: A single poisoned dataset can affect models trained with different architectures (e.g., ResNet and CNNs). This implies that a compromise at the data level can have widespread implications across various deployed models.
  • Amplifying Latent Behaviors: INFUSION is most effective when it can amplify behaviors or biases that the model has already learned to some extent, rather than trying to instill entirely new ones. This suggests that pre-existing vulnerabilities or subtle patterns in the data are prime targets.
  • Data Interpretability is Crucial: The work underscores the critical importance of understanding and interpreting training data, not just for debugging and fairness, but also for security against sophisticated attacks.

Key Results

  • High Success Rate on CIFAR-10: INFUSION achieved 100% success in increasing the target class probability across 2,000 experiments on CIFAR-10, with a poisoning budget as low as 0.2% of the training data. This significantly boosted the top-1 prediction rate from 10% to 37.4%.
  • Competitive with Direct Injection: INFUSION, using subtle perturbations, was found to be competitive with methods that directly inject explicit poison samples.
  • Cross-Architecture Transfer: The infused datasets showed transferability across different model architectures (ResNet and CNNs), indicating a single poisoned corpus could impact multiple independently trained models.
  • Language Model Challenges: While INFUSION could induce specific likelihood shifts in language models, achieving outright prediction flips was rare. This was attributed to weaker influence approximations and the discrete nature of token space. However, it was effective in amplifying latent behaviors in structured tasks like Caesar cipher encryption.
  • Low Poisoning Budgets: The attack demonstrated effectiveness with very small poisoning budgets (e.g., 0.02-0.2%), making it a practical threat.

Limitations and Future Work

  • Language Model Effectiveness: INFUSION's effectiveness is diminished on larger language models and discrete token spaces, where influence approximations are weaker and retraining effects can be washed out.
  • Retraining Duration: Longer retraining periods tend to diminish the INFUSION effect, suggesting that the perturbations are most potent when applied near model convergence.
  • Future Work: The authors suggest extending INFUSION to the full training pipeline (including fine-tuning and alignment) to create more persistent attacks. They also highlight the need for better influence function approximations and potentially larger perturbation budgets for language models. Potential defenses include anomaly detection, data provenance tracking, and regularizing influence concentration.

Summary updated

BibTeX
@inproceedings{rosser2026infusion,
  author = {J Rosser and Robert Kirk and Edward Grefenstette and Jakob Nicolaus Foerster and Laura Ruis},
  title = {{Infusion: Shaping Model Behavior by Editing Training Data via Influence Functions}},
  booktitle = {DATA-FM @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=T6R3Bzh3UB},
}
Figure