[ENH] dual-encoder architecture for protein-conditioned aptamer generation#539
Open
NoorMajdoub wants to merge 1 commit into
Open
[ENH] dual-encoder architecture for protein-conditioned aptamer generation#539NoorMajdoub wants to merge 1 commit into
NoorMajdoub wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Addresses #131
What does this implement/fix? Explain your changes.
Implements initial version of AptaMLM: a dual-encoder architecture for protein-conditioned aptamer generation, adapting the PepMLM approach to nucleic acids as discussed in #131.
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Forward pass and MLM loss verified to run. Formal unit tests not yet .(Check the notebook in the mentionned repo)
Any other comments?
This is a an initial architecture implementation , the training loop is not yet finalised as I didn't confirm the decoding strategy .
Tried to combine the structure from the PepMLM paper discussed in the the issue #131 with the paper BAnG that I believe can help this approach (https://arxiv.org/abs/2502.21274) (BAnG: Bidirectional Anchored Generation for Conditional RNA Design)
Before reviewing this code ,I would recommend checking the notebook and read me in this repo as they provide a clearer implementation walkthrough with execution results: https://github.com/NoorMajdoub/pyaptamer_dual_encoder
PS: Also tried to implement contrastive loss to address the issue of scarcity of positive samples mentioned in the issue , and to make use of the negative samples in the dataset.
PR checklist
pre-commit install.To run hooks independent of commit, execute
pre-commit run --all-files