SciML / SciML/NeuralOperators.jl
Implement Galerkin Transformer for Operator Learning
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 41
- Forks
- 15
- Avg merge
- 13h 14m
- Merged PRs (30d)
- 12
Description
Summary
Implement the Galerkin Transformer, which replaces softmax attention with linear attention inspired by Petrov-Galerkin projection for PDE operator learning.
Reference
- Cao, "Choose a Transformer: Fourier or Galerkin," NeurIPS 2021. arXiv:2105.14995
Description
The Galerkin Transformer removes softmax normalization from attention and uses Q(K^T V) (Galerkin-type) or (QK^T)V (Fourier-type) attention, which mimics Petrov-Galerkin projection in finite element methods. This achieves significant improvements in training cost and accuracy compared to softmax-normalized counterparts for operator learning tasks.
Key features:
- Linear attention (no softmax) with O(n) complexity
- Galerkin-type: Q(K^T V) — analogous to Petrov-Galerkin projection
- Fourier-type: (QK^T)V — analogous to Fourier integral operator
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced Cao paper and the existing NeuralOperators.jl attention and operator-learning entry points. Define the Galerkin and Fourier linear-attention variants described in the issue, including their expected complexity and normalization behavior. Done means both variants are implemented and validated against the operator-learning use cases, with accuracy and training-cost comparisons to the softmax counterpart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100