Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Qualcomm-AI-research/geometric-algebra-transformer
/ types & classes
Types & classes
61 in github.com/Qualcomm-AI-research/geometric-algebra-transformer
⨍
Functions
452
◇
Types & classes
61
↳
Endpoints
4
↓ 24 callers
Class
EquiLinear
Pin-equivariant linear layer. The forward pass maps multivector inputs with shape (..., in_channels, 16) to multivector outputs with shape (.
gatr/layers/linear.py:15
↓ 14 callers
Class
MLPConfig
Geometric MLP configuration. Parameters ---------- mv_channels : iterable of int Number of multivector channels at each layer, fr
gatr/layers/mlp/config.py:10
↓ 13 callers
Class
SelfAttentionConfig
Configuration for attention. Parameters ---------- in_mv_channels : int Number of input multivector channels. out_mv_channels
gatr/layers/attention/config.py:10
↓ 10 callers
Class
GATr
GATr network for a data with a single token dimension. This, together with gatr.nets.axial_gatr.AxialGATr, is the main architecture proposed in o
gatr/nets/gatr.py:20
↓ 8 callers
Class
GradeDropout
Grade dropout for multivectors (and regular dropout for auxiliary scalars). Parameters ---------- p : float Dropout probability.
gatr/layers/dropout.py:13
↓ 5 callers
Class
GeoMLP
Geometric MLP. This is a core component of GATr's transformer blocks. It is similar to a regular MLP, except that it uses geometric bilinears
gatr/layers/mlp/mlp.py:17
↓ 3 callers
Class
ApplyRotaryPositionalEncoding
Applies rotary position encodings (RoPE) to scalar tensors. References ---------- Jianlin Su et al, "RoFormer: Enhanced Transformer with
gatr/layers/attention/positional_encoding.py:27
↓ 3 callers
Class
EquiLayerNorm
Equivariant LayerNorm for multivectors. Rescales input such that `mean_channels |inputs|^2 = 1`, where the norm is the GA norm and the mean g
gatr/layers/layer_norm.py:13
↓ 3 callers
Class
GATrBlock
Equivariant transformer block for GATr. This is the biggest building block of GATr. Inputs are first processed by a block consisting of Laye
gatr/layers/gatr_block.py:17
↓ 3 callers
Class
GCAGNNLayer
GCA-GNN layer as described in D. Ruhe et al. This was described in "Geometric Clifford Algebra Networks" by D. Ruhe et. al, and in private co
gatr/baselines/gcan.py:166
↓ 3 callers
Class
SelfAttention
Geometric self-attention layer. Constructs queries, keys, and values, computes attention, and projects linearly to outputs. Parameters -
gatr/layers/attention/self_attention.py:19
↓ 3 callers
Class
SlowRandomPinTransform
Random Pin transform on a multivector torch.Tensor. Slow, only used for testing purposes. Breaks computational graph.
gatr/utils/clifford.py:104
↓ 2 callers
Class
AxialGATr
Axial GATr network for two token dimensions. This, together with gatr.nets.gatr.GATr, is the main architecture proposed in our paper. It com
gatr/nets/axial_gatr.py:22
↓ 2 callers
Class
BaselineTransformerBlock
Baseline transformer block. Inputs are first processed by a block consisting of LayerNorm, multi-head self-attention, and residual connection
gatr/baselines/transformer.py:236
↓ 2 callers
Class
GCAMLP
GCA-MLP model. As described in D. Ruhe et al, "Geometric Clifford Algebra Networks". Based on layers from the official [cliffordlayers co
gatr/baselines/gcan.py:37
↓ 2 callers
Class
GeometricAttention
Geometric attention layer. This is the main attention mechanism used in GATr. Thanks to the nonlinear features, the scaled-dot-product attent
gatr/layers/attention/attention.py:14
↓ 2 callers
Class
GeometricBilinear
Geometric bilinear layer. Pin-equivariant map between multivector tensors that constructs new geometric features via geometric products and t
gatr/layers/mlp/geometric_bilinears.py:14
↓ 2 callers
Class
PythonPackage
Functionality related to installing the Python code given as a repo.
docker/ext_packages/install_upstream_python_packages.py:54
↓ 2 callers
Class
ScalarGatedNonlinearity
Gated nonlinearity, where the gate is simply given by the scalar component of the input. Given multivector input x, computes f(x_0) * x, where f
gatr/layers/mlp/nonlinearities.py:11
↓ 1 callers
Class
ArteryExperiment
Experiment manager for wall-shear-stress estimation in arteries. The dataset was introduced and is described in Suk et al, "Mesh Convolutional Ne
gatr/experiments/arteries/experiment.py:18
↓ 1 callers
Class
BaselineAxialTransformer
Baseline axial transformer for data with two token dimensions. Combines num_blocks transformer blocks, each consisting of multi-head self-attenti
gatr/baselines/transformer.py:413
↓ 1 callers
Class
BaselineLayerNorm
Baseline layer norm over all dimensions except the first.
gatr/baselines/transformer.py:21
↓ 1 callers
Class
BaselineSelfAttention
Baseline self-attention layer. Parameters ---------- in_channels : int Number of input channels. out_channels : int N
gatr/baselines/transformer.py:128
↓ 1 callers
Class
BaselineTransformer
Baseline transformer. Combines num_blocks transformer blocks, each consisting of multi-head self-attention layers, an MLP, residual connectio
gatr/baselines/transformer.py:326
↓ 1 callers
Class
CompiledLinear
A drop-in replacement for EquiLinear for fast inference. Not trainable. Parameters must be set by hand. Parameters ---------- in_mv_
gatr/utils/compile_linear.py:15
↓ 1 callers
Class
CrossAttention
Geometric cross-attention layer. Constructs queries, keys, and values, computes attention, and projects linearly to outputs. Parameters
gatr/layers/attention/cross_attention.py:17
↓ 1 callers
Class
MultiQueryQKVModule
Compute (multivector and scalar) queries, keys, and values via multi-query attention. Parameters ---------- config: SelfAttentionConfig
gatr/layers/attention/qkv.py:100
↓ 1 callers
Class
NBodyDataset
N-body prediction dataset. Loads data generated with generate_nbody_dataset.py from disk. Parameters ---------- filename : str or pa
gatr/experiments/nbody/dataset.py:7
↓ 1 callers
Class
NBodyExperiment
Experiment manager for n-body prediction. Parameters ---------- cfg : OmegaConf Experiment configuration. See the config folder i
gatr/experiments/nbody/experiment.py:11
↓ 1 callers
Class
NBodySimulator
Simulator for the n-body dataset. Each sample consists of the positions of a n particicles (1 star and n - 1 planets), both before and after
gatr/experiments/nbody/simulator.py:9
↓ 1 callers
Class
NaNError
Exception to be raise when the training encounters a NaN in loss or model weights.
gatr/utils/misc.py:16
↓ 1 callers
Class
NumberedVesselDataset
Artery dataset with added shape id attribute.
gatr/experiments/arteries/dataset.py:13
↓ 1 callers
Class
QKVModule
Compute (multivector and scalar) queries, keys, and values via multi-head attention. Parameters ---------- config: SelfAttentionConfig
gatr/layers/attention/qkv.py:11
↓ 1 callers
Class
RotationDataset
A dataset containing random (S)O(3) elements. Parameters ---------- num : int Size of the dataset (number of rotations) speci
gatr/experiments/arteries/dataset.py:25
↓ 1 callers
Class
SegnnPackage
Special installation for the segnn package required. The reason is that rope fails to move all files (utils.py). As we are only interested in
docker/ext_packages/install_upstream_python_packages.py:211
↓ 1 callers
Class
XFormersDatasetWrapper
Wrapper that turns a torch Dataset into a torch_geometric-compatible version. Assumes that the wrapped dataset returns tuples (x, y), and wraps t
tests_regression/regression_helpers.py:6
↓ 1 callers
Class
XFormersModelWrapper
Wrapper that turns a "plain" GATr wrapper into one that uses xformers.
tests_regression/regression_helpers.py:23
Class
ArteryBaselineWrapper
Wraps around simple baselines (like a Transformer) for the artery experiment. We use the following parameterization of the artery mesh: - the
gatr/experiments/arteries/wrappers.py:28
Class
ArteryGATrWrapper
Wraps around GATr for the arterial wall-shear-stress prediction experiment. Parameters ---------- net : torch.nn.Module GATr mode
gatr/experiments/arteries/wrappers.py:53
Class
BaseExperiment
Base experiment manager class. To be subclassed by experiment-specific manager classes. Parameters ---------- cfg : OmegaConf
gatr/experiments/base_experiment.py:40
Class
BaseWrapper
Base GATr wrapper. To be subclassed by experiment-specific wrapper classes. Parameters ---------- net : torch.nn.Module GATr
gatr/experiments/base_wrapper.py:7
Class
ConnectPointsDataset
Toy dataset that maps two points x, y to the vector t = y - x between them.
tests_regression/regression_datasets/connect_points.py:10
Class
ConnectPointsWrapper
Wrapper around GATr networks for ConnectPointsDataset.
tests_regression/regression_datasets/connect_points.py:34
Class
GATrDeprecationWarning
Warning about a deprecation in the GATr library.
gatr/utils/warning.py:5
Class
GCAGNN
GCA-GNN model as described in D. Ruhe et al. The model was described in "Geometric Clifford Algebra Networks" by D.Ruhe et al., and in privat
gatr/baselines/gcan.py:231
Class
MLP
A simple baseline MLP. Flattens all dimensions except batch and uses GELU nonlinearities.
gatr/baselines/mlp.py:10
Class
MultiHeadQKVLinear
Compute queries, keys, and values via multi-head attention. Parameters ---------- in_channels : int Number of input channels.
gatr/baselines/transformer.py:41
Class
MultiQueryQKVLinear
Compute queries, keys, and values via multi-query attention. Parameters ---------- in_channels : int Number of input channels.
gatr/baselines/transformer.py:81
Class
NBodyBaselineWrapper
Wraps around simple baselines (MLP or Transformer) for the n-body prediction experiment. Parameters ---------- net : torch.nn.Module
gatr/experiments/nbody/wrappers.py:137
Class
NBodyGATrWrapper
Wraps around GATr for the n-body prediction experiment. Parameters ---------- net : torch.nn.Module GATr model that accepts input
gatr/experiments/nbody/wrappers.py:61
Class
NBodyGCANWrapper
Wraps around GCA-MLP and GCA-GNN baselines for the n-body experiment. Parameters ---------- net : torch.nn.Module GCAN model that
gatr/experiments/nbody/wrappers.py:400
Class
NBodySE3TransformerWrapper
Wraps around the SE3-Transformer baseline for the n-body prediction experiment. Parameters ---------- net : torch.nn.Module SE3-T
gatr/experiments/nbody/wrappers.py:288
Class
NBodySEGNNWrapper
Wraps around the SEGNN baseline for the n-body prediction experiment. Parameters ---------- net : torch.nn.Module SEGNN model tha
gatr/experiments/nbody/wrappers.py:172
Class
PointsDistanceDataset
Toy dataset that maps two points X, Y to the Euclidean distance |X - Y|.
tests_regression/regression_datasets/points_distance.py:10
Class
PointsDistanceWrapper
Wrapper around GATr networks for PointsDistanceDataset.
tests_regression/regression_datasets/points_distance.py:36
Class
SEGNNModel
SEGNN baseline. We restrict ourselves to vector and scalar inputs, as those were sufficient for our experiments. References ----------
gatr/baselines/segnn.py:50
Class
TranslatePointDataset
Toy dataset that maps a point x and a translation vector t to the translated point t+x.
tests_regression/regression_datasets/translate_point.py:10
Class
TranslatePointWrapper
Wrapper around GATr networks for TranslatePointDataset.
tests_regression/regression_datasets/translate_point.py:36
Class
TranslationNormDataset
Toy dataset that maps a translation vector t to its Euclidean norm |t|.
tests_regression/regression_datasets/translation_norm.py:10
Class
TranslationNormWrapper
Wrapper around GATr networks for TranslationNormDataset.
tests_regression/regression_datasets/translation_norm.py:34
Class
gatr_cache
Serves as a `torch.compile`-compatible replacement for `@functools.cache()`.
gatr/utils/einsum.py:52