Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networks

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Weng, Yixuan, Zhu, Minjun, Xia, Fei, Li, Bin, He, Shizhu, Liu, Kang, Zhao, Jun
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911791995420672
author Weng, Yixuan
Zhu, Minjun
Xia, Fei
Li, Bin
He, Shizhu
Liu, Kang
Zhao, Jun
author_facet Weng, Yixuan
Zhu, Minjun
Xia, Fei
Li, Bin
He, Shizhu
Liu, Kang
Zhao, Jun
contents Language models' (LMs) proficiency in handling deterministic symbolic reasoning and rule-based tasks remains limited due to their dependency implicit learning on textual data. To endow LMs with genuine rule comprehension abilities, we propose "Neural Comprehension" - a framework that synergistically integrates compiled neural networks (CoNNs) into the standard transformer architecture. CoNNs are neural modules designed to explicitly encode rules through artificially generated attention weights. By incorporating CoNN modules, the Neural Comprehension framework enables LMs to accurately and robustly execute rule-intensive symbolic tasks. Extensive experiments demonstrate the superiority of our approach over existing techniques in terms of length generalization, efficiency, and interpretability for symbolic operations. Furthermore, it can be applied to LMs across different model scales, outperforming tool-calling methods in arithmetic reasoning tasks while maintaining superior inference efficiency. Our work highlights the potential of seamlessly unifying explicit rule learning via CoNNs and implicit pattern learning in LMs, paving the way for true symbolic comprehension capabilities.
format Preprint
id arxiv_https___arxiv_org_abs_2304_01665
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networks
Weng, Yixuan
Zhu, Minjun
Xia, Fei
Li, Bin
He, Shizhu
Liu, Kang
Zhao, Jun
Computation and Language
Language models' (LMs) proficiency in handling deterministic symbolic reasoning and rule-based tasks remains limited due to their dependency implicit learning on textual data. To endow LMs with genuine rule comprehension abilities, we propose "Neural Comprehension" - a framework that synergistically integrates compiled neural networks (CoNNs) into the standard transformer architecture. CoNNs are neural modules designed to explicitly encode rules through artificially generated attention weights. By incorporating CoNN modules, the Neural Comprehension framework enables LMs to accurately and robustly execute rule-intensive symbolic tasks. Extensive experiments demonstrate the superiority of our approach over existing techniques in terms of length generalization, efficiency, and interpretability for symbolic operations. Furthermore, it can be applied to LMs across different model scales, outperforming tool-calling methods in arithmetic reasoning tasks while maintaining superior inference efficiency. Our work highlights the potential of seamlessly unifying explicit rule learning via CoNNs and implicit pattern learning in LMs, paving the way for true symbolic comprehension capabilities.
title Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networks
topic Computation and Language
url https://arxiv.org/abs/2304.01665