-
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
Awareness of inverse roles, e.g. inverse of 'domain' is 'mod' #10
Comments
mod becomes the inverse of domain quite recently so smatch hasn't caught up yet. This probably just needs a rule change. |
Personally I would rather not bake in special cases for the semantic model (AMR). Smatch has a nice, general-purpose DAG similarity metric and putting in special cases for AMR makes it less useful for non-AMR evaluation (e.g., I use it for comparing DMRSs encoded in PENMAN notation). But inverse roles do pose an issue (see below), so an optional feature enabled via a command-line switch would be nice. To describe the problem further:
Simply using an AMR-model-aware parser can solve (3) because all roles get de-inverted correctly. (1) and (2) are the more difficult cases. You can canonicalize roles as a preprocessing step to resolve To really consider These ideas are explored further in https://arxiv.org/abs/1909.01568 (disclaimer: I'm the author). |
i am attaching to this thread some earlier communication that @khlmnn and i had with the AMR folks at ISI, notably @ULFULF, about incomplete normalization of inverse roles in AMR, including a proposed patch. at the time, however, i suspect we were not thinking about the interaction of inverse roles and constant values. more on that in a separate comment.
|
regarding this is essentially, what https://github.com/cfmrp/mtool/blob/6de2366d3dff73e5a5b8a01a0f43727a8de0b2f3/codec/amr.py#L104 regarding the interactions with constants, i do not see why that (suppression of) normalization would need to be sensitive to node alignments? whether or not the source or target of a relation is constant is a static property of each individual AMR. so, assuming that one would not want constants as source nodes on (normalized) edges, why not just suppress normalization in such cases, i.e. leave something like |
https://www.isi.edu/~ulf/amr/lib/amr-dict.html#:mod documents a situation where
In hindsight it probably would have been better to use a separate role here so that |
Thanks, @oepen, for the context. I think the information in that email thread was repeated in amrisi/amr-guidelines#194 (specifically this comment). Regarding the directionality of the inverse of
If I understand you correctly, then no, that is not what I meant. The OP of this issue did not spell out why the lack of awareness of AMR's proper inverses is a problem for Smatch, so I was trying to fill in the blanks. E.g., if a gold corpus has $ cat a
(c / chapter
:mod 7)
$ cat b
(c / chapter
:domain-of 7)
$ cat c
(c / chapter
:domain 7)
$ cat d
(c / chapter)
$ python smatch.py -f a b
F-score: 0.80
$ python smatch.py -f a c
F-score: 0.67
$ python smatch.py -f a d
F-score: 0.80 The original point of my comment above, however, is that I'd prefer that these AMR-aware deinversions happen optionally or outside of Smatch proper, not only because they would otherwise diminish Smatch's (perhaps fortuitous) generality for non-AMR graphs, but because AMR continues to evolve and we probably do not want to pin a new Smatch release to be used for every AMR release. |
But his comment goes on to say: "Please also note that the inverse of :domain is :mod." I read that as an exception to the statement about primary roles. I.e. my understanding is that @goodmami I think you're saying that two non-inverse roles,
FWIW, I'm not too concerned about those issues because a) Smatch was really designed for AMR; if people can adapt it for other formalisms, then great, but I don't think implementations can anticipate all possible needs of non-AMR formalisms. I think the defaults in the implementation should reflect what we think is best for AMR specifically. b) There are no current plans for further development of (canonical, English) AMR. There are various proposed extensions but the funded project that created the Little Prince and LDC corpora has ended, and the final LDC data release from that project is scheduled for 2020. (A new and ambitious approach aiming to increase logical expressivity and incorporate typological considerations is being developed under the name UMR. The team working on this has made progress on theoretical issues, but I don't know if any of the details, including evaluation, have been worked out.) What I would like to see is a canonical Smatch implementation that developers of AMR parsers can run out-of-the-box with minimal configuration. Otherwise replicability becomes difficult. |
@nschneid ok, it sounds like we were reading that differently. Also, my interpretation has shifted from basically your position to my current one in order to reconcile with the AMRs I encountered, as well as things like
Yes. It was perhaps a happy accident that Smatch's graph matching is useful for other tasks. If we view the AMR-parsing as a separate component (as tokenization can be for BLEU), then Smatch's utility can persist beyond AMR. But, again, I don't want to push an unpopular agenda on a repo that's not mine, so I can just work with a fork if necessary.
Thanks for this context. If UMR is the next promising evolution of AMR then I'll keep an eye on that.
I wholeheartedly agree. While I advocate for the decoupling (or avoidance of coupling) of the AMR model with the graph matching, I intended for the AMR model to be the default or to be very clearly and easily accessible (e.g., an |
one more comment in this thread (as i just rediscovered it in an idle browser tab :-): i would argue that this distinction was present already in the Elementary Dependency Match (EDM) metric of Dridan & Oepen (2011), from which SMATCH derives. the difference is relevant for scoring, where a constant value is not considered as a node in its own right. in the context of the 2019 MRP Shared Task, we have formalized this distinction (and report separate statistics for each distinct type of tuple) and adopted a graphical rendering that avoids the false impression that constant values correspond to separate nodes (see also page #29 in the 2019 tutorial on graph-based meaning representations by Alexander Koller, myself, and Weiwei Sun). being reminded of this formal distinction, i now believe that the right approach for SMATCH will be to normalize |
Regarding the edge vs property distinction, it is already the case that smatch makes the distinction between triples whose target is a variable vs a constant, but it calls the latter "attributes" rather than "properties". There is no difference in weights for these in scoring, but smatch has the The trouble is when we have inverted edges whose source (on deinversion) is a constant. This issue goes beyond the Otherwise I think your proposal to normalize I still have some reservations with the wholesale normalization of |
Currently Smatch is not aware that
mod
is the inverse role ofdomain. Also it has simplistic treatment of inverse roles.
ROLE-of is always converted toROLE
.This rule in some cases produces non-existing roles, e.g., these are primary roles
consist-of
,prep-on-behalf-of
orprep-out-of
, and their reduced versions are not AMR roles.See the AMR issue
The text was updated successfully, but these errors were encountered: