Skip to content

Discrepancy between paper Eq.(1)/Appendix A ("sum") and fuse_feature implementation ("mean") #65

Description

@mizign

Hi, thanks for releasing the code for INP-Former — great paper and clean implementation!

I noticed a discrepancy between the paper and this repo that might be worth
clarifying, in case other reimplementations run into the same confusion.

Paper: Eq. (1) in Sec. 3.2 defines the multi-layer feature fusion as an
explicit element-wise sum:

F_Q = sum({f^1_Q, ..., f^L_Q}), where sum(·) denotes the element-wise summation.

Appendix A ("More implementation details") also describes the group-to-group
supervision strategy as "summing the features of the layers of interest to
form distinct groups."

Code: INP_Former.fuse_feature
computes the mean instead:

def fuse_feature(self, feat_list):
    return torch.stack(feat_list, dim=1).mean(dim=1)

Question: is mean the actually-intended op (and Eq. 1 / Appendix A
should say mean instead of sum), or should this be sum and the code is a
leftover from an earlier version?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions