paper-with-me

Papers

A Primal-Dual Framework for Transformers and Neural Networks

2024-06-19 · Tan M. Nguyen, Tam Nguyen, Nhat Ho, Andrea L. Bertozzi, Richard G. Baraniuk, Stanley J. Osher

Self-attention is key to the remarkable success of transformers in sequence modeling tasks including many applications in natural language processing and computer vision. Like neural network layers, these attention mechanisms are often developed by heuristics and experience. To provide a principled framework for constructing attention layers in transformers, we show that the self-attention corresponds to the support vector expansion derived from a support vector regression problem, whose primal formulation has the form of a neural network layer. Using our framework, we derive popular attention layers used in practice and propose two new attentions: 1) the Batch Normalized Attention (Attention-BN) derived from the batch normalization layer and 2) the Attention with Scaled Head (Attention-SH) derived from using less training data to fit the SVR model. We empirically demonstrate the advantages of the Attention-BN and Attention-SH in reducing head redundancy, increasing the model's accuracy, and improving the model's efficiency in a variety of practical applications including image and time-series classification.

📄 PDF Abstract BibTeX arXiv:2406.13781

Code (0)

등록된 구현이 없습니다.

Tasks

Time SeriesTime Series Classification

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
Batch Normalization 설명 없음

Similar Papers 제목 키워드 기반

Primal-Attention: Self-attention through Asymmetric Kernel SVD in Primal Representation

2023-05-31 · NeurIPS 2023 11 · Yingyi Chen, Qinghua Tao, Francesco Tonin, Johan A. K. Suykens

Recently, a new line of works has emerged to understand and improve self-attention in Transformers by treating it as a kernel machine. However, existing works apply the methods for symmetric kernels to the asymmetric sel…

D4RLLanguage ModellingLong-range modelingOffline RL+1

A Constrained Optimization Perspective of Unrolled Transformers

2026-01-24 · Javier Porras-Valenzuela, Samar Hadou, Alejandro Ribeiro arxiv

We introduce a constrained optimization framework for training transformers that behave like optimization descent algorithms. Specifically, we enforce layerwise descent constraints on the objective function and replace s…

Text ClassificationVideo Denoising

A Primal-Dual Algorithmic Framework for Constrained Convex Minimization

2014-06-20 · Quoc Tran-Dinh, Volkan Cevher

We present a primal-dual algorithmic framework to obtain approximate solutions to a prototypical constrained convex optimization problem, and rigorously characterize how common structural assumptions affect the numerical…

Constrained convex minimization via model-based excessive gap

2014-12-01 · NeurIPS 2014 12 · Quoc Tran-Dinh, Volkan Cevher

We introduce a model-based excessive gap technique to analyze first-order primal- dual methods for constrained convex minimization. As a result, we construct first- order primal-dual methods with optimal convergence rate…

model

Fair Primal Dual Splitting Method for Image Inverse Problems

2024-12-11 · Yunfei Qu, Deren Han

Image inverse problems have numerous applications, including image processing, super-resolution, and computer vision, which are important areas in image science. These application models can be seen as a three-function c…

DenoisingImage DenoisingSuper-Resolution