SciML / SciML/NeuralOperators.jl

Implement Galerkin Transformer for Operator Learning

Open
#116 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.