A Neural-Symbolic Approach to Natural Language Tasks

Qiuyuan Huang, Paul Smolensky, Xiaodong He, Li Deng, Dapeng Oliver WuarXiv 2017

Introduction

Traditional text-based CAPTCHAs, which rely on distorted alphanumeric strings, are increasingly vulnerable to modern Deep Learning (DL) and Optical Character Recognition (OCR) systems. As bots achieve near-human accuracy on these tasks, a new frontier for human-machine differentiation is required. Researchers have proposed image captioning—the task of describing a visual scene in natural language—as a robust alternative. While AI has made significant strides in this area, it still lacks the nuanced world knowledge and grammatical precision that humans naturally possess, especially when faced with complex or unusual imagery.

The Tensor Product Generation Network (TPGN)

The core of this new approach is the Tensor Product Generation Network (TPGN), a neural-symbolic architecture designed to bridge the gap between pattern recognition and structural logic. Unlike standard Recurrent Neural Networks (RNNs) or LSTMs that process information in a "black box" hidden state, TPGN utilizes Tensor Product Representations (TPR).

The TPGN architecture integrates image features with a symbolic unbinding mechanism to generate structured captions.

In this framework, symbols (words) are mathematically "bound" to specific structural roles (grammatical positions). The network employs an explicit "unbinding" mechanism where a matrix-vector product ($S_t u_t = f_t$) extracts a word from its role at each time step. The architecture consists of a pre-trained ResNet-152 for visual feature extraction and two interconnected LSTMs: one for managing sentence structure ($S$) and another for generating unbinding vectors ($U$). This allows the model to learn grammatical roles in an unsupervised manner, improving consistency over long sequences.

CAPTCHA Workflow and Implementation

The proposed CAPTCHA system leverages the TPGN's own limitations to identify secure challenges. By analyzing a database of images from the Microsoft COCO dataset, the system flags images where the AI produces low-quality captions (measured by the SPICE metric). These "hard" images serve as the basis for the Turing test.

The CAPTCHA workflow: users describe an image, and their response is graded against human gold standards to verify humanity.

When a user provides a description, the system evaluates it against human-generated "gold standard" captions using the SPICE metric. If the user's description achieves a sufficiently high score, they are verified as human.

Experimental Results

The TPGN was evaluated against industry-standard models like "Show and Tell" (NIC). The neural-symbolic approach demonstrated superior performance across multiple NLP metrics, including METEOR (0.243), CIDEr (0.909), and SPICE (0.18). Notably, the improvement in BLEU scores was more significant for longer sequences (BLEU-4), indicating that the TPR-based unbinding mechanism effectively maintains grammatical structure.

In the context of the CAPTCHA application, a clear performance gap was observed. Humans consistently achieved SPICE scores above 0.3, whereas the AI struggled to exceed 0.04 on the designated "hard" image set. This wide margin provides a reliable threshold for distinguishing between human users and automated bots.

Conclusion and Future Directions

By combining the strengths of deep learning with symbolic structural representations, the TPGN offers a more robust method for both image captioning and secure user verification. While the system currently relies on the sensitivity of the SPICE metric and requires significant computational overhead for matrix-vector operations, it represents a significant step toward more intelligent and secure web interfaces. Future work may extend this TPR approach to other complex tasks, such as automated spam detection or video-based storytelling.

Summary updated

BibTeX
@misc{huang2017neural,
  author = {Qiuyuan Huang and Paul Smolensky and Xiaodong He and Li Deng and Dapeng Oliver Wu},
  title = {{A Neural-Symbolic Approach to Natural Language Tasks}},
  year = {2017},
  eprint = {1710.11475},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.11475},
}
Figure