/thinking-frameworks-skills:equivariant-architecture-designerfrom thinking-frameworks-skills
Designs neural network architectures that respect validated symmetry groups, recommending architecture families (G-CNN, steerable CNN, e3nn), layer patterns, and implementation libraries.
Ships in thinking-frameworks-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Copy this checklist and track your progress:
Architecture Design Progress:
- [ ] Step 1: Review group specification and requirements
- [ ] Step 2: Select architecture family
- [ ] Step 3: Choose specific layers and components
- [ ] Step 4: Design network topology
- [ ] Step 5: Select implementation library
- [ ] Step 6: Create architecture specification
Step 1: Review group specification and requirements
Gather the validated group specification. Confirm: which group(s) are involved, whether invariance or equivariance is needed, the data domain (images, point clouds, graphs, etc.), task type (classification, regression, generation), and any computational constraints. If group isn't specified, work with user to identify it first.
Step 2: Select architecture family
Match the symmetry group to an architecture family using Architecture Selection Guide. Key families: G-CNNs for discrete groups on grids, Steerable CNNs for continuous 2D groups, e3nn/NequIP for E(3) on point data, GNNs for permutation on graphs, DeepSets for permutation on sets. Consider trade-offs between expressiveness and efficiency.
Step 3: Choose specific layers and components
Select layer types based on Layer Patterns. For each layer decide: convolution type (regular, group, steerable), nonlinearity (compatible with the feature representation), normalization (invariant statistics and representation-compatible affine parameters), and pooling (remove only the intended group action; summing node vectors retains their rotation action). For detailed design methodology, see Methodology Details.
Step 4: Design network topology
Design the overall network structure: encoder architecture (how features are extracted), feature representations at each stage (irreps for Lie groups), pooling/aggregation strategy, output head matching task requirements. Use Topology Patterns for common designs. Balance depth vs. width for your group size.
Step 5: Select implementation library
Choose library based on Library Reference. Match to your group, framework preference (PyTorch/JAX), and performance needs. Popular choices: e3nn (E(3)/O(3), PyTorch), escnn (discrete groups, PyTorch), pytorch_geometric (permutation, PyTorch). Ensure library supports your specific group.
Step 6: Create architecture specification
Document the design using Output Template. Include: layer-by-layer specification, representation types, library dependencies, expected parameter count, and pseudo-code or actual code skeleton. This specification guides implementation and subsequent equivariance verification. For implementation skeletons with explicit input assumptions, see Code Templates. Quality criteria for this output are defined in Quality Rubric.
| Group | Domain | Recommended Architecture | Library |
|---|---|---|---|
| Cₙ, Dₙ | 2D Images | G-CNN, Group Equivariant CNN | escnn, e2cnn |
| SO(2), O(2) | 2D Images | Steerable CNN, Harmonic Networks | escnn |
| SO(3) | Spherical | Spherical CNN | e3nn, s2cnn |
| SE(3), E(3) | Point clouds | Equivariant GNN, Tensor Field Networks | e3nn, NequIP |
| Sₙ | Sets | DeepSets | pytorch, jax |
| Sₙ | Graphs | Message Passing GNN | pytorch_geometric |
| E(3) × Sₙ | Molecules | E(3) Equivariant GNN | e3nn, SchNet |
| Task | Output Type | Key Consideration |
|---|---|---|
| Classification | Invariant scalar | Use invariant pooling |
| Regression (scalar) | Invariant scalar | Same as classification |
| Segmentation | Equivariant per-point | Preserve equivariance to output |
| Force prediction | Equivariant vector | Output as l=1 irrep |
| Pose estimation | Equivariant transform | Output rotation + translation |
| Generation | Equivariant structure | Equivariant decoder |
Standard G-Convolution:
(f ⋆ ψ)(g) = ∫_G f(h) ψ(g⁻¹h) dh
Steerable Convolution:
e3nn Tensor Product Layer:
# Combine features with different angular momenta
tp = o3.FullyConnectedTensorProduct(
irreps_in1, irreps_in2, irreps_out
)
output = tp(input1, input2)
Constraint: Coordinate-wise nonlinearities need not commute with general rotation representations. ReLU is valid on even invariant scalars and permutation representations; it is not generally valid on rotating vectors or odd-parity scalars.
Solutions:
| Type | How It Works | When to Use |
|---|---|---|
| Norm-based | Scale each orthonormal irrep block by a function of its invariant norm | Equivariant vectors/tensors; preserve the block direction |
| Gated | Use invariant to gate equivariant | General purpose |
| Tensor product | Nonlinearity via Clebsch-Gordan | e3nn, high-quality |
| Invariant features | Apply arbitrary scalar nonlinearities to trivial irreps (e.g., 0e under O(3)); odd scalars need parity-compatible functions | Simple, fast |
Choose normalization from the representation and normalized axes, not its name. Ordinary BatchNorm, LayerNorm, and InstanceNorm can all break rotation equivariance when they center or independently rescale vector/tensor coordinates. They can be appropriate for scalar channels under node permutations when statistics and parameters are shared consistently.
For orthonormal irreps, use invariant block norms, shared scales within each irrep, and biases only in trivial scalar channels; for example, e3nn.nn.BatchNorm(irreps) implements representation-aware batch or instance normalization. Verify the actual training/evaluation mode and running statistics. See the e3nn normalization contract.
Pooling removes a specified action, not every symmetry automatically. Sum/mean over nodes removes node ordering but a pooled 3D vector still rotates. For a rotation-invariant scalar head, first map to trivial scalar irreps (e.g., 0e for O(3)), or use invariant norms/contractions, then aggregate. Pseudoscalars (0o) are not reflection-invariant.
| Method | Required contract |
|---|---|
| Group average | Average over a finite/compact group with normalized invariant measure; sampled grids give an approximation unless exact for the representation |
| Node sum/mean | Permutation-invariant; retains any nontrivial rotation action of the values |
| Max of norms | Invariant for orthonormal blocks; returns scalar norms, not vector directions |
| Attention pooling | Weights must be invariant to the target action and permute with nodes; values must already be invariant for a fully invariant result |
Input → [Equiv. Encoder] → Latent (equiv.) → [Equiv. Decoder] → Output
Input → [Equiv. Encoder] → Features (equiv.) → [Invariant Pool] → [MLP] → Class
Nodes → [MP Layer 1] → [MP Layer 2] → ... → [Aggregation] → Output
Groups: E(3), O(3), SO(3) Strengths: Full irrep support, tensor products, spherical harmonics Use for: Molecular modeling, 3D point clouds, physics
from e3nn import o3
irreps = o3.Irreps("2x0e + 2x1o + 1x2e") # 2 scalars, 2 vectors, 1 tensor
Groups: Discrete groups (Cₙ, Dₙ), continuous 2D (SO(2), O(2)) Strengths: Image processing, well-documented Use for: 2D images with rotation/reflection symmetry
from escnn import gspaces, nn
gspace = gspaces.rot2dOnR2(N=4) # C4 rotation group
Groups: Permutation (Sₙ) Strengths: Graphs, batching, many GNN layers Use for: Graph classification/regression, node prediction
from torch_geometric.nn import GCNConv, global_mean_pool
| Library | Groups | Framework | Notes |
|---|---|---|---|
| NequIP | E(3) | PyTorch | Molecular dynamics |
| MACE | E(3) | PyTorch | Molecular potentials |
| jraph | Sₙ | JAX | Graph networks |
| geomstats | Lie groups | NumPy/PyTorch | Manifold learning |
ARCHITECTURE SPECIFICATION
==========================
Target Symmetry: [Group name and notation]
Symmetry Type: [Invariant/Equivariant]
Task: [Classification/Regression/etc.]
Domain: [Images/Point clouds/Graphs/etc.]
Architecture Family: [e.g., E(3) Equivariant GNN]
Library: [e.g., e3nn]
Layer Specification:
1. Input Layer
- Input type: [e.g., 3D coordinates + features]
- Representation: [e.g., positions (l=1) + scalars (l=0)]
2. [Layer Name]
- Type: [Convolution/Tensor Product/Message Passing]
- Input irreps: [specification]
- Output irreps: [specification]
- Nonlinearity: [Gated/Norm/None]
3. [Continue for each layer...]
N. Output Layer
- Aggregation: [Mean/Sum/Attention]
- Output: [Invariant scalar / Equivariant vector / etc.]
Estimated Parameters: [count]
Key Dependencies: [library versions]
Code Skeleton:
[Provide implementation outline or pseudo-code]
NEXT STEPS:
- Implement the architecture using the specified library
- Verify equivariance through numerical testing after implementation
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lyndonkl/claude --plugin thinking-frameworks-skills270 skills in this plugin
/abstraction-concrete-examplesBuilds structured abstraction ladders that translate high-level principles into concrete, actionable examples across 3-5 levels. Bridges communication gaps, reveals hidden assumptions, and tests whether abstract ideas work in practice. Use when explaining concepts at different expertise levels, moving between abstract principles and concrete implementation, identifying edge cases by testing ideas against scenarios, designing layered documentation, decomposing complex problems into actionable steps, or bridging strategy-execution gaps./academic-letter-architectGuides the creation of evidence-based academic recommendation letters, reference letters, and award nominations that combine concrete examples, meaningful comparisons, and genuine enthusiasm. Use when writing recommendation letters for students, postdocs, or colleagues, or when user mentions recommendation letter, reference, nomination, letter of support, endorsement, or needs help with strong advocacy and comparative statements./adr-architectureDocuments significant architectural and technical decisions with full context, alternatives considered, trade-offs analyzed, and consequences understood. Creates a decision trail that helps teams understand why decisions were made. Use when choosing between technology options, making infrastructure decisions, establishing standards, migrating systems, or when user mentions ADR, architecture decision, technical decision record, or decision documentation.Other plugins' skills for the same job