Skip to content

Clarification on how use_sequence=True affects single_aa_score #73

@Hank-fugui

Description

@Hank-fugui

Hello, thank you very much to your team for this work and for open-sourcing the code. I am a beginner, and while reading the implementation, I encountered the following confusion.

In the function single_aa_score, residues along the backbone are decoded independently and sequentially, one residue at a time. When use_sequence is enabled, the order_mask is constructed such that only the currently scored residue has value 0, while all other residues have value 1. As a result, in the resulting decoding_order, the current residue is always placed at the first decoding position.

Consequently, in both mask_attend and mask_bw, all neighboring residues of the currently decoded residue have mask value 0. Therefore, in the update step

h_ESV = mask_bw * h_ESV + h_EXV_encoder_fw

even if h_ESV contains the true sequence features of neighboring residues, these features still seem to be completely masked out.

My confusion is: how does the model access real sequence information in this case?
It appears to me that the logic might be reversed.

I understand that this question most likely comes from my incomplete understanding of the code, but it has genuinely confused me for quite a long time. I sincerely apologize if this is a naive question, and I would greatly appreciate your clarification.

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