-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smatch ignores triples whose source is a constant #26
Comments
the scores for your examples A and B seem correct, while C should have a precision of 2/3, right? if de-inversion generally was restricted to genuine edges (involving two nodes, not constants), the problem solved, without inventing a new type of triples? |
Yes, sorry if that was not clear. The scores I show are the current state of smatch, and not what it should be.
Ok, so you're proposing to extend the conditional deinversion as we've discussed for |
(a / alpha
:ARG0-of 1) In annotation this would be considered illegal. Does Smatch reject AMRs that are valid Penman but with parts that don't fit together according to the rules of AMR? If so I vote for rejecting this input. Otherwise I guess the rule should be "don't invert any relation whose target is a constant". |
Sorry I tried to make it clear in the issue text: this is not valid AMR but it (or something like it) is output by AMR parsers. For instance, I see
It depends on what you consider valid PENMAN. For instance,
The "inverted attributes" are bad triples but smatch does not count them against the final score, so I proposed including them in the score. @nschneid, are you proposing to discard these AMRs entirely but continue on with the next pair, or to abort the smatch process? I worry that doing the former will also lead to inflated scores over a corpus as the bad graphs are simply ignored. The latter can be frustrating for users who don't have control over the well-formedness of the inputs. But certainly we can log a warning or error so users will be aware of the issue. |
Given this, then rejecting the input seems like it could cause problems. So let's just not invert these relations involving constants. |
This issue is spun off of #10 as it's really a different issue despite also being about inverted roles.
Smatch compares triples which are deinverted, so
(a ... :ARG0-of (b ...
becomes the triple(ARG0, b, a)
(in smatch's (role, source, target) order)). If this deinversion results in a constant becoming the source, then the triple is not considered by smatch, resulting in inflated scores. While these triples may not be considered valid AMR, they are nevertheless observed in the outputs of automatic systems and should be considered during evaluation.Consider the following hypothetical AMRs as gold and as the outputs of three different systems. The triples that smatch computes (including the top triple) are in comments.
Now we compare these to the gold. The raw counts of matching triples used to compute precision and recall are in comments.
Smatch considers three types of triples: instances (e.g.,
(instance, s, see-01)
), attributes (e.g.,(polarity, a, -)
, and edges (e.g.,(ARG0, s, b)
). In all cases, the source is the variable of some node. When the source is a constant, it doesn't fit into these three categories.The straightforward fix is to ensure that inverted triples whose sources are constants (such as the
(ARG0, 1, a)
triple ofc
) are counted in the denominators for P and R, perhaps grouped in some "extra triples" category if necessary. When the role is:domain-of
or:mod-of
, however, there may be different behavior (see #10), but these can perhaps be resolved when decoding the AMR and not during the smatch computation.The text was updated successfully, but these errors were encountered: