Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networks
This addresses the challenge of enhancing symbolic comprehension in language models for applications requiring robust rule-based reasoning, representing a novel integration rather than an incremental improvement.
The paper tackles the problem of language models' limited proficiency in deterministic symbolic reasoning and rule-based tasks by proposing the Neural Comprehension framework, which integrates compiled neural networks (CoNNs) into transformers to encode rules explicitly, resulting in improved length generalization, efficiency, and interpretability for symbolic operations, with demonstrated superiority over existing techniques in arithmetic reasoning tasks.
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.