PID Control-Based Self-Healing to Improve the Robustness of Large Language Models

Abstract

Despite the effectiveness of deep neural networks in numerous natural language processing applications, recent findings have exposed the vulnerability of these language models when minor perturbations are introduced. While appearing semantically indistinguishable to humans, these perturbations can significantly reduce the performance of well-trained language models, raising concerns about the reliability of deploying them in safe-critical situations. In this work, we construct a computationally efficient self-healing process to correct undesired model behavior during online inference when perturbations are applied to input data. This is formulated as a trajectory optimization problem in which the internal states of the neural network layers are automatically corrected using a PID (Proportional-Integral-Derivative) control mechanism. The P controller targets immediate state adjustments, while the I and D controllers consider past states and future dynamical trends, respectively. We leverage the geometrical properties of the training data to design effective linear PID controllers. This approach reduces the computational cost to that of using just the P controller, instead of the full PID control. Further, we introduce an analytical method for approximating the optimal control solutions, enhancing the real-time inference capabilities of this controlled system. Moreover, we conduct a theoretical error analysis of the analytic solution in a simplified setting. The proposed PID control-based self-healing is a low-cost framework that improves the robustness of pre-trained large language models, whether standard or robustly trained, against a wide range of perturbations.

Cite

Text

Chen et al. "PID Control-Based Self-Healing to Improve the Robustness of Large Language Models." Transactions on Machine Learning Research, 2024.

Markdown

[Chen et al. "PID Control-Based Self-Healing to Improve the Robustness of Large Language Models." Transactions on Machine Learning Research, 2024.](https://mlanthology.org/tmlr/2024/chen2024tmlr-pid/)

BibTeX

@article{chen2024tmlr-pid,
  title     = {{PID Control-Based Self-Healing to Improve the Robustness of Large Language Models}},
  author    = {Chen, Zhuotong and Wang, Zihu and Yang, Yifan and Li, Qianxiao and Zhang, Zheng},
  journal   = {Transactions on Machine Learning Research},
  year      = {2024},
  url       = {https://mlanthology.org/tmlr/2024/chen2024tmlr-pid/}
}