English (unofficial) translations of posts at kexue.fm
Source

Open Sourcing a Version of the DGCNN Reading Comprehension Question Answering Model (Keras Version)

Translated by DeepSeek V4 Pro. Translations can be inaccurate, please refer to the original post for important stuff.

Last year, I wrote "DGCNN: A CNN-based Reading Comprehension Question Answering Model", which introduced a simple, pure-convolutional question-answering model. At that time, it was implemented in TensorFlow and was not open-sourced. Over the past few days, I took some time to reproduce it using Keras and decided to open-source it.

Model Overview

I will not repeat the basic introduction of DGCNN here. The model released this time is not a direct duplicate of the previous implementation but includes several modifications. Here, I will only introduce the parts that have been changed.

  1. The model released here achieves a score of approximately 0.72 on the offline validation set (previously it was about 0.75);

  2. This model is character-based and uses the "Character-Word Hybrid Embedding" that I explored previously (the previous version was word-based);

  3. This model completely removes manual features (the previous version used 8 manual features);

  4. This model removes Position Embeddings (the previous version concatenated Position Embeddings to the input);

  5. The model architecture and training details have been slightly fine-tuned.

Among these changes, using characters as the unit makes the model’s labeling more flexible (avoiding word segmentation errors); removing manual features also enhances the model’s flexibility and improves prediction speed. As for removing Position Embeddings, it was because several tests showed that Position Embeddings did not provide a significant improvement. Other adjustments include using the latest RAdam optimizer for training, and so on.

This release does not strictly pursue an increase in scores but is purely intended to provide a Keras version for everyone’s reference. I believe there is still plenty of room for improvement, and interested friends are welcome to debug and tune it themselves (both the code and the dataset have been made available).

Final Words

I hope everyone enjoys using it, and I welcome further exchange of ideas!

When reposting, please include the original address of this article:
https://kexue.fm/archives/6906

For more detailed information regarding reposting, please refer to:
"Scientific Space FAQ"