by projectramo · 10y ago · 0 comments
From the example in the text:
"They ate the pizza with anchovies"
Isn't it important to know that humans don't use anchovies to eat pizza? You need some semantics as well. Otherwise, from pure syntax, how can you tell it apart from:
"They ate the pizza with forks"
The neural network model offers a pretty compelling answer to this. The idea is that you each word is represented as a real-valued vector, and these vectors encode information about the word's meaning. So, "pizza" encodes in it that it's a type of food, and so does "anchovies". But "fork" is closer to "knife" and "spoon".
Linear models struggle with this. In a linear model, mostly, each word is an island. "fork" and "spoon" each have unique IDs, and so you'd better hope you see enough examples of each of them to understand what they mean. It helps to add semantic cluster IDs to the words as well, but this isn't quite as good as the word vectors.
What doesn't work particularly well is encoding external knowledge explicitly. Having a semantic resource that tells you explicitly that "fork" and "spoon" are members of class "cutlery". This has been tried by many people, and it produces small or no benefit.
It's actually quite easy to do this with a linear model. You use the distribution of head/relation/dependent pairs as an auxiliary distribution in a linear model. This has been done for quite some time (see my answer to your parent).
This auxiliary distribution is then estimated using machine-annotated data. Of course, a non-linear classifier using embeddings is cheaper to train ;), because you don't have to parse a lot of data ahead of time.
- Take a huge corpus.
- Parse the corpus using your parser.
- Extract head-dependent strengths according to some metric (e.g. pointwise mutual information) from the machine annotated data. These association strengths are used as an auxiliary distribution. The machine annotated data may contain erroneous analyses, but they are typically outnumbered by correct analyses[1].
- In parse disambiguation, the head-dependent strength is added as another feature (the strength is the feature value).
This idea precedes word2vec for quite some time and is also different, both in the training procedure (word2vec uses raw unannotated data, bilexical preference models use machine-annotation data) as well as the result of training (distributed word representations vs. head-dependent association strengths).
Although it's a different method, they can capture the same thing as word embeddings plus a non-linear classifier: which heads typically take which dependents. However, in contrast to word embeddings, they are effective in a linear classifier because the auxiliary distribution itself consists of combinatory features (head-dependents).
[1] E.g. consider freer word order languages. In Dutch, SVO is the preferred word order, but OVS is also permitted. A parser without such an auxiliary distribution might analyse the object as a subject in an OVS sentence. However, since SVO is much more frequent than OVS, it will learn the correct associations on a large machine-annotated corpus.
Everyone has their favorite way to think about NNs. I think of them as hyperplanes slicing up n-dim space. I just don't know how they "reason" about semantic information.
By looking at the noun in the NP embedded in the PP rather than the preposition. Whether this actually happens depends on various factors:
- In some dependency annotation schemes it's actually the head of the NP that attaches to the head with the prepositional phrase relation. Though this is uncommon, since typically the preposition is the direct dependent of the head.
- In some transition systems, attachment of a dependent is done when all its dependents are attached. So, at the moment the preposition is attached to a head, you already know what the preposition governs.
- In some transition systems, previously-made attachments can be changed (e.g. when you encounter a noun in a PP which suggests a different attachment).
- You might already look ahead in the buffer, either by having a small number of buffer positions as the input of the NN or by forming a representation of the current buffer using an RNN.
tl;dr NN can definitely learn such things, but you may have to help a bit by picking the right transition system or classifier inputs.
I rarely do this, but … citation(s) please? Who has tried it, can you point too their results? Why hasn't it worked, seems like totally the obvious solution for the next 7% gap. Why on earth wouldn't it work?
Like "bank" etc. Even "fork", "spoon" etc have multiple meanings.
He bent the fork and He could fork the Github repository
Remember the deductive reasoning puzzles when you were a kid? [0]There are some facts in these sentences and let's use some deductive reasoning to figure it out.
He followed by bent means that He has to be the subject and bent has to be the main verb of the sentence. The the following has to belong to fork. It is never not that way with grammar. I can go a lot deeper here but I'm going to keep this short. We can train any machine to deduce that fork has to be a noun and that it is a direct object of the verb bent. Fork means one thing in this sentence. It is a tool to eat with.
The modal could in the second sentence requires grammatically to have a verb following it. It not so much guessing what can fork mean, an action or an eating utensil, but rather, what is its function? He has to be a subject. If it was on the other side of the verb, it would be him. Because of the the, the Github repository has to be a noun phrase. By deduction fork has to be a verb. Therefore fork is an action of dividing into another part. Like I said before we can go deeper, for example, the capital G in Github means it is a proper noun so it can't function as a verb and the verb takes an object. Whether a verb takes an object or not can give semantic meaning to the verb too.
This is an example of how the existence of the in a phrase allows machines to deduce meanings of the same word in different sentence.
[0] http://www.prufrock.com/Assets/ClientScans/prodscanlg/193_sa...
Do you know how word2vec and other similar approaches handle this?
The major source of errors at this point are examples such as the prepositional phrase attachment ambiguity described above, which require real world knowledge (e.g. that a street is not likely to be located in a car) and deep contextual reasoning. Machine learning (and in particular, neural networks) have made significant progress in resolving these ambiguities. But our work is still cut out for us: we would like to develop methods that can learn world knowledge and enable equal understanding of natural language across all languages and contexts.
The SyntaxNet team thinks that this is indeed a major source of errors and seems to be a focus of their work going forward.
[0] - http://googleresearch.blogspot.com/2016/05/announcing-syntax...
I know, this is an ancient debate which I don't want to reanimate. Maybe the field has moved on from when I was up to date on matters.