{"url":"/method/sortcut-sinkhorn-attention","slug":"sortcut-sinkhorn-attention","name":"SortCut Sinkhorn Attention","full_name":"SortCut Sinkhorn Attention","full_name_withheld":false,"description_markdown":"**SortCut Sinkhorn Attention** is a variant of [Sparse Sinkhorn Attention](https://paperswithcode.com/method/sparse-sinkhorn-attention) where a post-sorting truncation of the input sequence is performed, essentially performing a hard top-k operation on the input sequence blocks within the computational graph. While most attention models mainly re-weight or assign near-zero weights during training, this allows for explicitly and dynamically truncate the input sequence. Specifically:\r\n\r\n$$ Y = \\text{Softmax}\\left(Q{\\psi\\_{S}}\\left(K\\right)^{T}\\_{\\left[:n\\right]}\\right)\\psi\\_{S}\\left(V\\right)\\_{\\left[:n\\right]} $$\r\n\r\nwhere $n$ is the Sortfut budget hyperparameter.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Sparse Sinkhorn Attention","paper":"/paper/sparse-sinkhorn-attention","first_author":"Yi Tay","n_authors":5,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/sparse-sinkhorn-attention"},"source":{"url":"https://arxiv.org/abs/2002.11296v1","title":"Sparse Sinkhorn Attention","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/lucidrains/sinkhorn-transformer/blob/3eaa76e99efeee75cf8298defaaef51621c55ff4/sinkhorn_transformer/sinkhorn_transformer.py#L286","code_snippet_url_on_a_code_host":true,"categories":[{"area":"General","area_id":"general","collection":"Attention Mechanisms","url":"/methods/category/attention-mechanisms","pwc_aliases":["attention-mechanisms-1"]}],"n_papers_tagged":1,"archive_num_papers":1,"papers_newest_first":[{"paper":"/paper/sparse-sinkhorn-attention","title":"Sparse Sinkhorn Attention","date":"2020-02-26","arxiv_id":"2002.11296","n_code_links":1,"syntology":null}],"papers_shown":1,"tasks":[{"task":"/task/document-classification","name":"Document Classification","papers":1},{"task":"/task/image-generation","name":"Image Generation","papers":1},{"task":"/task/language-modeling","name":"Language Modeling","papers":1},{"task":"/task/language-modelling","name":"Language Modelling","papers":1},{"task":"/task/natural-language-inference","name":"Natural Language Inference","papers":1}],"tasks_shown":5,"n_tasks":5,"usage_by_year":[{"year":"2020","papers":1}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/sortcut-sinkhorn-attention"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}