Project-MONAI / Project-MONAI/MONAI

Self attention with relative positional embedding

Open
#7,356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Feature request
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.
Enable relative positional embedding in attention block

Describe the solution you'd like
A constructor argument specifying which type (or None) of relative embedding to use

Describe alternatives you've considered
NA

Additional context
Should be useful for some network implementation like SAM (https://arxiv.org/abs/2304.02643, #6357 )
PR opened #7346 with suggestion for decomposed relative positional embedding (https://arxiv.org/abs/2112.01526)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attention block and the proposed implementation in PR #7346, then compare the requested constructor argument with the relative positional embedding approaches described in the linked papers. Done means the attention block supports selecting a relative embedding type or None, with behavior validated for the intended SAM-style use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.