Math Word Problem 분야 관련 논문들을 읽다보면, 지겹게 나오는 dataset 들이 있다.
이 dataset 을 간과하기엔, 파고드는 논문들이 많아서 정리하고자 한다.
Math Word Problem
- 자연어 처리 분야(Natural Language Processing) 분야 task 중 하나
- 모델에게 문장형 수학 문제를 풀도록 하는 것
- 문제 해석: Dan 은 2개의 펜을, Jessica 는 4개의 펜을 가지고 있다. 총 몇개의 펜을 갖고 있는가?
- 정답: 6
- 방정식: x = 4 + 2
- 보통, 정답만 맞추는 것보다 해당 문제 풀이를 의미하는 방정식을 생성(generation) 하도록 한다.
오늘은 대표적인 dataset 4개를 간략히 소개하고자 한다.
- Math23k
- MathQA
- MAWPS
- SVAMP
위 논문에선 benchmark dataset 의 부재를 지적하며, 새롭게 만들었다고 한다. 오늘 소개할 글에선 해당 논문에 게재된 모델에 대해선 언급하지 않을 것이다. 그 이유는 dataset 에 관한 글을 애초에 쓰고 했고, 현재는 더 뛰어난 모델이 많기 때문이다.
Dataset Table
수량 | 난이도 | 언어 | |
Math23k | 23161 | 초등학교 | Chinese |
MathQA | 37259 | 미국 대학원 입학 시험 | English |
MAWPS | 3320 | 초등학교 | English |
SVAMP | 1000 | 인간: 초등학교 기계: 까다롭고 정교함 |
English |
Math23k
논문명: Deep Neural Solver for Math Word Problems
논문링크: https://aclanthology.org/D17-1088/
Deep Neural Solver for Math Word Problems
Yan Wang, Xiaojiang Liu, Shuming Shi. Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. 2017.
aclanthology.org
해당 논문에선 benchmark dataset 의 부재를 지적하며, 새롭게 만들었다고 한다. 오늘 소개할 글에선 해당 논문에 게재된 모델에 대해선 언급하지 않을 것이다. 그 이유는 dataset 에 관한 글을 애초에 쓰고 했고, 현재는 더 뛰어난 모델이 많기 때문이다.
- 언어: 중국어
- 문항수: 23161개 (그래서 dataset 이름이 Math23k 다)
- 수준: 초등학교 (elementary school). 저자들도 one-unknown-variable linear math word problems 이라고 표현함.
- 제작방법: 교육 웹 사이트로부터 60000 개의 문제를 크롤링함. 그리고 rule-based extraction method 를 사용함.
sample
{
"id":"35",
"original_text":"在一正方形花池的4周栽了44棵柳树,每两棵柳树之间的间隔是20米,这个正方形的周长=多少米?",
"segmented_text":"在 一 正方形 花池 的 4 周 栽 了 44 棵 柳树 , 每 两棵 柳树 之间 的 间隔 是 20 米 , 这个 正方形 的 周长 = 多少 米 ?",
"equation":"x=44*20",
"ans":"880"
}
MathQA
논문명: Deep Neural Solver for Math Word Problems
논문링크: https://arxiv.org/abs/1905.13319
MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalisms
We introduce a large-scale dataset of math word problems and an interpretable neural math problem solver that learns to map problems to operation programs. Due to annotation challenges, current datasets in this domain have been either relatively small in s
arxiv.org
github.io 링크: https://math-qa.github.io/
MathQA-Dataset
MathQA (Aida Amini, Saadia Gabriel, Peter Lin, Rik Koncel-Kedziorski, Yejin Choi , and Hannaneh Hajishirzi) Dataset, Annotation, Validation and Examples Copyright © Your Website 2019
math-qa.github.io
- 언어: 영어
- 문항수: 37259개
- 수준: GRE- and GMAT-level (미국 대학원 수학 자격 시험, 경영대학원 입학 시험). 보통 어렵고 복잡한 경우에도 모델이 어떤지 보기 위해 사용한다.
- 특징1: multiple-choice → 객관식이다. 주관식으로 바꾸는 전처리가 주로 이뤄진다.
- 특징2: 다양한 영역의 문항이 포함되어 있다.
- 특징3: 연산자의 종류가 총 58개일 정도로 문항이 다채롭다. 특히, 문항당 평균 연산자 숫자가 5.3 이라는 점을 명심해야 한다.
- 제작방법: AQUA dataset 의 방대함과 다양성을 기반으로 MWP 특화된 dataset 을 제작하고자 하였다고 한다.
sample
{
"Problem": "the banker ' s gain of a certain sum due 3 years hence at 10 % per annum is rs . 36 . what is the present worth ?",
"Rationale": "\"explanation : t = 3 years r = 10 % td = ( bg \u00d7 100 ) / tr = ( 36 \u00d7 100 ) / ( 3 \u00d7 10 ) = 12 \u00d7 10 = rs . 120 td = ( pw \u00d7 tr ) / 100 \u21d2 120 = ( pw \u00d7 3 \u00d7 10 ) / 100 \u21d2 1200 = pw \u00d7 3 pw = 1200 / 3 = rs . 400 answer : option a\"",
"options": "a ) rs . 400 , b ) rs . 300 , c ) rs . 500 , d ) rs . 350 , e ) none of these",
"correct": "a",
"annotated_formula": "divide(multiply(const_100, divide(multiply(36, const_100), multiply(3, 10))), multiply(3, 10))",
"linear_formula": "multiply(n2,const_100)|multiply(n0,n1)|divide(#0,#1)|multiply(#2,const_100)|divide(#3,#1)|",
"category": "gain"
}
MAWPS
논문명: MAWPS: A Math Word Problem Repository
논문링크: https://aclanthology.org/N16-1136/
MAWPS: A Math Word Problem Repository
Rik Koncel-Kedziorski, Subhro Roy, Aida Amini, Nate Kushman, Hannaneh Hajishirzi. Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. 2016.
aclanthology.org
github 링크: https://github.com/sroy9/mawps
GitHub - sroy9/mawps: Code for MAWPS: A Math Word Problem Repository
Code for MAWPS: A Math Word Problem Repository. Contribute to sroy9/mawps development by creating an account on GitHub.
github.com
심지어 찾아본 결과, 공식적으로 dataset 을 다운로드받을 수 있는 곳이 없었다. 최근에 이 데이터를 사용한 모델 'graph2tree'에 게재되어 있어 링크를 올린다.
다운로드 링크: https://github.com/2003pro/Graph2Tree/tree/master/mawps/data
GitHub - 2003pro/Graph2Tree: Code for Graph-to-Tree Learning for Solving Math Word Problems (ACL 2020)
Code for Graph-to-Tree Learning for Solving Math Word Problems (ACL 2020) - GitHub - 2003pro/Graph2Tree: Code for Graph-to-Tree Learning for Solving Math Word Problems (ACL 2020)
github.com
해당 논문에선 online 으로 직접 Math Word Problem Dataset 을 만들 수 있는 framework 을 제공했다는 것에 의의를 두다보니, dataset 에 대한 자세한 소개가 없다.
- 언어: 영어
- 문항수: 3320개 (논문 abstract 에 적혀 있다만, 이걸 사용하는 논문마다 개수가 다 다르다...?)
- 수준: 온라인 발췌라 공식적인 이야기는 없다. 하지만 쉬운 편이라고 많은 논문들에서 이야기한다. 특히 'SVAMP'가 탄생한 논문에선 해당 dataset 의 수준을 초등학교 정도라고 분석했다.
- 제작방법: 논문에서 소개하는 MAWPS system 을 통해 제작했다고 밝힌다.
sample
[
{
"iIndex": 1,
"sQuestion": "Joan found 70.0 seashells on the beach . She gave Sam some of her seashells . She has 27.0 seashells . How many seashells did she give to Sam ?",
"lEquations": [
"X=(70.0-27.0)"
],
"lSolutions": [
43.0
]
},
...
]
SVAMP
논문명: Are NLP Models really able to Solve Simple Math Word Problems?
(굉장히 좋은 논문이라서, 조만간에 정리해서 링크를 걸겠다.)
논문링크:https://arxiv.org/abs/2103.07191
Are NLP Models really able to Solve Simple Math Word Problems?
The problem of designing NLP solvers for math word problems (MWP) has seen sustained research activity and steady gains in the test accuracy. Since existing solvers achieve high performance on the benchmark datasets for elementary level MWPs containing one
arxiv.org
github 링크: https://github.com/arkilpatel/SVAMP
GitHub - arkilpatel/SVAMP: NAACL 2021: Are NLP Models really able to Solve Simple Math Word Problems?
NAACL 2021: Are NLP Models really able to Solve Simple Math Word Problems? - GitHub - arkilpatel/SVAMP: NAACL 2021: Are NLP Models really able to Solve Simple Math Word Problems?
github.com
(Github 에 가보면, 다양한 형태로 가공되어 있음을 알 수 있다. 논문에 자세히 나와있으니 참고하길 바란다.)
- 언어: 영어
- 문항수: 1000개
- 이 논문은 TEST_DATASET 만 제작했다. 학습은 AsDiv-A 와 MAWPS 로 진행한다.
- 수준: 인간의 입장에선 초등학교 수준이다. 심지어 MAWPS 보다 평균 연산자수가 낮다. 하지만 기계의 입장에선 까다롭고 정교하게 만들어서 훨씬 어렵다.
- 제작방법: MAWPS, ASDiv-A 의 일부를 추출하여 다양한 형태의 변형을 준다. 특히, 변형과정은 기계 입장에서 매우 까다롭게 진행되었다.
sample
{
"ID": "chal-1",
"Body": "Each pack of dvds costs 76 dollars. If there is a discount of 25 dollars on each pack",
"Question": "How much do you have to pay to buy each pack?",
"Equation": "( 76.0 - 25.0 )",
"Answer": 51.0,
"Type": "Subtraction"
}