Logic Distillation: Learning from Code Function by Function for Decision-Making Tasks

Abstract

Large language models (LLMs) have garnered increasing attention owing to their powerful comprehension and generation capabilities. Generally, larger LLMs (L-LLMs) that require paid interfaces exhibit significantly superior performance compared to smaller LLMs (S-LLMs) that can be deployed on a variety of devices. Knowledge distillation (KD) aims to empower S-LLMs with the capabilities of L-LLMs, while S-LLMs merely mimic the outputs of L-LLMs, failing to get the powerful decision-making capability for new situations. Consequently, S-LLMs are helpless when it comes to continuous decision-making tasks that require logical reasoning. To tackle the identified challenges, we propose a novel framework called Logic Distillation (LD). Initially, LD employs L-LLMs to instantiate complex instructions into discrete functions and illustrates their usage to establish a function base. Subsequently, LD fine-tunes S-LLMs based on the function base to learn the logic employed by L-LLMs in decision-making. During testing, S-LLMs will yield decision-making outcomes, function by function, based on current states. Experiments demonstrate that with the assistance of LD, S-LLMs can achieve outstanding results in continuous decision-making tasks, comparable to, or even surpassing, those of L-LLMs. The code and data for the proposed method are provided for research purposes https://github.com/Anfeather/Logic-Distillation.

Cite

Text

Chen et al. "Logic Distillation: Learning from Code Function by Function for Decision-Making Tasks." International Joint Conference on Artificial Intelligence, 2025. doi:10.24963/IJCAI.2025/816

Markdown

[Chen et al. "Logic Distillation: Learning from Code Function by Function for Decision-Making Tasks." International Joint Conference on Artificial Intelligence, 2025.](https://mlanthology.org/ijcai/2025/chen2025ijcai-logic/) doi:10.24963/IJCAI.2025/816

BibTeX

@inproceedings{chen2025ijcai-logic,
  title     = {{Logic Distillation: Learning from Code Function by Function for Decision-Making Tasks}},
  author    = {Chen, Dong and Zhang, Shilin and Gao, Fei and Zhuang, Yueting and Tang, Siliang and Liu, Qidong and Xu, Mingliang},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year      = {2025},
  pages     = {7338-7346},
  doi       = {10.24963/IJCAI.2025/816},
  url       = {https://mlanthology.org/ijcai/2025/chen2025ijcai-logic/}
}