jo-s-eph/gow-qa
收藏资源简介:
--- license: cc-by-sa-3.0 task_categories: - question-answering language: - en tags: - graph-of-words - qa - benchmark - wikipedia - gemma pretty_name: GoW-QA size_categories: - 1K<n<10K annotations_creators: - LLM-generated source_datasets: - wikipedia --- # GoW-QA: Graph-of-Words Question Answering Benchmark A benchmark dataset for evaluating Graph-of-Words (GoW) representations in Question Answering tasks. The dataset contains Wikipedia paragraphs converted into graph structures, with question-answer pairs generated by Gemma-4-31B for evaluating how well graph-based representations preserve textual information for QA. ## Dataset Summary | Metric | Value | |--------|-------| | **Total Paragraphs** | 1,621 | | **Total Articles** | 497 | | **Total Questions** | 8,105 | | **Questions per Paragraph** | 5 | | **Question Types** | FACTUAL, RELATIONAL, SUMMARIZATION | | **Graph Configuration** | naive_w5 (window=5, all tokens) | ## Dataset Structure Each record in the dataset contains: - `id`: Unique paragraph identifier (format: `{doc_id}_p{index}`) - `doc_id`: Wikipedia article identifier - `title`: Title of the source Wikipedia article - `para_index`: Paragraph position within the article (0-indexed) - `context`: The raw paragraph text from Wikipedia - `graph_config`: Graph construction configuration (default: `naive_w5`) - `adjacency_matrix`: GoW adjacency matrix (N×N, where N = number of tokens) - `node_labels`: Vocabulary/list of tokens in the graph - `qa_pairs`: List of 5 question-answer pairs ### Question Types | Type | Description | Example | |------|-------------|---------| | `FACTUAL` | Specific facts, dates, names, locations | "When was X born?" | | `RELATIONAL` | Relationships between entities | "Who is X's brother?" | | `SUMMARIZATION` | Main topic or overall meaning | "What is the main topic?" | ## Graph Construction (GoW) The Graph-of-Words representation is built using: - **Type**: `naive` — All tokens (no filtering) - **Window Size**: 5 (sliding window, W=5) - **Weighting**: Co-occurrence count within window - **Directed**: Yes - **Lemmatization**: Enabled (using spaCy `en_core_web_sm`) Example adjacency list representation: ``` lamkhaga → pass (w=3) lamkhaga → trek (w=2) pass → connect (w=1) ``` ## Source The dataset is built from **Wikipedia** articles (dumped: `2022-03-01`). > Wikipedia is a multilingual online encyclopedia. Wikipedia's content is published under the Creative Commons Attribution-Share-Alike License. Articles were sampled randomly from the full Wikipedia dump for diversity. **Sampling:** 500 articles were randomly sampled (seed=42) from the 10,000-article subset. ## Motivation This benchmark addresses a fundamental question in graph-based NLP: > **Can graph structural representations preserve sufficient information for Question Answering?** The dataset enables comparison between: - **Raw text QA** (upper bound - what transformer models are trained on) - **Graph-serialized QA** (probing what information is preserved in GoW) ## Use Cases 1. **Information Preservation Analysis**: Measure how much information is lost when converting text → graph 2. **Graph Representation Learning**: Train/evaluate GNN encoders on QA tasks 3. **Benchmarking**: Compare different GoW configurations (window size, node types, etc.) 4. **Future Work**: Enable research on graph-augmented LLM architectures ## Baseline Results | Configuration | Match Rate | Notes | |--------------|------------|-------| | Control (raw text) | ~87% | Upper bound | | GoW (naive_w5) | ~58% | Information preserved in graph | | **Information Gap** | ~29% | Information lost in serialization | > Note: These are preliminary results from Gemma-4-31B evaluation. Full benchmark evaluation pending. ## Dataset Versions | File | Description | |------|-------------| | `gow_qa.parquet` | Flat table (1 row per QA pair) - for easy loading | | `gow_qa_full.parquet` | Full data with adjacency matrices - for graph research | ## Loading the Dataset ```python # Basic loading from datasets import load_dataset ds = load_dataset("your-username/gow-qa") # Or load directly from local parquet import pandas as pd df = pd.read_parquet("gow_qa.parquet") ``` ## Citation If you use this dataset, please cite: ``` @article{gow-qa-2026, title={GoW-QA: A Graph-of-Words Question Answering Benchmark}, author={}, year={2026} } ``` ## License This dataset is based on Wikipedia content, which is licensed under the **Creative Commons Attribution-Share-Alike License 3.0**. The dataset itself (graph structures, QA pairs, annotations) is made available under the same license. ## Limitations - **Domain**: Primarily biographical/encyclopedic Wikipedia (limited to 497 articles) - **Language**: English only - **Graph Config**: Only `naive_w5` evaluated in current version - **QA Pairs**: Generated by Gemma-4-31B (may contain minor errors) ## Future Work - [ ] Expand to more Wikipedia domains (scientific, historical, technical) - [ ] Evaluate additional GoW configurations (noun, nounChunks, different window sizes) - [ ] Train GNN encoders on the dataset - [ ] Multi-lingual extension - [ ] Human-verified gold answers ## Contact For questions, issues, or collaboration inquiries, please open a GitHub issue. --- **Dataset Card created:** April 2026
license: CC BY-SA 3.0 任务类别: - 问答(question-answering) 语言: - 英语(en) 标签: - 词图(graph-of-words, GoW) - 问答(qa) - 基准数据集(benchmark) - 维基百科(wikipedia) - Gemma 别名:GoW-QA 样本规模: - 1000 < 样本数 < 10000 标注者: - 大语言模型(Large Language Model, LLM)生成 源数据集: - 维基百科(wikipedia) # GoW-QA:词图问答基准数据集(Graph-of-Words Question Answering Benchmark) 本数据集为用于评估词图(graph-of-words, GoW)表示在问答任务中表现的基准数据集。数据集包含转换为图结构的维基百科段落,问答对由Gemma-4-31B生成,用于评估基于图的表示在问答任务中保留文本信息的能力。 ## 数据集概览 | 指标 | 数值 | |--------|-------| | **总段落数** | 1,621 | | **总文章数** | 497 | | **总问题数** | 8,105 | | **单段落问题数** | 5 | | **问题类型** | 事实型(FACTUAL)、关系型(RELATIONAL)、摘要型(SUMMARIZATION) | | **图配置** | naive_w5(窗口大小=5,覆盖所有Token) | ## 数据集结构 每条数据记录包含以下字段: - `id`:唯一段落标识符(格式:`{doc_id}_p{index}`) - `doc_id`:维基百科文章标识符 - `title`:源维基百科文章标题 - `para_index`:段落在文章中的位置(从0开始索引) - `context`:来自维基百科的原始段落文本 - `graph_config`:图构建配置(默认值:`naive_w5`) - `adjacency_matrix`:词图邻接矩阵(N×N,其中N为Token数量) - `node_labels`:图中Token的词汇表/列表 - `qa_pairs`:包含5个问答对的列表 ### 问题类型 | 类型 | 描述 | 示例 | |------|-------------|---------| | `FACTUAL`(事实型) | 具体事实、日期、姓名、地点 | "X出生于何时?" | | `RELATIONAL`(关系型) | 实体间的关联关系 | "X的兄弟是谁?" | | `SUMMARIZATION`(摘要型) | 核心主题或整体语义 | "该段落的核心主题是什么?" | ## 词图(GoW)构建流程 词图表示的构建规则如下: - **类型**:`naive` — 保留所有Token(无过滤) - **窗口大小**:5(滑动窗口,W=5) - **权重计算**:窗口内共现次数 - **有向性**:是 - **词形还原**:已启用(使用spaCy的`en_core_web_sm`模型) 示例邻接表表示: lamkhaga → pass(权重w=3) lamkhaga → trek(权重w=2) pass → connect(权重w=1) ## 数据集来源 本数据集基于**维基百科(wikipedia)**文章构建(数据快照版本:`2022-03-01`)。 > 维基百科是多语言在线百科全书,其内容采用知识共享署名-相同方式共享协议发布。我们从完整维基百科快照中随机采样文章以保证多样性。 **采样方式**:从10,000篇文章的子集中随机采样500篇文章(随机种子=42)。 ## 研究动机 本基准数据集旨在解决图驱动自然语言处理中的核心问题: > **基于图的结构表示能否为问答任务保留足够的文本信息?** 本数据集支持以下两类方法的对比: - **原始文本问答**(性能上限——Transformer模型的训练数据形式) - **图序列化问答**(用于探测词图表示保留的信息内容) ## 应用场景 1. **信息保留度分析**:量化文本转换为图结构过程中丢失的信息总量 2. **图表示学习**:在问答任务上训练或评估图神经网络(Graph Neural Network, GNN)编码器 3. **基准测试**:对比不同词图配置(如窗口大小、节点类型等)的性能 4. **前沿研究**:为图增强型大语言模型架构的研究提供支撑 ## 基线实验结果 | 配置 | 匹配率 | 备注 | |--------------|------------|-------| | 对照组(原始文本) | ~87% | 性能上限 | | 词图(naive_w5) | ~58% | 词图保留的信息比例 | | **信息损失率** | ~29% | 文本转图过程中丢失的信息比例 | > 注:上述结果为Gemma-4-31B模型的初步评估结果,完整基准测试仍在进行中。 ## 数据集版本 | 文件 | 描述 | |------|-------------| | `gow_qa.parquet` | 扁平表格式(每条QA对占一行)——便于快速加载 | | `gow_qa_full.parquet` | 包含邻接矩阵的完整数据集——适用于图相关研究 | ## 数据集加载 python # 基础加载方式 from datasets import load_dataset ds = load_dataset("your-username/gow-qa") # 或从本地parquet文件加载 import pandas as pd df = pd.read_parquet("gow_qa.parquet") ## 引用格式 如使用本数据集,请引用以下文献: @article{gow-qa-2026, title={GoW-QA: Graph-of-Words Question Answering Benchmark}, author={}, year={2026} } ## 许可协议 本数据集基于维基百科内容构建,维基百科内容采用**知识共享署名-相同方式共享3.0协议(Creative Commons Attribution-Share-Alike License 3.0)**发布。本数据集本身(包括图结构、问答对、标注内容)采用相同许可协议发布。 ## 局限性 - **领域限制**:主要涵盖传记/百科类维基百科文章(仅包含497篇文章) - **语言限制**:仅支持英语 - **图配置限制**:当前版本仅评估了`naive_w5`配置 - **问答对局限性**:问答对由Gemma-4-31B生成,可能存在少量错误 ## 未来工作计划 - [ ] 拓展至更多维基百科领域(如科学、历史、技术类文章) - [ ] 评估更多词图配置(如仅保留名词、名词短语、不同窗口大小等) - [ ] 在本数据集上训练图神经网络编码器 - [ ] 支持多语言扩展 - [ ] 生成人工验证的标准答案 ## 联系方式 如有疑问、问题或合作意向,请提交GitHub Issue。 --- **数据集卡片创建时间**:2026年4月




