25 May 2007

Math as a Natural Language

Mathematics (with a capital "M") is typically considered a formal language. While I would agree that it tends to be more formal than, say, English, I often wonder whether it's truly formal (finding a good definition of formal would be useful, but is apparently somewhat difficult). In other words, are there properties that the usual natural languages have that math does not. I would say there are only a few, and they're mostly unimportant. Secondly, note that I bolded the "a" above. This is because I also feel that Mathematics is more like a collection of separate languages (or, dialects if you prefer since none of them has an army -- except perhaps category theory) that a single language.

First regarding the formality. Typically when I think of formal languages, I think of something lacking ambiguity. This is certainly the case for the sort of math that one would type into matlab or a theorem prover or mathematica. But what one types in here is what I would call "formal math" precisely because it is not the language that mathematicians actually speak. This is perhaps one reason why these tools are not more widely used: translating between the math that we speak and the math that these tools speak is somewhat non-trivial. The ambiguity issue is perhaps the most forceful argument that math is not completely formal: operators get overloaded, subscripts and conditionings get dropped, whole subexpressions get elided (typically with a "..."), etc. And this is not just an issue of venue: it happens in formal math journals as well.

It is often also the case that even what gets publishes is not really the mathematics that people speak. Back when I actually interacted with real mathematicians, there was inevitably this delay for "formally" writing up results, essentially breaking apart developed shorthand and presenting things cleanly. But the mathematics that appears in math papers is not really in its natural form -- at least, it's often not the language that mathematicians actually work with.

To enumerate a few points: Math...

  • has a recursive structure (obviously)
  • is ambiguous
  • is self-referential ("see Eq 5" or "the LHS" or simply by defining something and giving it a name)
  • has an alphabet and rules for combining symbols
To some degree, it even has a phonology. One of the most painful classes I ever took (the only class I ever dropped) was an "intro to logic for grad CS students who don't know math" class. This class pained me because the pedagogical tool used was for the professor to hand out typed notes and have the students go around and each read a definition/lemma/theorem. After twenty minutes of "alpha superscript tee subscript open parenthesis eye plus one close parethesis" I was ready to kill myself. It has no morphology that I can think of, but neither really does Chinese.

Moving on to the "a" part, I propose a challenge. Go find a statistician (maybe you are one!). Have him/her interpret the following expression: . Next, go find a logician and have him/her interpret . For people in the respective fields, these expressions have a very obvious meaning (I'm guessing that most of the readers here know what the second is). I'm sure that if I had enough background to drag up examples from other fields, we could continue to perplex people. In fact, even though about 8 years ago I was intimately familiar with the first sort of expression, I actually had to look it up to ensure that I got the form right (and to ensure that I didn't make a false statement). This reminded me somewhat of having to look up even very simple words and expressions in Japanese long after having used it (somewhat) regularly. I think that the diversity of meaning of symbols and subexpressions is a large part of the reason why most computer algebra systems handle only a subset of possible fields (some do algebra, some calculus, some logic, etc.). I believe in my heart that it would be virtually impossible to pin down a single grammar (much less a semantics!) for all of math.

So what does this have to do with an NLP blog? Well, IMO Math is a natural language, at least in all the ways that matter. So why don't we study it more? In particular, when I download a paper, what I typically do is first read the abstract, then flip to the back to skim to results, and then hunt for the "main" equation that will explain to me what they're doing. For me, at least, this is much faster than trying to read all of the text, provided that I can somewhat parse the expression (which is only a problem when people define too much notation). So much information, even in ACL-style papers, but more-so in ICML/NIPS-style papers, is contained in the math. I think we should try to exploit it.

15 comments:

Bob Carpenter said...

Hint: "Formal" is etymologically derived from "form". There's a nice Wikipedia definition of "formal system" as a formal language plus inference rules (the latter typically required to be recursively enumerable).

Goedel basically showed in his incompleteness theorems that there were truths (in the model theoretic sense) in mathematics that were not formalizable.

Mathematicians know that math is expressed in natural language. A highly stylized genre of natural language perhaps, but hardly a formal language. LaTeX, on the other hand, in which mathematicians typeset their work, is a formal system based on a formal language.

One of my favorite examples of how math writing is like natural language is the ambiguity of the expectation symbol in statistics -- one has to use context to figure out what distribution we're taking the expectation over.

Many people over the years have worked on parsing mathematics expressed in natural language into something more formal. A good example is Chris Manning et al.'s paper on parsing logic puzzles, which are a particularly well behaved, though still extraordinarily difficult, instance of parsing and understanding math.

The next question to ask is usually "what about music"? There's been some nice work on models in that area, usually measured by compression of scores. For instance, check out Geraint Wiggins's publications for some good examples.

hal said...

Ah yes, I had meant to mention LaTeX. I think the important thing to note is that LaTeX is purely a system for typesetting -- it's not really even a language for expressing math syntax (or, at least, it's not often used as such), much less semantics.

Fernando Pereira said...

It's always interesting, if a bit hard-going, to read what Zellig Harris had to say on the differences between natural languagge and science sublanguages. Rather than summarizing it here, I recently blogged on this at "Earning My Turns".

Els@ said...

I found real curious this post. Being a Mathematician/Computer Scientist (under graduation course) doing research on NLP (PhD student), this post grabbed my attention. I’ve never thought about.
In fact, after so many years reading mathematical language, you start to view it almost as a second language (at least is what my math (young) students say, when they don’t understand what I right and got amazed how I “translated” it into Portuguese).
I don’t see dialects inside the mathematical language. I see expertise areas, just like we have domain specific terms. Try to listen a work conversation between two biologists, physicians, lawyers, or any other specific area that you are not familiar with. Although they are speaking the same idiom (natural language) as yours, most of the information will be lost among unfamiliar terms.
I’m not trying to prove anything, here. But, the truth is that any mathematician, from any part of the world (just like musicians. I found the question about music also quite interesting) is able to read any mathematical expression no matter the writer’s nationality. It’s a global language (just like music…). If it is formal… well, I don’t find myself capable to claim such statement. But the fact is that you have an alphabet, morphology, syntax, and even semantic.
For example, the term "f^(-1)(x)" represents the inverse function of a real function f.
And I’m sure there’s no confusion about that. Why? Because of the power of minus one, which, when applied over a number, it denotes the number’s inverse. Even the choice of letters to denote the various “terms” such as variables, functions and sets is not ambiguous. Every time you face a f you know you’ll find a function; n stands for a natural number; i stands for a natural index; capitalization stand for sets; you don’t use e for a variable, because it represents the Nepper’s number; or Pi, the Greek letter which represents the ratio of a circle's circumference to its diameter, but also the angle with 180degrees, in radians (curiously, the angles are usually represented by Greek letters); and the list could go on and on.

These are just some ideas that came into my mind after reading this post, but I’ll search more about it ...

Suresh said...

An interesting question, posed by Alexandre Borovik:


every time when we try to look at the logical structures of natural languages, we find more and more mysteries. My principal question is: how had mathematics managed to develop in a uniform standard language for the entire world, in a language which transcends and suppresses the logical subleties of natural languages in which mathematics is translated?

Anonymous said...

Math is a good subject to read. Mathematicians typescript their work, is a formal method based on a formal language.
___________________________
Matt
Wide Circles

. said...

酒店經紀PRETTY GIRL 台北酒店經紀人 ,禮服店 酒店兼差PRETTY GIRL酒店公關 酒店小姐 彩色爆米花酒店兼職,酒店工作 彩色爆米花酒店經紀, 酒店上班,酒店工作 PRETTY GIRL酒店喝酒酒店上班 彩色爆米花台北酒店酒店小姐 PRETTY GIRL酒店上班酒店打工PRETTY GIRL酒店打工酒店經紀 彩色爆米花

酒店上班請找艾葳 said...

艾葳酒店經紀公司提供專業的酒店經紀, 酒店上班小姐,八大行業,酒店兼職,傳播妹,或者想要打工兼差打工,兼差,八大行業,酒店兼職,想去酒店上班, 日式酒店,制服酒店,ktv酒店,禮服店,整天穿得水水漂漂的,還是想去制服店日領上班小姐,水水們如果想要擁有打工工作、晚上兼差工作兼差打工假日兼職兼職工作酒店兼差兼差打工兼差日領工作晚上兼差工作酒店工作酒店上班酒店打工兼職兼差兼差工作酒店上班等,想了解酒店相關工作特種行業內容,想兼職工作日領假日兼職兼差打工、或晚班兼職想擁有鋼琴酒吧又有保障的工作嗎???又可以現領請找專業又有保障的艾葳酒店經紀公司!

艾葳酒店經紀是合法的公司工作環境高雅時尚,無業績壓力,無脫秀無喝酒壓力,高層次會員制客源,工作輕鬆,可日領現領
一般的酒店經紀只會在水水們第一次上班和領薪水時出現而已,對水水們的上班安全一點保障都沒有!艾葳酒店經紀公司的水水們上班時全程媽咪作陪,不需擔心!只提供最優質的酒店上班,酒店上班,酒店打工環境、上班條件給水水們。心動嗎!? 趕快來填寫你的酒店上班履歷表

水水們妳有缺現領、有兼職缺錢便服店的煩腦嗎?想到日本留學缺錢嗎?妳是傳播妹??想要擁有高時薪又輕鬆的賺錢,酒店和,假日打工,假日兼職賺錢的機會嗎??想實現夢想卻又缺錢沒錢嗎!??
艾葳酒店台北酒店經紀招兵買馬!!徵專業的酒店打工,想要去酒店的水水,想要短期日領,酒店日領,禮服酒店,制服店,酒店經紀,ktv酒店,便服店,酒店工作,禮服店,酒店小姐,酒店經紀人,
等相關服務 幫您快速的實現您的夢想~!!

gamefan12 said...

This is what i agree with While I would agree that it tends to be more formal than, say, English.
california whistleblower lawyer

qishaya said...

one day i went shopping outside,and in an ed hardy store,I found some kinds of ed hardy i love most they are Your website is really good Thank you for the information ed hardy ed hardy ed hardy clothing ed hardy clothing ed hardy shoes ed hardy shoes don ed hardy don ed hardy ed hardy clothes ed hardy clothes ed hardy bags ed hardy bags ed hardy swimwear ed hardy swimwear ed hardy jeans ed hardy jeans ed hardy mens ed hardy mens Thank you for the information

seldamuratim said...

Really trustworthy blog. Please keep updating with great posts like this one. I have booked marked your site and am about to email it to a few friends of mine that I know would enjoy reading..
sesli sohbetsesli chatkamerali sohbetseslisohbetsesli sohbet sitelerisesli chat siteleriseslichatsesli sohpetseslisohbet.comsesli chatsesli sohbetkamerali sohbetsesli chatsesli sohbetkamerali sohbet
seslisohbetsesli sohbetkamerali sohbetsesli chatsesli sohbetkamerali sohbet

cilemsin42 said...

Really trustworthy blog. Please keep updating with great posts like this one. I have booked marked your site and am about to email it to a few friends of mine that I know would enjoy reading..
sesli sohbetsesli chat
sesli sohbet siteleri

sesli chat siteleri sesli sohbetsesli chat
sesli sohbet siteleri
sesli chat siteleri
SesliChat
cılgın sohbet
güzel kızlar
bekar kızlar
dul bayanlar
seviyeli insanlar
yarışma
canlı müzik
izdivac
en güzel evlilik
hersey burada
sesliparti
seslisohbet odalari
Sesli adresi
Sesli Chat
SesliChat Siteleri
Sesli Chat sitesi
SesliChat sitesi
SesliSohbet
Sesli Sohbet
Sesli Sohbet Sitesi
SesliSohbet Sitesi
SesliSohbet Siteleri
Muhabbet Sitesi
kamerali chat
Görüntülü Sohbet
Hasret gülleri
Çet sitesi
SesliSohbet
Sesli Sohbet
Canli sohbet
Turkce sohbet
Kurtce Sohbet
Kurtce Chat
Kurtce Muhabbet
Kurtce Sohbet
Kurdish Chat
SesliChat
Sesli Chat
SesliSanal
Guncel Haber
sohbet Sitesi
Chat sitesi..

Term Papers said...

I’m so glad someone like you have the time, efforts and dedication writing, for this kind of article… Helpful, Useful, and Charitable.. Very nice post!

College Term Papers

DiSCo said...

Really trustworthy blog. Please keep updating with great posts like this one. I have booked marked your site and am about to email it

to a few friends of mine that I know would enjoy reading..
seslisohbet
seslichat
sesli sohbet
sesli chat
sesli
sesli site
görünlütü sohbet
görüntülü chat
kameralı sohbet
kameralı chat
sesli sohbet siteleri
sesli chat siteleri
görüntülü sohbet siteleri
görüntülü chat siteleri
kameralı sohbet siteleri
canlı sohbet
sesli muhabbet
görüntülü muhabbet
kameralı muhabbet
seslidunya
seslisehir
sesli sex

Sesli Chat said...

Really trustworthy blog. Please keep updating with great posts like this one. I have booked marked your site and am about to email it

to a few friends of mine that I know would enjoy reading..
seslisohbet
seslichat
sesli sohbet
sesli chat
sesli
sesli site
görünlütü sohbet
görüntülü chat
kameralı sohbet
kameralı chat
sesli sohbet siteleri
sesli chat siteleri
sesli muhabbet siteleri
görüntülü sohbet siteleri
görüntülü chat siteleri
görüntülü muhabbet siteleri
kameralı sohbet siteleri
kameralı chat siteleri
kameralı muhabbet siteleri
canlı sohbet
sesli muhabbet
görüntülü muhabbet
kameralı muhabbet
birsesver
birses
seslidunya
seslisehir
sesli sex