Math Problems Takuya Matsuzaki Noriko H. Arai (Nagoya University) - - PowerPoint PPT Presentation

β–Ά
math problems
SMART_READER_LITE
LIVE PREVIEW

Math Problems Takuya Matsuzaki Noriko H. Arai (Nagoya University) - - PowerPoint PPT Presentation

Solving Natural Language Math Problems Takuya Matsuzaki Noriko H. Arai (Nagoya University) (National Institute of Informatics) Solving NL Math why? It is the first and the last goal of symbolic approach to language understanding (LU)


slide-1
SLIDE 1

Solving Natural Language Math Problems

Takuya Matsuzaki

(Nagoya University)

Noriko H. Arai

(National Institute of Informatics)

slide-2
SLIDE 2

Solving NL Math – why?

  • It is the first and the last goal of symbolic

approach to language understanding (LU)

  • Formalization of the domain is the prerequisite

for LU

  • Problem solving is the only way to compare

different LU systems

  • Only the input and output are observable
  • No ground-truth for a mid-layer’s output
slide-3
SLIDE 3

System Overview

Problem Language Understanding Logical Form in a HOL CA & ATP Answer Logical Form in Local Theories

Let π‘š be the trajectory of 𝑒 + 2, 𝑒 + 2, 𝑒 for 𝑒 ranging over ℝ. 𝑃 0, 0, 0 , 𝐡 2, 1, 0 , and 𝐢 1, 2, 0 are on a sphere, 𝑇, centered at 𝐷 𝑏, 𝑐, 𝑑 . Determine the condition on 𝑏, 𝑐, 𝑑 for which 𝑇 intersects with π‘š.

3

Formula Rewriting

slide-4
SLIDE 4

Today’s Topics

  • Parsing Math Problem Text with

Combinatory Categorial Grammar

  • Benchmarking a CAS-based solver with

formalized pre-university math problems

slide-5
SLIDE 5

Combinatory Categorial Grammar

  • Word ⇔ (syntactic category, Ξ»-expression)

Word type Example Proper noun β€œJohn” ⇔ (𝑂𝑄, john) Common noun β€œcat” ⇔ (𝑂, Ξ»x.cat(x)) Intransitive verb β€œruns” ⇔ (S βˆ– 𝑂𝑄, Ξ»x.run(x)) Transitive verb β€œloves” ⇔ (S βˆ– 𝑂𝑄/𝑂𝑄, Ξ»y.Ξ»x.love(x,y)) Indefinite article β€œa” ⇔ (S/(S βˆ– 𝑂𝑄)/𝑂, Ξ»N.Ξ»P.βˆƒx(Nx∧Px)) Quantifier β€œevery” ⇔ (S/(S βˆ– 𝑂𝑄)/𝑂, Ξ»N.Ξ»P.βˆ€x(Nxοƒ Px))

slide-6
SLIDE 6

Combinatory rules

John

𝑂𝑄 : john

loves

S βˆ– 𝑂𝑄/𝑂𝑄: Ξ»x.Ξ»y.love(y,x) S βˆ– 𝑂𝑄 βˆ– (S βˆ– 𝑂𝑄/𝑂𝑄)/𝑂 : Ξ»N.Ξ»P.Ξ»y.βˆƒx(Nx∧Pxy)

a

𝑂 : Ξ»x.cat(x)

cat

S βˆ– 𝑂𝑄 βˆ– (S βˆ– 𝑂𝑄/𝑂𝑄) : Ξ»P.Ξ»y.βˆƒx(cat(x)∧Pxy) S βˆ– 𝑂𝑄 : Ξ»y.βˆƒx(cat(x)∧love(y,x)) S : βˆƒx(cat(x)∧love(john,x))

> < <

Forward application X / Y : f Y : y X : f y

>

Backward application Y : y X βˆ–Y : f X : f y

<

Forward composition X / Y : f Y / Z : g X / Z : Ξ»z.f (gz)

>B

etc.

slide-7
SLIDE 7

Combinatory rules

John

𝑂𝑄 : john

loves

S βˆ– 𝑂𝑄/𝑂𝑄: Ξ»x.Ξ»y.love(y,x) S βˆ– 𝑂𝑄 βˆ– (S βˆ– 𝑂𝑄/𝑂𝑄)/𝑂 : Ξ»N.Ξ»P.Ξ»y.βˆƒx(Nx∧Pxy)

a

𝑂 : Ξ»x.cat(x)

cat

S βˆ– 𝑂𝑄 βˆ– (S βˆ– 𝑂𝑄/𝑂𝑄) : Ξ»P.Ξ»y.βˆƒx(cat(x)∧Pxy) S βˆ– 𝑂𝑄 : Ξ»y.βˆƒx(cat(x)∧love(y,x)) S : βˆƒx(cat(x)∧love(john,x))

> < <

Forward application X / Y : f Y : y X : f y

>

Backward application Y : y X βˆ–Y : f X : f y

<

Forward composition X / Y : f Y / Z : g X / Z : Ξ»z.f (gz)

>B

etc.

slide-8
SLIDE 8

Syntactic Category = Semantic Type + Syntactic Constraints Example β€œdistance” (as in β€œdistance between P and Q”)

  • Syntactic cat.: NPReal/PPbetween,(Point,Point)
  • Semantic function: Ξ»p.dist(p)
  • Semantic type: (Point, Point) οƒ  Real

distance π‘‚π‘„π‘†π‘“π‘π‘š/𝑄𝑄𝑐𝑒π‘₯π‘œ,(π‘„π‘œπ‘’,π‘„π‘œπ‘’) : Ξ»p.dist(p) between 𝑄𝑄𝑐𝑒π‘₯π‘œ,(𝛽,𝛾)/𝑂𝑄(𝛽,𝛾) : id π‘‚π‘„π‘„π‘œπ‘’: P P 𝑂𝑄 𝛽,𝛾 βˆ– 𝑂𝑄

𝛽/𝑂𝑄𝛾:

Ξ»y.Ξ»x.(x,y) and 𝑂𝑄(π‘„π‘œπ‘’,π‘„π‘œπ‘’) : (P,Q) 𝑄𝑄𝑐𝑒π‘₯π‘œ,(π‘„π‘œπ‘’,π‘„π‘œπ‘’): (P,Q) π‘‚π‘„π‘†π‘“π‘π‘š: dist(P,Q) π‘‚π‘„π‘„π‘œπ‘’: Q Q

slide-9
SLIDE 9

Comparison with compilers

  • Compilers : source code οƒ  machine code
  • NL parsing : math problem οƒ  logical form
  • NL parsing = type check

+ syntax check + denotational semantics

  • Besides, the grammar is only partially known and

ambiguous

slide-10
SLIDE 10

Grammar and lexicon: current status

  • Size
  • 31 combinatory rules
  • 6,652 different word forms
  • 42,154 triples of <word, category, Ξ»-term>
  • What’s not in textbook (toy) grammars:
  • Imperatives, pluralities, relation/attribute nouns,

context dependent semantics, action verbs, etc.

  • Coverage:
  • 70%~80% of university math exam sentences

can be parsed (either correctly or wrongly)

slide-11
SLIDE 11

Remaining issues

  • Lexicon / grammar coverage
  • Hypothesis explosion due to local ambiguity
  • β€œy = ax2”: equality or Ξ»x.ax2 or { (x,y) | y = ax2 }
  • β€œif A then B and C”: (A οƒ  B) & C or A οƒ  (B & C)
  • Inter-sentential logical structure analysis. E.g.,
  • Sentence 1: If A then B.
  • Sentence 2: If C then D.
  • (A οƒ  B) & (C οƒ  D)
  • A οƒ  (B & (C οƒ  D))
  • (A οƒ  B) & (A οƒ  (B & C) οƒ  D)
slide-12
SLIDE 12

Benchmarking CA-based Problem Solver on Formalized Pre-univ. Math Problems

slide-13
SLIDE 13

Motivation

  • Development of the AR layer of the

solver in parallel with the NLU layer

  • Evaluation on problems with varying

difficulty

  • Estimation of the computational cost of

the reasoning on NLU output

slide-14
SLIDE 14

Benchmark Problems: Sources

  • Ex: 288 problems from exercise book series
  • 200 problems on geometry
  • 100 problems on integer arithmetic
  • Univ: 245 problems from the entrance exams
  • f seven national universities
  • Geometry, real arithmetic, pre-calculus etc.

expressible in the theory of RCF

  • IMO: 212 problems from the International

Mathematics Olymipiads (1959-2014)

  • All geometry and real arithmetic problems
  • Some of number theory, combinatorics etc.
  • 2/3 of the all past problems till 2014
slide-15
SLIDE 15

Encoding process

  • Six students (majored in math/CS) and

two full-time researchers encoded the problems in a higher-order language

  • Literal translation
  • Word-by-word, sentence-by-sentence
  • No inference
  • No paraphrase
slide-16
SLIDE 16

Example

Let D be a point inside acute triangle ABC such that ∠ADB = ∠ ACB + Ο€/2 and AC・BD = AD ・ BC Calculate the ratio (AB・CD)/(AC・BD). (IMO 1993 Problem 2)

(Find (x) (exists (A B C D) (&& (is-acute-triangle A B C) (point-inside-of D (triangle A B C)) (= (rad-of-angle (angle A D B)) (+ (rad-of-angle (angle A C B)) (/ (Pi) 2))) (= (* (distance A C) (distance B D)) (* (distance A D) (distance B D))) (= x (/ (* (distance A B) (distance C D)) (* (distance A C) (distance B D))))))))

slide-17
SLIDE 17

CAS-based solver

slide-18
SLIDE 18

Syntactic Profile (per problem; medians)

Pre-univ math benchmark TPTP-THF Ex Univ IMO All # Formulas 2 2 1 1 10 # Atoms 65 95 65 72 88 Avg atoms/Fml 38 54 56 48 6 # Symbols 16 19 12 15 9 # Variables 9 13 8 9 19 Ξ» 3 3 1 2 2 βˆ€ 4 9 βˆƒ 4 6 1 4 2 # Connectives 55 78 58 61 52

#of Ξ»-abstractions Problem scale is at similar level Different types quantifications

slide-19
SLIDE 19

Overall results

  • Difficulty of RCF problmes: Ex < Univ < IMO
  • Difficulty of PA problems: Ex << IMO

Ex

slide-20
SLIDE 20

Results on RCF problems in Ex

  • # of Stars = difficulty level assessed by the

editors of the practice book series

slide-21
SLIDE 21

Results on IMO problems by years

  • Human Efficiency: IMO participants’ avg. score
  • Machine Efficiency: system’s score
  • IMO problems get harder by year both for

human and machines

slide-22
SLIDE 22

Summary

  • Natural Language Math Solving System

combining

  • Grammar-driven semantic analysis
  • Inference by QE
  • Benchmark result on the inference part
  • Excercise & entrance exam: ~60%
  • Mathematical Olympiads: 5~15%