NOTIX is a specification and documentation effort designed to bring order, consistency, and clarity to the ever-expanding universe of neural network operations. It sits comfortably between systems engineering, compiler design, hardware abstraction, and a touch of computational biology. If that sounds unusual… well, that’s the point.
Kingdom I
Tensor Topology & Flow
8 branches74 documented entries
Operations that rearrange, slice, merge, pad, or route tensors without changing the value of individual elements (except where padding introduces new values). These are the shape, layout, and routing primitives of a graph.
Operations whose primary effect is a linear map between vector spaces, optionally followed by simple bias addition. This includes dense layers, structured linear transforms, and embedding lookups. Dense-with-bias is represented by the composition MatMul → broadcast Add; its familiar dense names do not define another atomic species.
Operations that compute over local neighborhoods in space, time, or other structured domains. This includes convolutions, pooling, up/down-sampling, and classical signal transforms when applied locally.
Operations that explicitly model context, order, or temporal structure across positions. This includes attention mechanisms, sequence/state-space models, recurrent units, and explicit memory/cache operations.
Operations that normalize, scale, or calibrate activations or probabilities without changing the underlying topology. This includes feature-wise normalization, magnitude scaling, and probability calibration transforms.
Operations that apply a nonlinear scalar function to each element of a tensor, possibly with simple per-channel or per-element parameters. These are the classical “activations,” but classified more precisely.
Operations that introduce stochastic behavior or modify data to improve robustness, regularization, or invariance. This includes noise injection, drop mechanisms, and data augmentation operators expressed at the operation level.
Operations that define objectives, learning rules, gradient transforms, schedules, and quantization/compression mechanics. This kingdom captures how models are trained and how parameters and representations are discretized or compressed.
Changes how a tensor is organized without changing which numbers are in it. Like taking a deck of 52 cards and arranging them into 4 rows of 13 instead of 13 rows of 4.
Purpose
Different operations expect data in different shapes. Reshape lets you reorganize your data to match what the next operation needs.
Common uses
Converting a 2D image (height × width) into a 1D list of pixels before feeding it to a fully-connected layer
Rearranging a batch of sequences from (batch, time, features) to (time, batch, features)
What it's NOT
Not a mathematical transform – Reshape doesn't calculate anything; it just rearranges
Not pooling or downsampling – Reshape keeps all the same values; it doesn't reduce or combine them
Not transpose – While both change organization, transpose specifically swaps axes, while reshape can do arbitrary reorganization
Analogy
Imagine you have books on a shelf. Reshape is like taking the same books and putting them on different shelves—same books, different arrangement.
Takes a multi-dimensional tensor and stretches it out into a single long row (or sometimes a 2D table). Like unrolling a sheet of paper that was folded multiple times.
Purpose
Many operations (especially older-style neural network layers) expect data as a simple list. Flatten converts complex structures like images or feature maps into that simple format.
Common uses
Converting the output of convolutional layers (which produce 3D feature maps) into a 1D vector before classification
Preparing batched data where each item needs to become a single vector
Simplifying data before feeding it to traditional machine learning algorithms
What it's NOT
Not dimensionality reduction – Flatten doesn't remove information or compress data; it just linearizes it
Not pooling – Flatten keeps every single value; pooling would combine or select values
Not feature extraction – Flatten is purely organizational; it doesn't create new features or select important ones
Analogy
Think of a 3D Rubik's cube. Flatten would be like carefully unfolding it into a long strip of colored squares laid out in a line—same squares, just in a different arrangement.
Swaps or rotates the axes (dimensions) of a tensor. For a 2D matrix, this means swapping rows and columns. For higher dimensions, it can mean any reordering of axes.
Purpose
Different operations expect data organized in different orders. Transpose lets you rearrange axes to match what's needed.
Common uses
Converting between row-major and column-major matrix storage
Reordering batch/sequence/feature dimensions for different model architectures
Preparing matrices for matrix multiplication (which often requires one matrix to be transposed)
What it's NOT
Not reshape – Transpose specifically reorders axes; reshape can change dimensions entirely
Not a rotation (in image sense) – Transpose swaps axes; rotating an image 90° is different
Not a flip or reverse – Transpose changes axis order; it doesn't reverse the values along an axis
Analogy
Imagine a spreadsheet. Transpose is like turning it 90 degrees so rows become columns and columns become rows. The same data, just oriented differently.
A generalization of transpose that can reorder axes in any pattern, not just swapping two. Like shuffling the order of coordinates.
Purpose
Complex neural architectures often need data organized in specific axis orders. PermuteAxes provides full flexibility to rearrange dimensions however needed.
Common uses
Converting between different data layout conventions (NCHW ↔ NHWC for images)
Reordering time/batch/feature dimensions for sequence models
Preparing data for operations that expect specific axis orderings
What it's NOT
Not sorting – PermuteAxes rearranges which axis is which, not the values within axes
Not reshape – The size of each dimension stays the same; only their order changes
Not limited to 2D – Unlike simple transpose, works with any number of dimensions
Analogy
Think of a filing cabinet with drawers labeled by year, then month, then category. PermuteAxes would let you reorganize it to category, then year, then month—same files, different organizational structure.
Extracts a continuous rectangular region from a tensor. Like cutting a piece out of a larger sheet of paper.
Purpose
Often you only need part of your data—a specific time range, a crop of an image, or a subset of features. Slice lets you extract exactly the region you want.
Common uses
Extracting a spatial crop from an image
Getting a specific time window from a sequence
Selecting a subset of features or channels
Implementing operations like padding or cropping
What it's NOT
Not filtering – Slice extracts a geometric region, not values meeting a condition
Not sampling – Slice takes a continuous block, not scattered positions
Not pooling – Slice selects data, doesn't combine or reduce it
Analogy
Like using scissors to cut out a rectangular section from a newspaper. You get that exact section, nothing more, nothing less.
Pure matrix multiplication without bias. Takes two matrices and multiplies them following standard linear algebra rules.
Purpose
The mathematical foundation of many neural network operations. Used whenever you need to combine or transform features through multiplication.
Common uses
Atomic matrix product inside dense-with-bias compositions, attention, and other layers
Combining different representations
Projecting data into new coordinate systems
Implementing mathematical operations that can be expressed as matrix products
What it's NOT
Not element-wise multiplication – MatMul combines across dimensions; element-wise multiplies corresponding positions
Not bias addition – A dense-with-bias alias connects this product to atomic Add; using a matrix as learned weights does not create a new matrix-product primitive
Not convolution – While convolution can be expressed as matrix multiplication, it has different semantics
Analogy
Like a factory production line where raw materials (inputs) go through a transformation machine (weight matrix) to become products (outputs). The machine's configuration determines what comes out.
composition alias for MatMul → broadcast Add, not an atomic DenseAffine species. Native dense_bias_fp32 (0x1000) uses X[batch,in], W[in,out], and b[out] to compute Y = X W + b. Used for non-sequential models such as MLPs.
This taxonomy entry does not have an article in the current Species Encyclopedia.
dense layer applied independently per sequence position. Shape: [batch, seq_len, in] → [batch, seq_len, out]. For LLM FFN blocks. Also known as: Position-wise FFN, TimeDistributed Dense, 1×1 convolution over sequence. Distinction from Dense: Dense treats input as [batch, features]; SequentialDense treats input as [batch, seq_len, features] and applies the same linear transform to each position independently. These dense names describe how the composition is applied; bias addition remains atomic Add rather than a new primitive hidden inside a dense species.
This taxonomy entry does not have an article in the current Species Encyclopedia.
Approximates a large weight matrix using two smaller matrices multiplied together. Reduces parameters while maintaining expressiveness for many tasks.
Purpose
Compressing models by exploiting the fact that many weight matrices have low intrinsic dimensionality. Fewer parameters, faster computation.
Common uses
Compressing large language models
Adapter layers in transfer learning (LoRA)
Reducing parameters in attention mechanisms
Memory-efficient fine-tuning
What it's NOT
Not pruning – Restructures the matrix, doesn't zero out weights
Not quantization – Uses full precision but fewer total values
Not always lossless – Trades some capacity for efficiency
Analogy
Like summarizing a detailed map with simpler directions. Instead of storing every street, you store major routes (low rank) and can still get most places.
Converts discrete IDs (like word IDs or categorical values) into continuous vectors by looking them up in a learned table. Each ID gets its own learned vector.
Purpose
Representing discrete items (words, categories, users, items) as continuous vectors that can be used in neural networks. The vectors learn to capture semantic relationships.
Common uses
Word embeddings in natural language processing (converting words to vectors)
User/item embeddings in recommendation systems
Categorical feature representations
Any situation where discrete identities need continuous representations
What it's NOT
Not one-hot encoding – Embeddings are learned dense vectors; one-hot creates sparse fixed vectors
Not feature extraction – Embeddings are learned representations, not extracted features
Not compression – While embeddings can be smaller than one-hot, that's not their primary purpose
Analogy
Like a phonebook where you look up a name (ID) and get back a full address and phone number (vector). Each person has their own unique entry, and you learn what information to store for each.
rotary positional embedding. Note: RoPE is not a standalone operation. It is a positional encoding mechanism fused into attention kernels (SELF_ATTENTION, GQA, MQA). Attention species that use RoPE document this in their hyperparameters. There is no separate RoPE kernel.
This taxonomy entry does not have an article in the current Species Encyclopedia.
Slides a small pattern-detector (kernel) across a 2D image, computing how much the kernel matches each local region. Like checking every spot in an image for a specific feature.
Purpose
Detecting local patterns (edges, textures, shapes) while being invariant to exactly where they appear. The foundation of computer vision.
Common uses
Building convolutional neural networks for image classification
Detecting edges, corners, and textures in images
Creating feature maps that capture visual patterns
Any task involving spatial data (images, video, maps)
What it's NOT
Not fully-connected – Convolution only looks at local neighborhoods, not all inputs
Not template matching – While similar in spirit, convolution is differentiable and learns optimal patterns
Analogy
Like checking every 3×3 square in a puzzle to see if it matches certain patterns you're looking for (vertical edge, horizontal edge, corner, etc.). You slide your pattern-checker across the whole puzzle.
Convolution where each channel is processed separately, rather than mixing all channels together. Like having independent filters for red, green, and blue in an RGB image.
Purpose
Efficiency—reduces computation while often maintaining performance. First step in separable convolutions.
Common uses
Mobile and efficient neural network architectures (MobileNet)
First stage of depthwise-separable convolutions
Situations where channel-mixing and spatial-filtering should be separate
Resource-constrained environments
What it's NOT
Not regular convolution – Doesn't mix channels, processes each independently
Not channel-wise pooling – Still uses learned kernels, not fixed pooling operations
Not pointwise convolution – Depthwise has spatial kernels; pointwise is 1×1
Analogy
Imagine processing a color photo. Regular convolution uses all three color channels together. Depthwise convolution processes red, green, and blue separately with their own filters.
A 1×1 convolution that mixes channels at each spatial position without looking at neighbors. Like remixing colors at each pixel independently.
Purpose
Changing the number of channels, learning optimal channel combinations, reducing or expanding dimensionality.
Common uses
Changing feature map depth (reducing 256 channels to 64, etc.)
Second stage of depthwise-separable convolutions
Bottleneck layers in efficient architectures
Learning optimal combinations of features
What it's NOT
Not spatial convolution – Pointwise only mixes channels, doesn't look at spatial neighbors
Not just dimension reduction – While it can reduce dimensions, it learns how to do so optimally
Not a dense-with-bias composition – Works on spatial feature maps, although both use weighted combinations
Analogy
Like having multiple paint colors at each spot and mixing them according to learned recipes—each location gets its own custom color mix, but the mixing doesn't consider neighboring spots.
Reduces each feature map to a single number by averaging all spatial positions. Collapses all spatial dimensions into one global summary per channel.
Purpose
Converting spatial feature maps into fixed-size vectors for classification, while maintaining translation invariance.
Common uses
Final layer before classification (alternative to flattening + dense)
Reducing spatial feature maps to global descriptors
Enforcing translation invariance for entire objects
Reducing parameters compared to fully-connected layers
What it's NOT
Not flatten – Averages across space; flatten keeps all spatial positions
Not attention-based pooling – Uses uniform averaging, not learned importance
Not max pooling – Uses average of all positions, not maximum
Analogy
Like describing a photograph by the average color in the whole image. You lose spatial detail but get a summary that doesn't depend on exact positioning.
Runs multiple independent attention mechanisms in parallel (heads), then combines their results. Like having multiple simultaneous conversations about different aspects of the data.
Purpose
Allowing the model to attend to different types of information simultaneously (syntax, semantics, long-range, short-range, etc.).
Common uses
Transformer models (BERT, GPT, ViT, etc.)
Any architecture needing rich contextual understanding
Models that benefit from capturing multiple relationship types
Modern sequence-to-sequence architectures
What it's NOT
Not just multiple attention layers stacked – The heads run in parallel at the same layer, not sequentially
Not ensemble of models – The heads are trained jointly as one model
Not necessarily more attention on the same things – Different heads can learn different patterns
Analogy
Like having a team review a document where each person focuses on different aspects simultaneously—one checks grammar, one checks facts, one checks flow—then they combine their insights.
A variant of multi-head attention where multiple query heads share the same key and value heads, reducing computational cost while maintaining most of the benefit.
Purpose
Achieving better efficiency than full multi-head attention while retaining more representational power than multi-query attention.
Common uses
Large language models where memory and computation are expensive
Situations balancing quality and efficiency
Production deployments of transformer models
Models that need many query perspectives but can share keys/values
What it's NOT
Not regular multi-head attention – Shares keys/values across query groups
Not multi-query attention – Has multiple key/value groups, not just one
Not a training trick – This is an architectural choice affecting the model permanently
Analogy
Like a library where instead of each student having their own complete card catalog (expensive), small groups of students share a card catalog (efficient) but still look up different things (expressive).
The simplest recurrent network. Maintains hidden state and updates it at each time step using a simple linear transformation plus nonlinearity.
Purpose
The foundational recurrent architecture. Mostly historical now, but helps understand more complex RNNs.
Common uses
Teaching and understanding recurrent networks
Simple sequence tasks where LSTM is overkill
Theoretical analysis of recurrent dynamics
Rarely used in modern production systems
What it's NOT
Not LSTM or GRU – Lacks gating mechanisms
Not practical for long sequences – Suffers badly from vanishing/exploding gradients
Not attention – Sequential processing with hidden state
Analogy
Like passing a message through a line of people where each person slightly changes the message before passing it on—by the end, the original message (gradient) may be completely garbled.
A recurrent unit with special gates that control what information to remember, forget, and output. Processes sequences one step at a time while maintaining a memory cell.
Purpose
Capturing sequential dependencies while avoiding the vanishing gradient problem that affects simple RNNs. Selective memory allows learning very long-term patterns.
Common uses
Processing text sequences before transformers became dominant
Time series prediction and forecasting
Speech recognition and generation
Any sequential task requiring memory of distant past
What it's NOT
Not attention – LSTM has fixed-size memory and processes sequentially; attention can look anywhere in parallel
Not stateless – LSTM carries hidden state forward through the sequence
Not a simple RNN – Has specialized gating mechanisms that simple RNNs lack
Analogy
Like taking notes while reading a book. You have a memory (cell state) where you decide what to write down (input gate), what old notes to erase (forget gate), and what to tell someone asking about the book (output gate).
A simpler alternative to LSTM with fewer gates (just reset and update gates), but still capable of learning long-term dependencies.
Purpose
Providing the benefits of LSTM with fewer parameters and simpler computation, often matching LSTM performance with less overhead.
Common uses
Same applications as LSTM but where simplicity is valued
Situations where LSTM's full complexity isn't needed
Resource-constrained environments
Faster training than LSTM due to fewer parameters
What it's NOT
Not LSTM – Has different and simpler gating mechanism
Not better than LSTM universally – Sometimes matches, sometimes worse, depends on task
Not attention – Still sequential processing with fixed memory
Analogy
Like a simpler note-taking system: instead of separate "what to forget" and "what to remember" decisions, you make combined decisions about updating your notes.
Normalizes each example independently across its features, subtracting the mean and dividing by standard deviation, then applying learned scale and shift.
Purpose
Stabilizing training by ensuring features have consistent scale within each example. Essential for transformer architectures.
Common uses
Transformer models (normalization within each token's features)
Recurrent networks
Any architecture where batch size is small or variable
Situations where normalization should be independent per example
What it's NOT
Not batch normalization – Normalizes per example across features, not across batch per feature
Not just standardization – Includes learned scale/shift parameters after normalization
Not L2 normalization – Uses mean and std for normalization, not vector magnitude
Analogy
Like grading students on a curve, but doing it separately for each student's different subjects. Each student gets their own mean/std, ensuring fair comparison across their subjects.
Normalizes each feature across the batch, subtracting the batch mean and dividing by batch standard deviation, with learned scale and shift.
Purpose
Accelerating training by reducing internal covariate shift. Makes networks less sensitive to initialization and learning rates.
Common uses
Convolutional neural networks for computer vision
Deep networks where training stability is important
After convolutional or dense layers (typically before activation)
Any architecture with large, fixed batch sizes
What it's NOT
Not layer norm – Normalizes across batch per feature, not per example across features
Not dropout – BatchNorm normalizes, doesn't randomly zero elements
Not guaranteed to help every architecture – Works great for CNNs, less effective for transformers
Analogy
Like ensuring all thermometers in a room show similar distributions—you normalize each thermometer's reading against what all other thermometers at that location are showing.
Divides channels into groups and normalizes within each group. Hybrid between LayerNorm and BatchNorm.
Purpose
Providing normalization that works well with small batches, avoiding batch dependence while being more flexible than layer norm.
Common uses
Object detection and segmentation where batch sizes are small
Situations where batch statistics are unreliable
Architectures needing normalization flexibility
Transfer learning where test batches differ from training
What it's NOT
Not batch norm – Doesn't use batch statistics
Not layer norm – Normalizes within groups of channels, not all channels
Not instance normalization – Groups can have multiple channels; instance norm is per-channel
Analogy
Like organizing a large class into small discussion groups and grading on a curve within each group, rather than across the whole class (batch) or per individual (layer).
Scales each vector to have unit length (magnitude of 1) without changing its direction.
Purpose
Making comparisons based on direction rather than magnitude. Essential for similarity metrics and certain loss functions.
Common uses
Face recognition (comparing face embeddings by angle, not magnitude)
Metric learning and similarity-based tasks
Before cosine similarity computations
Creating unit-norm embeddings
What it's NOT
Not LayerNorm – Only normalizes magnitude, doesn't center or use standard deviation
Not softmax – Doesn't convert to probabilities, just ensures unit length
Not whitening – Doesn't decorrelate features
Analogy
Like normalizing all arrows to be the same length while keeping them pointing in their original directions. Only the direction matters, not how long they were.
Constrains values to be within a specified range, setting anything too small to the minimum and anything too large to the maximum.
Purpose
Preventing extreme values that could destabilize training or cause numerical issues.
Common uses
Clipping gradients during training to prevent explosions
Constraining outputs to valid ranges
Implementing certain activation functions
Avoiding numerical overflow/underflow
What it's NOT
Not normalization – Doesn't rescale the whole distribution, just clips extremes
Not gradient clipping by norm – Clips values independently, not based on vector magnitude
Not ReLU – Clips on both ends, ReLU only zeros negatives
Analogy
Like speed limits and minimum speeds on a highway. You're free to go any speed between the limits, but if you exceed them, you're brought back to the limit.
Divides logits by a temperature parameter before softmax. Higher temperature makes probabilities more uniform; lower makes them more peaked.
Purpose
Controlling the "confidence" or "sharpness" of probability distributions, useful in distillation and sampling.
Common uses
Knowledge distillation (teacher with high temperature provides "soft" targets)
Text generation (controlling randomness of sampling)
Calibrating overconfident models
Softmax with controllable entropy
What it's NOT
Not general normalization – Specifically for logits before softmax
Not learned – Temperature is a hyperparameter, not trained
Not probability calibration – Related but different; this is about distribution shape
Analogy
Like adjusting the thermostat on decision-making: high temperature makes you more exploratory and uncertain, low temperature makes you more decisive and confident.
Gaussian Error Linear Unit—weights inputs by their value in a Gaussian cumulative distribution. Smooth approximation to ReLU that never fully zeros inputs.
Purpose
Providing smooth, probabilistically-motivated nonlinearity. Better properties than ReLU in some cases, especially for transformers.
Common uses
Transformer models (BERT, GPT, ViT)
Modern language models
Situations where smoothness matters
Architectures where stochasticity-inspired design helps
What it's NOT
Not ReLU – Smooth curve, not a sharp corner; never completely zeros inputs
Not computationally free – More expensive than ReLU (though fast approximations exist)
Not universally better – Architecture-dependent; great for transformers, may not beat ReLU everywhere
Analogy
Like a gate that opens more as the input gets more positive, but uses a smooth probability curve instead of a hard cutoff.
Compares predicted probabilities (from logits) to true labels, measuring how "surprised" the model would be by the true answer.
Purpose
The standard loss for classification. Encourages the model to assign high probability to correct classes.
Common uses
Training classifiers (image classification, text classification, etc.)
Any multi-class prediction task
Language modeling
Most supervised learning with categorical outputs
What it's NOT
Not mean squared error – Cross-entropy is for probabilities/categories; MSE is for continuous values
Not just softmax – Includes both softmax and logarithmic loss computation
Not only for neural networks – Used across machine learning for probabilistic classification
Analogy
Like a penalty for being surprised. If you confidently predict rain (high probability) and it rains, small penalty. If you say "no chance of rain" and it pours, huge penalty.
Not a distance metric – Asymmetric (KL(P||Q) ≠ KL(Q||P)) and doesn't satisfy triangle inequality
Not cross-entropy – Related but different; cross-entropy includes entropy term
Not symmetric – Order matters; measuring P against Q differs from Q against P
Analogy
Like measuring how much extra information you'd need to describe one distribution using another distribution's coding scheme. The "surprise" of using the wrong distribution.
Adam with decoupled weight decay. Separates weight decay from the adaptive learning rate.
Purpose
Fixing a subtle issue in original Adam where weight decay interacted incorrectly with adaptive learning rates.
Common uses
Training large transformers (BERT, GPT, etc.)
Modern deep learning where better regularization helps
Situations where original Adam's weight decay behavior was problematic
Current best-practice for many tasks
What it's NOT
Not hugely different from Adam – Same core algorithm, different weight decay implementation
Not always necessary – Difference matters more for some tasks than others
Not a replacement for all regularization – Still might need dropout, etc.
Analogy
Like Adam's smart walking stick, but also has a separate mechanism that ensures you don't carry unnecessary weight (weight decay) independent of terrain adaptation.
ManifolDB-specific experimental optimizer. Note: Nebula is a project-specific optimizer tailored for ManifolDB's graph execution engine. It is not part of the standard NOTIX taxonomy and uses the vendor/project-specific opcode range (0xC000–0xFFFF).
This taxonomy entry does not have an article in the current Species Encyclopedia.
Removes dimensions that have a size of 1. Like removing empty parentheses in a mathematical expression: (((5))) becomes 5.
Purpose
Sometimes operations add "singleton dimensions" (dimensions of size 1) that aren't needed. Squeeze cleans up these extra dimensions to make the data shape simpler.
Common uses
Cleaning up after operations that add batch dimensions when you're only processing one item
Removing unnecessary dimensions before saving data or passing it to operations that don't expect them
Simplifying tensor shapes for easier debugging and understanding
What it's NOT
Not data removal – Squeeze doesn't delete any values, just removes organizational overhead
Not compression – The same amount of data exists; it's just organized more simply
Not reduction – Operations like sum or mean reduce data; squeeze just removes empty dimensions
Analogy
If you have a box containing another box containing another box with a single marble, squeeze removes the nested boxes so you're just holding the marble.
Divides a tensor into a specific number of roughly equal pieces along an axis. Like cutting a long rope into several pieces of equal length.
Purpose
Partitioning data into a fixed number of groups for parallel processing or distributed computation.
Common uses
Distributing work across multiple processors
Implementing model parallelism
Creating mini-batches of specific sizes
Splitting data for multi-GPU training
What it's NOT
Not Split – Chunk specifies how many pieces you want; Split specifies the size of each piece
Not random partitioning – Chunks are contiguous and deterministic
Not filtering – Divides geometrically, not based on values
Analogy
Like dividing a chocolate bar by saying "I want 4 pieces" rather than "I want pieces of size 2 ounces." Chunk figures out the sizes to give you the number you want.
Adds borders by mirroring the existing edge values. Like placing mirrors along the edges of an image.
Purpose
When padding with zeros would create artifacts or boundaries, reflection padding provides more natural transitions by mirroring existing content.
Common uses
Image processing where edge discontinuities would be problematic
Signal processing to avoid boundary effects
Convolutional networks when edge behavior matters
Creating smoother padding for visual or audio data
What it's NOT
Not constant padding – Uses mirrored values, not a fixed constant
Not tiling or repeating – Reflects once at the boundary, doesn't repeat patterns
Not rotation – Mirrors values, doesn't rotate the content
Analogy
Imagine a pond with trees at the edge. The water reflects the trees. Pad-reflect does this with data—the "reflection" extends beyond the actual content.
Provides position-specific vectors that encode where something appears in a sequence. Tells the network "this is the 1st item," "this is the 2nd item," etc.
Purpose
Many neural architectures (especially transformers) process all positions simultaneously and lose track of order. Positional embeddings restore that order information.
Common uses
Transformer models (like BERT, GPT) that need position information
Any architecture that processes sequences in parallel
Time-series models that need temporal position information
Grid-based models that need spatial position information
What it's NOT
Not timestamp encoding – Encodes relative position, not absolute time
Not content-based – Position embeddings depend only on position, not on what's there
Not the same as RNN hidden states – This is explicit position info; RNNs implicitly track position
Analogy
Like seat numbers in a theater. Seat B-12 is B-12 regardless of who sits there. Positional embeddings give each position its own "seat number" vector.
Divides an image into rectangular regions and keeps only the maximum value from each region. Like summarizing each neighborhood by its strongest signal.
Purpose
Reducing spatial size while keeping the most prominent features. Creates invariance to small shifts and reduces computational cost.
Common uses
Downsampling feature maps in convolutional networks
Building hierarchical feature representations
Creating translation invariance
Reducing computational cost and memory
What it's NOT
Not average pooling – Takes maximum, not average
Not convolution – Uses a fixed operation (max), doesn't learn patterns
Not dropout – Deterministically selects maximum, doesn't randomly drop
Analogy
Like surveying a neighborhood by dividing it into blocks and asking "what's the tallest building in each block?" You get a coarser but still informative map.
Computes how much each position should "pay attention to" every other position, then aggregates information based on those attention weights. The core mechanism of transformers.
Purpose
Allowing each position to gather information from relevant positions anywhere in the sequence, with relevance determined by learned queries and keys.
Common uses
Core building block of transformer architectures
Implementing flexible, learned patterns of information flow
Capturing long-range dependencies in sequences
Enabling models to focus on relevant context
What it's NOT
Not convolution – Attention can connect any positions; convolution only looks locally
Not RNN – Processes all positions in parallel, doesn't maintain hidden state
Not simple weighted average – The weights are computed based on learned queries and keys
Analogy
Like a room full of people where each person decides who they want to listen to based on relevance, then hears a blend of what those relevant people are saying. Everyone can potentially listen to anyone.
Like regular embedding lookup, but for cases where each position has multiple active IDs simultaneously. Averages or sums the embeddings for all active IDs.
Purpose
Representing cases where multiple discrete features are active at once, like multiple tags on a document or multiple ingredients in a recipe.
Common uses
Multi-label classification (document with multiple categories)
Recommendation systems (user with multiple interests)
Items with multiple attributes
Feature combinations in categorical data
What it's NOT
Not one-hot embedding – Multiple positions can be active, not just one
Not multi-output embedding – Still produces one vector, just from multiple inputs
Not attention – Simple averaging/summing, not weighted by learned attention
Analogy
Like describing a meal by averaging the flavor profiles of all its ingredients, rather than just picking the main ingredient.
Operations that rearrange, slice, merge, pad, or route tensors without changing the value of individual elements (except where padding introduces new values). These are the shape, layout, and routing primitives of a graph.
57 entries
I.1ReshapeChanges how a tensor is organized without changing which numbers are in it. Like taking a deck of 52 cards and arranging them into 4 rows of 13 instead of 13 rows of 4.+
What it is
Changes how a tensor is organized without changing which numbers are in it. Like taking a deck of 52 cards and arranging them into 4 rows of 13 instead of 13 rows of 4.
Purpose
Different operations expect data in different shapes. Reshape lets you reorganize your data to match what the next operation needs.
Common uses
Converting a 2D image (height × width) into a 1D list of pixels before feeding it to a fully-connected layer
Rearranging a batch of sequences from (batch, time, features) to (time, batch, features)
What it's NOT
Not a mathematical transform – Reshape doesn't calculate anything; it just rearranges
Not pooling or downsampling – Reshape keeps all the same values; it doesn't reduce or combine them
Not transpose – While both change organization, transpose specifically swaps axes, while reshape can do arbitrary reorganization
Analogy
Imagine you have books on a shelf. Reshape is like taking the same books and putting them on different shelves—same books, different arrangement.
I.1FlattenTakes a multi-dimensional tensor and stretches it out into a single long row (or sometimes a 2D table). Like unrolling a sheet of paper that was folded multiple times.+
What it is
Takes a multi-dimensional tensor and stretches it out into a single long row (or sometimes a 2D table). Like unrolling a sheet of paper that was folded multiple times.
Purpose
Many operations (especially older-style neural network layers) expect data as a simple list. Flatten converts complex structures like images or feature maps into that simple format.
Common uses
Converting the output of convolutional layers (which produce 3D feature maps) into a 1D vector before classification
Preparing batched data where each item needs to become a single vector
Simplifying data before feeding it to traditional machine learning algorithms
What it's NOT
Not dimensionality reduction – Flatten doesn't remove information or compress data; it just linearizes it
Not pooling – Flatten keeps every single value; pooling would combine or select values
Not feature extraction – Flatten is purely organizational; it doesn't create new features or select important ones
Analogy
Think of a 3D Rubik's cube. Flatten would be like carefully unfolding it into a long strip of colored squares laid out in a line—same squares, just in a different arrangement.
I.1SqueezeRemoves dimensions that have a size of 1. Like removing empty parentheses in a mathematical expression: (((5))) becomes 5.+
What it is
Removes dimensions that have a size of 1. Like removing empty parentheses in a mathematical expression: (((5))) becomes 5.
Purpose
Sometimes operations add "singleton dimensions" (dimensions of size 1) that aren't needed. Squeeze cleans up these extra dimensions to make the data shape simpler.
Common uses
Cleaning up after operations that add batch dimensions when you're only processing one item
Removing unnecessary dimensions before saving data or passing it to operations that don't expect them
Simplifying tensor shapes for easier debugging and understanding
What it's NOT
Not data removal – Squeeze doesn't delete any values, just removes organizational overhead
Not compression – The same amount of data exists; it's just organized more simply
Not reduction – Operations like sum or mean reduce data; squeeze just removes empty dimensions
Analogy
If you have a box containing another box containing another box with a single marble, squeeze removes the nested boxes so you're just holding the marble.
I.1ExpandDimsAdds a new dimension of size 1 to a tensor. The opposite of Squeeze. Like wrapping a single item in brackets: 5 becomes (5).+
What it is
Adds a new dimension of size 1 to a tensor. The opposite of Squeeze. Like wrapping a single item in brackets: 5 becomes (5).
Purpose
Some operations expect data to have a specific number of dimensions. ExpandDims lets you add dimensions where needed without changing the actual data.
Common uses
Adding a batch dimension when you have a single example but the model expects batched input
Making a 1D array into a 2D column vector or row vector
Preparing data to broadcast correctly in mathematical operations
What it's NOT
Not duplication – ExpandDims doesn't copy data; it just adds organizational structure
Not tiling or repeating – It adds a dimension of size 1, not multiple copies
Not upsampling – The data stays exactly the same; only the shape changes
Analogy
Like putting a single apple in a basket. The apple is the same, but now it's organized as "a basket of apples" (even though there's only one).
I.2TransposeSwaps or rotates the axes (dimensions) of a tensor. For a 2D matrix, this means swapping rows and columns. For higher dimensions, it can mean any reordering of axes.+
What it is
Swaps or rotates the axes (dimensions) of a tensor. For a 2D matrix, this means swapping rows and columns. For higher dimensions, it can mean any reordering of axes.
Purpose
Different operations expect data organized in different orders. Transpose lets you rearrange axes to match what's needed.
Common uses
Converting between row-major and column-major matrix storage
Reordering batch/sequence/feature dimensions for different model architectures
Preparing matrices for matrix multiplication (which often requires one matrix to be transposed)
What it's NOT
Not reshape – Transpose specifically reorders axes; reshape can change dimensions entirely
Not a rotation (in image sense) – Transpose swaps axes; rotating an image 90° is different
Not a flip or reverse – Transpose changes axis order; it doesn't reverse the values along an axis
Analogy
Imagine a spreadsheet. Transpose is like turning it 90 degrees so rows become columns and columns become rows. The same data, just oriented differently.
I.2PermuteAxesA generalization of transpose that can reorder axes in any pattern, not just swapping two. Like shuffling the order of coordinates.+
What it is
A generalization of transpose that can reorder axes in any pattern, not just swapping two. Like shuffling the order of coordinates.
Purpose
Complex neural architectures often need data organized in specific axis orders. PermuteAxes provides full flexibility to rearrange dimensions however needed.
Common uses
Converting between different data layout conventions (NCHW ↔ NHWC for images)
Reordering time/batch/feature dimensions for sequence models
Preparing data for operations that expect specific axis orderings
What it's NOT
Not sorting – PermuteAxes rearranges which axis is which, not the values within axes
Not reshape – The size of each dimension stays the same; only their order changes
Not limited to 2D – Unlike simple transpose, works with any number of dimensions
Analogy
Think of a filing cabinet with drawers labeled by year, then month, then category. PermuteAxes would let you reorganize it to category, then year, then month—same files, different organizational structure.
I.3SliceExtracts a continuous rectangular region from a tensor. Like cutting a piece out of a larger sheet of paper.+
What it is
Extracts a continuous rectangular region from a tensor. Like cutting a piece out of a larger sheet of paper.
Purpose
Often you only need part of your data—a specific time range, a crop of an image, or a subset of features. Slice lets you extract exactly the region you want.
Common uses
Extracting a spatial crop from an image
Getting a specific time window from a sequence
Selecting a subset of features or channels
Implementing operations like padding or cropping
What it's NOT
Not filtering – Slice extracts a geometric region, not values meeting a condition
Not sampling – Slice takes a continuous block, not scattered positions
Not pooling – Slice selects data, doesn't combine or reduce it
Analogy
Like using scissors to cut out a rectangular section from a newspaper. You get that exact section, nothing more, nothing less.
I.3GatherCollects values from specific positions using a list of indices. Like picking specific cards from a deck based on a list of card numbers.+
What it is
Collects values from specific positions using a list of indices. Like picking specific cards from a deck based on a list of card numbers.
Purpose
When you need specific elements from specific positions (not a continuous region), Gather lets you select them using index lists.
Common uses
Looking up embeddings for specific word IDs in a vocabulary
Selecting features based on learned importance scores
Implementing attention mechanisms (gathering values based on attention weights)
Creating custom rearrangements or selections
What it's NOT
Not slice – Gather can select scattered positions; slice only takes continuous regions
Not filtering – Gather uses explicit indices, not value-based conditions
Not embedding layer – While embeddings use gathering, Gather is the lower-level indexing operation
Analogy
Like a scavenger hunt list that says "get item #5, item #12, and item #3" from a warehouse. You collect exactly those items in that order.
I.3TakeExtracts elements at specific indices along an axis. A simpler, more restricted version of Gather that works along a single axis.+
What it is
Extracts elements at specific indices along an axis. A simpler, more restricted version of Gather that works along a single axis.
Purpose
Selecting specific positions along one dimension, like taking certain rows from a table or certain frames from a video.
Common uses
Selecting specific samples from a batch
Extracting certain time steps from a sequence
Picking specific channels from feature maps
Implementing sampling strategies
What it's NOT
Not Gather – Take is simpler, working along one axis; Gather can index multiple axes
Not Slice – Take uses explicit indices, not ranges
Not random sampling – Uses provided indices, doesn't generate them randomly
Analogy
Like being given a list of page numbers and pulling just those pages from a book. Simple, direct indexing.
I.3StridedSliceLike Slice, but can skip elements using a "stride" (step size). Extracts every Nth element from a region instead of every element.+
What it is
Like Slice, but can skip elements using a "stride" (step size). Extracts every Nth element from a region instead of every element.
Purpose
Efficiently downsample data or extract regularly-spaced samples without needing separate operations.
Common uses
Quick downsampling by taking every other pixel
Extracting even-indexed or odd-indexed elements
Implementing certain types of spatial pooling
Selecting regular intervals from sequences
What it's NOT
Not pooling – StridedSlice selects existing values; pooling would combine them
Not interpolation – This picks existing values at intervals, doesn't create new in-between values
Not random sampling – The spacing is regular and deterministic
Analogy
Imagine a ruler with measurements. Regular Slice gives you inches 5 through 10. StridedSlice gives you inches 5, 7, 9 (every other one).
I.4ConcatJoins multiple tensors together along a chosen axis, like stacking blocks side-by-side or end-to-end.+
What it is
Joins multiple tensors together along a chosen axis, like stacking blocks side-by-side or end-to-end.
Purpose
Combining information from different sources or different processing paths. Essential for architectures that merge multiple streams of data.
Common uses
Combining features from different network branches (like in ResNet skip connections)
Merging encoder and decoder features (like in U-Net architectures)
Combining embeddings from different sources
Building larger tensors from smaller pieces
What it's NOT
Not addition or averaging – Concat places tensors side-by-side; it doesn't combine values mathematically
Not fusion or blending – The original tensors' values remain distinct and unchanged
Not stacking with extra dimension – Concat joins along an existing axis; Stack creates a new axis
Analogy
Like putting books on a shelf next to each other. Each book stays separate, but they're now organized together.
I.4SplitDivides a tensor into multiple pieces along an axis. The opposite of Concat. Like slicing a loaf of bread into separate slices.+
What it is
Divides a tensor into multiple pieces along an axis. The opposite of Concat. Like slicing a loaf of bread into separate slices.
Purpose
Separating a tensor into parts that can be processed independently or routed to different operations.
Common uses
Dividing a tensor into multiple processing branches
Separating different feature types that were concatenated earlier
Implementing multi-head attention (splitting into separate heads)
Creating separate paths in network architectures
What it's NOT
Not chunking by value – Split divides geometrically, not based on content
Not clustering or grouping – Divisions are regular along an axis, not based on similarity
Not the same as Slice – Split produces multiple outputs; Slice produces one
Analogy
Like cutting a pizza into slices. You started with one whole; now you have several separate pieces.
I.4StackCombines multiple tensors by creating a new dimension. Like taking separate sheets of paper and making them into a booklet.+
What it is
Combines multiple tensors by creating a new dimension. Like taking separate sheets of paper and making them into a booklet.
Purpose
When you have multiple related tensors (like frames of video or batch items) and want to organize them together in a new dimension.
Common uses
Creating batches from individual examples
Combining time steps into a sequence dimension
Building RGB images from separate red, green, blue channels
Organizing related tensors into a higher-dimensional structure
What it's NOT
Not Concat – Stack creates a new axis; Concat joins along an existing axis
Not Expand – Stack combines multiple tensors; Expand adds a dimension to one tensor
Not Tile – Stack organizes different tensors; Tile repeats the same tensor
Analogy
Like organizing a deck of different trading cards (each a separate card) into a neat stack where you can refer to "the 5th card in the stack."
I.4ChunkDivides a tensor into a specific number of roughly equal pieces along an axis. Like cutting a long rope into several pieces of equal length.+
What it is
Divides a tensor into a specific number of roughly equal pieces along an axis. Like cutting a long rope into several pieces of equal length.
Purpose
Partitioning data into a fixed number of groups for parallel processing or distributed computation.
Common uses
Distributing work across multiple processors
Implementing model parallelism
Creating mini-batches of specific sizes
Splitting data for multi-GPU training
What it's NOT
Not Split – Chunk specifies how many pieces you want; Split specifies the size of each piece
Not random partitioning – Chunks are contiguous and deterministic
Not filtering – Divides geometrically, not based on values
Analogy
Like dividing a chocolate bar by saying "I want 4 pieces" rather than "I want pieces of size 2 ounces." Chunk figures out the sizes to give you the number you want.
I.4UnstackThe opposite of Stack—takes a tensor and separates it along an axis into multiple individual tensors. Like splitting a deck into individual cards.+
What it is
The opposite of Stack—takes a tensor and separates it along an axis into multiple individual tensors. Like splitting a deck into individual cards.
Purpose
Breaking apart batched or stacked data into separate pieces for independent processing.
Common uses
Separating batch items for individual processing
Extracting frames from a video tensor
Splitting RGB channels into separate grayscale images
Decomposing stacked representations
What it's NOT
Not Split – Unstack removes a dimension; Split keeps all dimensions
Not Squeeze – Unstack creates multiple outputs; Squeeze modifies one tensor
Not the same as indexing – Produces all slices simultaneously as separate tensors
Analogy
Like taking a deck of cards bound together and separating them into individual cards you can hand to different people.
I.5PadConstantAdds borders around a tensor filled with a specific value (often zero). Like adding margins around text on a page.+
What it is
Adds borders around a tensor filled with a specific value (often zero). Like adding margins around text on a page.
Purpose
Many operations need extra space around data (like convolutions near edges). Padding provides that space with controlled values.
Common uses
Adding zeros around images before convolution to preserve size
Creating boundary regions in spatial data
Ensuring tensors have compatible sizes for operations
Implementing "same" padding in convolutional networks
What it's NOT
Not upsampling or resizing – Padding adds borders with fixed values, doesn't enlarge the content
Not duplication or reflection – Constant padding uses one specific value, not copies of existing data
Not cropping – This adds space; cropping removes it
Analogy
Like putting a picture in a frame with a wide border. The picture stays the same; you've just added empty space around it.
I.5PadReflectAdds borders by mirroring the existing edge values. Like placing mirrors along the edges of an image.+
What it is
Adds borders by mirroring the existing edge values. Like placing mirrors along the edges of an image.
Purpose
When padding with zeros would create artifacts or boundaries, reflection padding provides more natural transitions by mirroring existing content.
Common uses
Image processing where edge discontinuities would be problematic
Signal processing to avoid boundary effects
Convolutional networks when edge behavior matters
Creating smoother padding for visual or audio data
What it's NOT
Not constant padding – Uses mirrored values, not a fixed constant
Not tiling or repeating – Reflects once at the boundary, doesn't repeat patterns
Not rotation – Mirrors values, doesn't rotate the content
Analogy
Imagine a pond with trees at the edge. The water reflects the trees. Pad-reflect does this with data—the "reflection" extends beyond the actual content.
I.5CropRemoves borders or extracts a central region from a tensor. The opposite of padding. Like cutting margins off a printed page.+
What it is
Removes borders or extracts a central region from a tensor. The opposite of padding. Like cutting margins off a printed page.
Purpose
Removing unnecessary borders, extracting regions of interest, or matching sizes between tensors.
Common uses
Removing padding added by earlier operations
Extracting the center region of an image
Matching spatial dimensions between feature maps
Discarding edge regions that may have artifacts
What it's NOT
Not downsampling – Crop removes edges, doesn't reduce resolution throughout
Not Slice (necessarily) – Crop often refers specifically to removing borders; Slice is more general
Not attention-based selection – Crop uses geometric boundaries, not learned importance
Analogy
Like trimming the edges off a photograph to focus on the center, or cutting the crust off bread.
I.5CenterCropExtracts a rectangular region from the center of a tensor, discarding the outer edges. Like taking the middle square from a larger image.+
What it is
Extracts a rectangular region from the center of a tensor, discarding the outer edges. Like taking the middle square from a larger image.
Purpose
Focusing on the central content while ensuring consistent output size. Common in vision tasks where the subject is typically centered.
Common uses
Preprocessing images for models that expect specific input sizes
Data augmentation pipelines
Removing edge artifacts while keeping the main content
Ensuring uniform sizes across a dataset
What it's NOT
Not random crop – Always takes the center, not a random location
Not resize – Crops to size, doesn't scale the content
Not attention-based – Uses geometric center, not learned focus
Analogy
Like using a circular cookie cutter on square dough—you always get the center circle, edges are discarded.
I.6BooleanMaskUses a true/false pattern to selectively keep or discard elements. Like using a stencil to paint only certain areas.+
What it is
Uses a true/false pattern to selectively keep or discard elements. Like using a stencil to paint only certain areas.
Purpose
Selecting elements based on conditions, filtering data, or applying operations only where needed.
Common uses
Selecting valid positions in variable-length sequences (masking padding tokens)
Implementing attention masks in transformers
Filtering data based on conditions
Applying operations only to specific regions
What it's NOT
Not binary multiplication – While similar, masking has specific semantic meaning about validity
Not dropout – Dropout randomly zeros elements; masking uses specific patterns
Not slicing – Masking can create irregular patterns; slicing is geometric
Analogy
Like using a cookie cutter on dough. The cutter (mask) determines which parts you keep and which parts you discard.
I.6WhereSelectChooses between two tensors element-by-element based on a condition. Like a fork in the road where each position might go left or right.+
What it is
Chooses between two tensors element-by-element based on a condition. Like a fork in the road where each position might go left or right.
Purpose
Conditional data selection, implementing if-then-else logic per element, or blending different data sources.
Common uses
Implementing conditional operations in differentiable ways
Selecting between two data sources based on learned or fixed conditions
Creating piecewise functions
Implementing certain types of gating mechanisms
What it's NOT
Not filtering – WhereSelect always produces output with the same shape, just with values from different sources
Not masking – Masking zeros out values; WhereSelect chooses between alternatives
Not a boolean AND/OR – This selects data values, not computing logical operations
Analogy
Like having two ingredients and a recipe that says "for position (i,j), use ingredient A if condition is true, otherwise use ingredient B."
I.6SwitchRouterRoutes data to different processing paths based on conditions or learned decisions. Like a railroad switch that sends trains down different tracks.+
What it is
Routes data to different processing paths based on conditions or learned decisions. Like a railroad switch that sends trains down different tracks.
Purpose
Implementing conditional computation where different data takes different paths through the network, or creating mixture-of-experts architectures.
Common uses
Mixture-of-experts models (routing to different expert sub-networks)
Conditional execution based on input properties
Dynamic neural architectures
Efficient computation by only processing relevant paths
What it's NOT
Not WhereSelect – SwitchRouter determines paths for processing; WhereSelect chooses between already-processed results
Not masking – Routes to different computations, doesn't just zero out values
Not branching in code – This is a differentiable routing operation within the network
Analogy
Like a post office sorting facility that looks at zip codes and sends packages down different conveyor belts to different destinations.
I.1BroadcastToRepeat existing values along compatible axes to reach a requested shape.+
What it is
Repeat existing values along compatible axes to reach a requested shape.
Purpose
Align tensor shapes for elementwise operations.
Common uses
Broadcast [1, 3] to [4, 3].
Tensor and behavior contract
Inputs
Tensor X and integer target shape.
Outputs
Tensor Y with the requested shape.
Parameters
Target shape.
Shape and rank constraints
Aligned input dimensions must equal the target dimension or be one.
Behavioral invariants
Repeated output positions reference the corresponding input value.
Semantics
Deterministic for the same inputs and declared parameters.
Operations whose primary effect is a linear map between vector spaces, optionally followed by simple bias addition. This includes dense layers, structured linear transforms, and embedding lookups. Dense-with-bias is represented by the composition MatMul → broadcast Add; its familiar dense names do not define another atomic species.
8 entries
II.1MatMulPure matrix multiplication without bias. Takes two matrices and multiplies them following standard linear algebra rules.+
What it is
Pure matrix multiplication without bias. Takes two matrices and multiplies them following standard linear algebra rules.
Purpose
The mathematical foundation of many neural network operations. Used whenever you need to combine or transform features through multiplication.
Common uses
Atomic matrix product inside dense-with-bias compositions, attention, and other layers
Combining different representations
Projecting data into new coordinate systems
Implementing mathematical operations that can be expressed as matrix products
What it's NOT
Not element-wise multiplication – MatMul combines across dimensions; element-wise multiplies corresponding positions
Not bias addition – A dense-with-bias alias connects this product to atomic Add; using a matrix as learned weights does not create a new matrix-product primitive
Not convolution – While convolution can be expressed as matrix multiplication, it has different semantics
Analogy
Like a factory production line where raw materials (inputs) go through a transformation machine (weight matrix) to become products (outputs). The machine's configuration determines what comes out.
II.3EmbeddingLookupConverts discrete IDs (like word IDs or categorical values) into continuous vectors by looking them up in a learned table. Each ID gets its own learned vector.+
What it is
Converts discrete IDs (like word IDs or categorical values) into continuous vectors by looking them up in a learned table. Each ID gets its own learned vector.
Purpose
Representing discrete items (words, categories, users, items) as continuous vectors that can be used in neural networks. The vectors learn to capture semantic relationships.
Common uses
Word embeddings in natural language processing (converting words to vectors)
User/item embeddings in recommendation systems
Categorical feature representations
Any situation where discrete identities need continuous representations
What it's NOT
Not one-hot encoding – Embeddings are learned dense vectors; one-hot creates sparse fixed vectors
Not feature extraction – Embeddings are learned representations, not extracted features
Not compression – While embeddings can be smaller than one-hot, that's not their primary purpose
Analogy
Like a phonebook where you look up a name (ID) and get back a full address and phone number (vector). Each person has their own unique entry, and you learn what information to store for each.
II.3PositionalEmbeddingProvides position-specific vectors that encode where something appears in a sequence. Tells the network "this is the 1st item," "this is the 2nd item," etc.+
What it is
Provides position-specific vectors that encode where something appears in a sequence. Tells the network "this is the 1st item," "this is the 2nd item," etc.
Purpose
Many neural architectures (especially transformers) process all positions simultaneously and lose track of order. Positional embeddings restore that order information.
Common uses
Transformer models (like BERT, GPT) that need position information
Any architecture that processes sequences in parallel
Time-series models that need temporal position information
Grid-based models that need spatial position information
What it's NOT
Not timestamp encoding – Encodes relative position, not absolute time
Not content-based – Position embeddings depend only on position, not on what's there
Not the same as RNN hidden states – This is explicit position info; RNNs implicitly track position
Analogy
Like seat numbers in a theater. Seat B-12 is B-12 regardless of who sits there. Positional embeddings give each position its own "seat number" vector.
II.2LowRankProjectionApproximates a large weight matrix using two smaller matrices multiplied together. Reduces parameters while maintaining expressiveness for many tasks.+
What it is
Approximates a large weight matrix using two smaller matrices multiplied together. Reduces parameters while maintaining expressiveness for many tasks.
Purpose
Compressing models by exploiting the fact that many weight matrices have low intrinsic dimensionality. Fewer parameters, faster computation.
Common uses
Compressing large language models
Adapter layers in transfer learning (LoRA)
Reducing parameters in attention mechanisms
Memory-efficient fine-tuning
What it's NOT
Not pruning – Restructures the matrix, doesn't zero out weights
Not quantization – Uses full precision but fewer total values
Not always lossless – Trades some capacity for efficiency
Analogy
Like summarizing a detailed map with simpler directions. Instead of storing every street, you store major routes (low rank) and can still get most places.
II.3MultiHotEmbeddingLike regular embedding lookup, but for cases where each position has multiple active IDs simultaneously. Averages or sums the embeddings for all active IDs.+
What it is
Like regular embedding lookup, but for cases where each position has multiple active IDs simultaneously. Averages or sums the embeddings for all active IDs.
Purpose
Representing cases where multiple discrete features are active at once, like multiple tags on a document or multiple ingredients in a recipe.
Common uses
Multi-label classification (document with multiple categories)
Recommendation systems (user with multiple interests)
Items with multiple attributes
Feature combinations in categorical data
What it's NOT
Not one-hot embedding – Multiple positions can be active, not just one
Not multi-output embedding – Still produces one vector, just from multiple inputs
Not attention – Simple averaging/summing, not weighted by learned attention
Analogy
Like describing a meal by averaging the flavor profiles of all its ingredients, rather than just picking the main ingredient.
II.1EinsumCombine tensors according to named multiplication and summation indices.+
What it is
Combine tensors according to named multiplication and summation indices.
Purpose
Describe explicit tensor contractions and their compositions.
Common uses
Use ij,jk->ik for a matrix product.
Tensor and behavior contract
Inputs
One or more numeric tensors and a contraction equation.
Operations that compute over local neighborhoods in space, time, or other structured domains. This includes convolutions, pooling, up/down-sampling, and classical signal transforms when applied locally.
38 entries
III.1Conv2DSlides a small pattern-detector (kernel) across a 2D image, computing how much the kernel matches each local region. Like checking every spot in an image for a specific feature.+
What it is
Slides a small pattern-detector (kernel) across a 2D image, computing how much the kernel matches each local region. Like checking every spot in an image for a specific feature.
Purpose
Detecting local patterns (edges, textures, shapes) while being invariant to exactly where they appear. The foundation of computer vision.
Common uses
Building convolutional neural networks for image classification
Detecting edges, corners, and textures in images
Creating feature maps that capture visual patterns
Any task involving spatial data (images, video, maps)
What it's NOT
Not fully-connected – Convolution only looks at local neighborhoods, not all inputs
Not template matching – While similar in spirit, convolution is differentiable and learns optimal patterns
Analogy
Like checking every 3×3 square in a puzzle to see if it matches certain patterns you're looking for (vertical edge, horizontal edge, corner, etc.). You slide your pattern-checker across the whole puzzle.
III.1DepthwiseConv2DConvolution where each channel is processed separately, rather than mixing all channels together. Like having independent filters for red, green, and blue in an RGB image.+
What it is
Convolution where each channel is processed separately, rather than mixing all channels together. Like having independent filters for red, green, and blue in an RGB image.
Purpose
Efficiency—reduces computation while often maintaining performance. First step in separable convolutions.
Common uses
Mobile and efficient neural network architectures (MobileNet)
First stage of depthwise-separable convolutions
Situations where channel-mixing and spatial-filtering should be separate
Resource-constrained environments
What it's NOT
Not regular convolution – Doesn't mix channels, processes each independently
Not channel-wise pooling – Still uses learned kernels, not fixed pooling operations
Not pointwise convolution – Depthwise has spatial kernels; pointwise is 1×1
Analogy
Imagine processing a color photo. Regular convolution uses all three color channels together. Depthwise convolution processes red, green, and blue separately with their own filters.
III.1PointwiseConv2DA 1×1 convolution that mixes channels at each spatial position without looking at neighbors. Like remixing colors at each pixel independently.+
What it is
A 1×1 convolution that mixes channels at each spatial position without looking at neighbors. Like remixing colors at each pixel independently.
Purpose
Changing the number of channels, learning optimal channel combinations, reducing or expanding dimensionality.
Common uses
Changing feature map depth (reducing 256 channels to 64, etc.)
Second stage of depthwise-separable convolutions
Bottleneck layers in efficient architectures
Learning optimal combinations of features
What it's NOT
Not spatial convolution – Pointwise only mixes channels, doesn't look at spatial neighbors
Not just dimension reduction – While it can reduce dimensions, it learns how to do so optimally
Not a dense-with-bias composition – Works on spatial feature maps, although both use weighted combinations
Analogy
Like having multiple paint colors at each spot and mixing them according to learned recipes—each location gets its own custom color mix, but the mixing doesn't consider neighboring spots.
III.2MaxPool2DDivides an image into rectangular regions and keeps only the maximum value from each region. Like summarizing each neighborhood by its strongest signal.+
What it is
Divides an image into rectangular regions and keeps only the maximum value from each region. Like summarizing each neighborhood by its strongest signal.
Purpose
Reducing spatial size while keeping the most prominent features. Creates invariance to small shifts and reduces computational cost.
Common uses
Downsampling feature maps in convolutional networks
Building hierarchical feature representations
Creating translation invariance
Reducing computational cost and memory
What it's NOT
Not average pooling – Takes maximum, not average
Not convolution – Uses a fixed operation (max), doesn't learn patterns
Not dropout – Deterministically selects maximum, doesn't randomly drop
Analogy
Like surveying a neighborhood by dividing it into blocks and asking "what's the tallest building in each block?" You get a coarser but still informative map.
III.2AvgPool2DDivides an image into regions and computes the average value in each region. Like summarizing each neighborhood by its typical value.+
What it is
Divides an image into regions and computes the average value in each region. Like summarizing each neighborhood by its typical value.
Purpose
Reducing spatial size while smoothly blending information. Less sensitive to outliers than max pooling.
Common uses
Downsampling feature maps with smooth transitions
Global average pooling (reducing entire feature maps to single values)
Creating smoother feature hierarchies than max pooling
Situations where average activation is more meaningful than maximum
What it's NOT
Not max pooling – Uses average, not maximum
Not Gaussian smoothing – Simple average, not weighted by distance
Not interpolation – Reduces size, doesn't estimate intermediate values
Analogy
Instead of finding the tallest building per neighborhood block, you compute the average building height. Gives a smoother representation.
III.2GlobalAveragePoolingReduces each feature map to a single number by averaging all spatial positions. Collapses all spatial dimensions into one global summary per channel.+
What it is
Reduces each feature map to a single number by averaging all spatial positions. Collapses all spatial dimensions into one global summary per channel.
Purpose
Converting spatial feature maps into fixed-size vectors for classification, while maintaining translation invariance.
Common uses
Final layer before classification (alternative to flattening + dense)
Reducing spatial feature maps to global descriptors
Enforcing translation invariance for entire objects
Reducing parameters compared to fully-connected layers
What it's NOT
Not flatten – Averages across space; flatten keeps all spatial positions
Not attention-based pooling – Uses uniform averaging, not learned importance
Not max pooling – Uses average of all positions, not maximum
Analogy
Like describing a photograph by the average color in the whole image. You lose spatial detail but get a summary that doesn't depend on exact positioning.
III.1Conv1DConvolution along a single dimension, typically time. Slides a pattern-detector across a sequence looking for local patterns.+
What it is
Convolution along a single dimension, typically time. Slides a pattern-detector across a sequence looking for local patterns.
Purpose
Detecting local patterns in sequences like audio, time series, or text. The 1D equivalent of image convolution.
Common uses
Audio processing and speech recognition
Time series analysis
Text processing (character or word level)
Any sequential data with local structure
What it's NOT
Not 2D convolution – Only one spatial/temporal dimension
Not RNN – Parallel processing, not sequential; no hidden state
Not fully-connected – Only looks at local windows
Analogy
Like reading a book with a sliding window that looks at 5 words at a time, detecting patterns like "very good" or "not bad" as it slides along.
III.1Conv3DConvolution across three dimensions—typically height, width, and depth/time. Detects patterns in 3D volumes or video.+
What it is
Convolution across three dimensions—typically height, width, and depth/time. Detects patterns in 3D volumes or video.
Purpose
Processing volumetric data like medical scans, video sequences, or 3D shapes.
Common uses
Video action recognition
Medical image analysis (CT/MRI scans)
3D object recognition
Spatio-temporal pattern detection
What it's NOT
Not just stacked 2D convolutions – True 3D kernels capture volumetric patterns
Not significantly different in concept – Same idea as 2D, just higher dimensional
Not memory-free – Much more expensive than 2D due to extra dimension
Analogy
Like checking every cube in a 3D puzzle to see if it matches certain 3D patterns, rather than just checking flat patterns on surfaces.
III.3NearestNeighborUpsample2DMakes an image larger by repeating each pixel multiple times. The simplest upsampling method.+
What it is
Makes an image larger by repeating each pixel multiple times. The simplest upsampling method.
Purpose
Increasing spatial resolution when you need quick, simple upsampling without interpolation artifacts.
Operations that explicitly model context, order, or temporal structure across positions. This includes attention mechanisms, sequence/state-space models, recurrent units, and explicit memory/cache operations.
12 entries
IV.1ScaledDotProductAttentionComputes how much each position should "pay attention to" every other position, then aggregates information based on those attention weights. The core mechanism of transformers.+
What it is
Computes how much each position should "pay attention to" every other position, then aggregates information based on those attention weights. The core mechanism of transformers.
Purpose
Allowing each position to gather information from relevant positions anywhere in the sequence, with relevance determined by learned queries and keys.
Common uses
Core building block of transformer architectures
Implementing flexible, learned patterns of information flow
Capturing long-range dependencies in sequences
Enabling models to focus on relevant context
What it's NOT
Not convolution – Attention can connect any positions; convolution only looks locally
Not RNN – Processes all positions in parallel, doesn't maintain hidden state
Not simple weighted average – The weights are computed based on learned queries and keys
Analogy
Like a room full of people where each person decides who they want to listen to based on relevance, then hears a blend of what those relevant people are saying. Everyone can potentially listen to anyone.
IV.1MultiHeadAttentionRuns multiple independent attention mechanisms in parallel (heads), then combines their results. Like having multiple simultaneous conversations about different aspects of the data.+
What it is
Runs multiple independent attention mechanisms in parallel (heads), then combines their results. Like having multiple simultaneous conversations about different aspects of the data.
Purpose
Allowing the model to attend to different types of information simultaneously (syntax, semantics, long-range, short-range, etc.).
Common uses
Transformer models (BERT, GPT, ViT, etc.)
Any architecture needing rich contextual understanding
Models that benefit from capturing multiple relationship types
Modern sequence-to-sequence architectures
What it's NOT
Not just multiple attention layers stacked – The heads run in parallel at the same layer, not sequentially
Not ensemble of models – The heads are trained jointly as one model
Not necessarily more attention on the same things – Different heads can learn different patterns
Analogy
Like having a team review a document where each person focuses on different aspects simultaneously—one checks grammar, one checks facts, one checks flow—then they combine their insights.
IV.1GroupedQueryAttention (GQA)A variant of multi-head attention where multiple query heads share the same key and value heads, reducing computational cost while maintaining most of the benefit.+
What it is
A variant of multi-head attention where multiple query heads share the same key and value heads, reducing computational cost while maintaining most of the benefit.
Purpose
Achieving better efficiency than full multi-head attention while retaining more representational power than multi-query attention.
Common uses
Large language models where memory and computation are expensive
Situations balancing quality and efficiency
Production deployments of transformer models
Models that need many query perspectives but can share keys/values
What it's NOT
Not regular multi-head attention – Shares keys/values across query groups
Not multi-query attention – Has multiple key/value groups, not just one
Not a training trick – This is an architectural choice affecting the model permanently
Analogy
Like a library where instead of each student having their own complete card catalog (expensive), small groups of students share a card catalog (efficient) but still look up different things (expressive).
IV.1MultiQueryAttention (MQA)All query heads share a single set of keys and values. The most extreme sharing variant, maximizing efficiency.+
What it is
All query heads share a single set of keys and values. The most extreme sharing variant, maximizing efficiency.
Purpose
Minimizing memory and computation in attention mechanisms, especially important for autoregressive generation where keys/values accumulate.
Common uses
Fast inference in large language models
Memory-constrained deployments
Autoregressive generation where KV cache size is critical
Mobile or edge deployments of transformers
What it's NOT
Not regular multi-head attention – All heads share one set of keys/values
Not removing heads – Still has multiple query heads, just shared keys/values
Not equivalent in quality – Trades some quality for substantial efficiency gains
Analogy
Like all students in a class sharing one textbook (the keys/values) but each can ask their own questions about it (multiple queries).
IV.3LSTMCellA recurrent unit with special gates that control what information to remember, forget, and output. Processes sequences one step at a time while maintaining a memory cell.+
What it is
A recurrent unit with special gates that control what information to remember, forget, and output. Processes sequences one step at a time while maintaining a memory cell.
Purpose
Capturing sequential dependencies while avoiding the vanishing gradient problem that affects simple RNNs. Selective memory allows learning very long-term patterns.
Common uses
Processing text sequences before transformers became dominant
Time series prediction and forecasting
Speech recognition and generation
Any sequential task requiring memory of distant past
What it's NOT
Not attention – LSTM has fixed-size memory and processes sequentially; attention can look anywhere in parallel
Not stateless – LSTM carries hidden state forward through the sequence
Not a simple RNN – Has specialized gating mechanisms that simple RNNs lack
Analogy
Like taking notes while reading a book. You have a memory (cell state) where you decide what to write down (input gate), what old notes to erase (forget gate), and what to tell someone asking about the book (output gate).
IV.3GRUCellA simpler alternative to LSTM with fewer gates (just reset and update gates), but still capable of learning long-term dependencies.+
What it is
A simpler alternative to LSTM with fewer gates (just reset and update gates), but still capable of learning long-term dependencies.
Purpose
Providing the benefits of LSTM with fewer parameters and simpler computation, often matching LSTM performance with less overhead.
Common uses
Same applications as LSTM but where simplicity is valued
Situations where LSTM's full complexity isn't needed
Resource-constrained environments
Faster training than LSTM due to fewer parameters
What it's NOT
Not LSTM – Has different and simpler gating mechanism
Not better than LSTM universally – Sometimes matches, sometimes worse, depends on task
Not attention – Still sequential processing with fixed memory
Analogy
Like a simpler note-taking system: instead of separate "what to forget" and "what to remember" decisions, you make combined decisions about updating your notes.
IV.2LinearStateSpaceLayerModels sequences using state-space equations from control theory. Maintains a hidden state that evolves according to linear dynamics.+
What it is
Models sequences using state-space equations from control theory. Maintains a hidden state that evolves according to linear dynamics.
Purpose
Efficiently modeling long sequences by using structured state transitions, often more efficient than attention for very long contexts.
Common uses
Long-range sequence modeling
Efficient alternatives to transformers for long contexts
Time series with linear dynamics
Models needing theoretical connections to control systems
What it's NOT
Not attention – Uses structured state evolution, not learned queries/keys
Not RNN – Linear dynamics, not nonlinear gated updates
Not convolutional – Maintains state, not just local windows
Analogy
Like a cruise control system that maintains speed based on current state and inputs, following predictable linear rules.
IV.3VanillaRNNThe simplest recurrent network. Maintains hidden state and updates it at each time step using a simple linear transformation plus nonlinearity.+
What it is
The simplest recurrent network. Maintains hidden state and updates it at each time step using a simple linear transformation plus nonlinearity.
Purpose
The foundational recurrent architecture. Mostly historical now, but helps understand more complex RNNs.
Common uses
Teaching and understanding recurrent networks
Simple sequence tasks where LSTM is overkill
Theoretical analysis of recurrent dynamics
Rarely used in modern production systems
What it's NOT
Not LSTM or GRU – Lacks gating mechanisms
Not practical for long sequences – Suffers badly from vanishing/exploding gradients
Not attention – Sequential processing with hidden state
Analogy
Like passing a message through a line of people where each person slightly changes the message before passing it on—by the end, the original message (gradient) may be completely garbled.
IV.1MultiHeadLatentAttentionCompress shared key-value information into a learned latent vector before attention.+
What it is
Compress shared key-value information into a learned latent vector before attention.
Purpose
Reduce attention cache storage while retaining multiple query heads.
Common uses
Cache compressed key-value state during autoregressive decoding.
Operations that normalize, scale, or calibrate activations or probabilities without changing the underlying topology. This includes feature-wise normalization, magnitude scaling, and probability calibration transforms.
13 entries
V.1LayerNormNormalizes each example independently across its features, subtracting the mean and dividing by standard deviation, then applying learned scale and shift.+
What it is
Normalizes each example independently across its features, subtracting the mean and dividing by standard deviation, then applying learned scale and shift.
Purpose
Stabilizing training by ensuring features have consistent scale within each example. Essential for transformer architectures.
Common uses
Transformer models (normalization within each token's features)
Recurrent networks
Any architecture where batch size is small or variable
Situations where normalization should be independent per example
What it's NOT
Not batch normalization – Normalizes per example across features, not across batch per feature
Not just standardization – Includes learned scale/shift parameters after normalization
Not L2 normalization – Uses mean and std for normalization, not vector magnitude
Analogy
Like grading students on a curve, but doing it separately for each student's different subjects. Each student gets their own mean/std, ensuring fair comparison across their subjects.
V.1BatchNormNormalizes each feature across the batch, subtracting the batch mean and dividing by batch standard deviation, with learned scale and shift.+
What it is
Normalizes each feature across the batch, subtracting the batch mean and dividing by batch standard deviation, with learned scale and shift.
Purpose
Accelerating training by reducing internal covariate shift. Makes networks less sensitive to initialization and learning rates.
Common uses
Convolutional neural networks for computer vision
Deep networks where training stability is important
After convolutional or dense layers (typically before activation)
Any architecture with large, fixed batch sizes
What it's NOT
Not layer norm – Normalizes across batch per feature, not per example across features
Not dropout – BatchNorm normalizes, doesn't randomly zero elements
Not guaranteed to help every architecture – Works great for CNNs, less effective for transformers
Analogy
Like ensuring all thermometers in a room show similar distributions—you normalize each thermometer's reading against what all other thermometers at that location are showing.
V.1RMSNormSimpler than LayerNorm—normalizes by root-mean-square without centering (no mean subtraction), with learned scale.+
What it is
Simpler than LayerNorm—normalizes by root-mean-square without centering (no mean subtraction), with learned scale.
Purpose
Providing normalization benefits with less computation than LayerNorm. Often performs similarly with lower cost.
Common uses
Large language models where efficiency matters (GPT-3, LLaMA)
Not LayerNorm – Doesn't subtract mean, only normalizes by RMS
Not just scaling – Normalizes by learned magnitude, not just multiplies
Not batch-dependent – Like LayerNorm, operates per example
Analogy
Like ensuring vector lengths are consistent without worrying about where they point. You rescale each vector to have a standard magnitude.
V.1GroupNormDivides channels into groups and normalizes within each group. Hybrid between LayerNorm and BatchNorm.+
What it is
Divides channels into groups and normalizes within each group. Hybrid between LayerNorm and BatchNorm.
Purpose
Providing normalization that works well with small batches, avoiding batch dependence while being more flexible than layer norm.
Common uses
Object detection and segmentation where batch sizes are small
Situations where batch statistics are unreliable
Architectures needing normalization flexibility
Transfer learning where test batches differ from training
What it's NOT
Not batch norm – Doesn't use batch statistics
Not layer norm – Normalizes within groups of channels, not all channels
Not instance normalization – Groups can have multiple channels; instance norm is per-channel
Analogy
Like organizing a large class into small discussion groups and grading on a curve within each group, rather than across the whole class (batch) or per individual (layer).
V.2L2NormalizeScales each vector to have unit length (magnitude of 1) without changing its direction.+
What it is
Scales each vector to have unit length (magnitude of 1) without changing its direction.
Purpose
Making comparisons based on direction rather than magnitude. Essential for similarity metrics and certain loss functions.
Common uses
Face recognition (comparing face embeddings by angle, not magnitude)
Metric learning and similarity-based tasks
Before cosine similarity computations
Creating unit-norm embeddings
What it's NOT
Not LayerNorm – Only normalizes magnitude, doesn't center or use standard deviation
Not softmax – Doesn't convert to probabilities, just ensures unit length
Not whitening – Doesn't decorrelate features
Analogy
Like normalizing all arrows to be the same length while keeping them pointing in their original directions. Only the direction matters, not how long they were.
V.2ClipByValueConstrains values to be within a specified range, setting anything too small to the minimum and anything too large to the maximum.+
What it is
Constrains values to be within a specified range, setting anything too small to the minimum and anything too large to the maximum.
Purpose
Preventing extreme values that could destabilize training or cause numerical issues.
Common uses
Clipping gradients during training to prevent explosions
Constraining outputs to valid ranges
Implementing certain activation functions
Avoiding numerical overflow/underflow
What it's NOT
Not normalization – Doesn't rescale the whole distribution, just clips extremes
Not gradient clipping by norm – Clips values independently, not based on vector magnitude
Not ReLU – Clips on both ends, ReLU only zeros negatives
Analogy
Like speed limits and minimum speeds on a highway. You're free to go any speed between the limits, but if you exceed them, you're brought back to the limit.
V.3SoftmaxConverts a vector of numbers into probabilities that sum to 1. Larger inputs get larger probabilities, exponentially.+
What it is
Converts a vector of numbers into probabilities that sum to 1. Larger inputs get larger probabilities, exponentially.
Purpose
Converting raw scores (logits) into probabilities for multi-class classification. Making decisions interpretable.
Common uses
Final layer of multi-class classifiers
Attention weight computation
Any situation needing probability distributions
Making categorical decisions
What it's NOT
Not sigmoid – Sigmoid is independent per element; softmax ensures outputs sum to 1
Not normalization – While it normalizes, it's specifically for creating probability distributions
Not argmax – Softmax is differentiable; argmax isn't
Not LogSoftmax – Softmax outputs probabilities; LogSoftmax outputs log-probabilities
Analogy
Like dividing a pie where bigger scores get bigger slices, but done exponentially so the biggest score dominates, and all slices sum to the whole pie.
V.2TemperatureScaleDivides logits by a temperature parameter before softmax. Higher temperature makes probabilities more uniform; lower makes them more peaked.+
What it is
Divides logits by a temperature parameter before softmax. Higher temperature makes probabilities more uniform; lower makes them more peaked.
Purpose
Controlling the "confidence" or "sharpness" of probability distributions, useful in distillation and sampling.
Common uses
Knowledge distillation (teacher with high temperature provides "soft" targets)
Text generation (controlling randomness of sampling)
Calibrating overconfident models
Softmax with controllable entropy
What it's NOT
Not general normalization – Specifically for logits before softmax
Not learned – Temperature is a hyperparameter, not trained
Not probability calibration – Related but different; this is about distribution shape
Analogy
Like adjusting the thermostat on decision-making: high temperature makes you more exploratory and uncertain, low temperature makes you more decisive and confident.
V.3LogSoftmaxComputes log of probabilities directly without computing probabilities first. Numerically stable way to get log-probabilities.+
What it is
Computes log of probabilities directly without computing probabilities first. Numerically stable way to get log-probabilities.
Purpose
Used with negative log-likelihood loss. More numerically stable than softmax followed by log.
Common uses
With NLL loss for classification
When you need log-probabilities not probabilities
Information theory applications
More stable than log(softmax(x))
What it's NOT
Not softmax – Outputs log-probabilities, not probabilities
Not just for stability – Required by certain loss functions
Not interchangeable with softmax – Different output scale and interpretation
Analogy
Like measuring earthquakes on a logarithmic scale (Richter) rather than linear scale—more stable and meaningful for extreme values.
V.1LocalResponseNormDivide each activation by an energy measure of nearby channels.+
What it is
Divide each activation by an energy measure of nearby channels.
Purpose
Control competition between neighboring feature channels.
Common uses
Normalize nearby convolutional feature channels.
Tensor and behavior contract
Inputs
Features [N,C,spatial...].
Outputs
Tensor with the same shape.
Parameters
Channel window size, alpha, beta, positive bias k.
Shape and rank constraints
Window size and denominator settings produce a defined normalization.
Behavioral invariants
Normalization neighborhoods extend across channels at fixed spatial positions.
Semantics
Deterministic for the same inputs and declared parameters.
Operations that apply a nonlinear scalar function to each element of a tensor, possibly with simple per-channel or per-element parameters. These are the classical “activations,” but classified more precisely.
54 entries
VI.1ReLUKeeps positive values unchanged, sets negative values to zero. The most popular activation function.+
What it is
Keeps positive values unchanged, sets negative values to zero. The most popular activation function.
Purpose
Introducing nonlinearity while being computationally simple and avoiding vanishing gradients for positive activations.
Common uses
Default activation in most neural networks
After convolutional and dense layers
Hidden layers in most modern architectures
Anywhere simple, effective nonlinearity is needed
What it's NOT
Not linear – Despite its simple form, it's nonlinear because of the kink at zero
Not differentiable at zero – Has a discontinuous derivative, though this rarely matters in practice
Not bounded – Can output arbitrarily large values, unlike sigmoid/tanh
Analogy
Like a valve that only flows one direction. Positive pressure opens it fully; negative pressure closes it completely.
VI.1LeakyReLULike ReLU but allows small negative values through (typically 0.01x the input). Negative inputs don't go to zero, just get reduced.+
What it is
Like ReLU but allows small negative values through (typically 0.01x the input). Negative inputs don't go to zero, just get reduced.
Purpose
Addressing the "dying ReLU" problem where neurons can get stuck outputting zero. Small negative slope keeps gradients alive.
Common uses
Situations where dying neurons are problematic
GANs and other adversarial architectures
Deeper networks where gradient flow is critical
When small negative activations are semantically useful
What it's NOT
Not ReLU – Has non-zero slope for negatives
Not PReLU – Uses fixed slope (not learned)
Not ELU – Uses linear slope for negatives, not exponential
Analogy
Like a valve that fully opens for positive pressure but allows a tiny trickle even for negative pressure, never fully closing.
VI.1PReLULike LeakyReLU but the negative slope is learned rather than fixed. The network decides how much negative input to let through.+
What it is
Like LeakyReLU but the negative slope is learned rather than fixed. The network decides how much negative input to let through.
Purpose
Automatically learning the optimal negative slope for each neuron, rather than using a fixed small value.
Common uses
When you want the benefits of LeakyReLU but with learned parameters
Architectures where activation function tuning is important
Situations where optimal negative slope isn't known
Networks where extra parameters are acceptable
What it's NOT
Not LeakyReLU – Slope is learned, not fixed
Not ReLU – Has learnable negative slope
Not adding significant computation – Just one extra parameter per activation
Analogy
Like a valve where the trickle rate for negative pressure is learned from experience rather than being a fixed setting.
VI.2SigmoidSmoothly maps any real number to a value between 0 and 1. Creates an S-shaped curve.+
What it is
Smoothly maps any real number to a value between 0 and 1. Creates an S-shaped curve.
Purpose
Converting arbitrary values to probabilities or gate values. Squashing outputs into a bounded range.
Common uses
Binary classification (final layer)
Gate mechanisms in LSTMs and GRUs
Attention weights
Anywhere you need outputs between 0 and 1
What it's NOT
Not softmax – Sigmoid is independent per element; softmax creates probabilities that sum to 1
Not tanh – Outputs 0-1, not -1 to 1
Not ideal for hidden layers – Suffers from vanishing gradients; ReLU usually better
Analogy
Like a dimmer switch that can be anywhere from completely off (0) to completely on (1), with smooth adjustment in between.
VI.2TanhMaps any real number to a value between -1 and 1. Like sigmoid but centered at zero.+
What it is
Maps any real number to a value between -1 and 1. Like sigmoid but centered at zero.
Purpose
Similar to sigmoid but zero-centered, which often helps with training. Stronger gradients than sigmoid.
Common uses
RNN hidden states before LSTMs became standard
Situations where zero-centered activations help
Gate mechanisms
Hidden layers when sigmoid-like behavior is wanted
What it's NOT
Not sigmoid – Outputs -1 to 1, not 0 to 1
Not commonly used anymore – Largely replaced by ReLU in modern architectures
Not immune to vanishing gradients – Better than sigmoid, but still has the issue
Analogy
Like a dimmer that goes from full reverse (-1) through off (0) to full forward (1).
VI.3GELUGaussian Error Linear Unit—weights inputs by their value in a Gaussian cumulative distribution. Smooth approximation to ReLU that never fully zeros inputs.+
What it is
Gaussian Error Linear Unit—weights inputs by their value in a Gaussian cumulative distribution. Smooth approximation to ReLU that never fully zeros inputs.
Purpose
Providing smooth, probabilistically-motivated nonlinearity. Better properties than ReLU in some cases, especially for transformers.
Common uses
Transformer models (BERT, GPT, ViT)
Modern language models
Situations where smoothness matters
Architectures where stochasticity-inspired design helps
What it's NOT
Not ReLU – Smooth curve, not a sharp corner; never completely zeros inputs
Not computationally free – More expensive than ReLU (though fast approximations exist)
Not universally better – Architecture-dependent; great for transformers, may not beat ReLU everywhere
Analogy
Like a gate that opens more as the input gets more positive, but uses a smooth probability curve instead of a hard cutoff.
VI.3SiLU (Swish)Multiplies the input by its sigmoid. Self-gated activation that can be negative, unlike ReLU.+
What it is
Multiplies the input by its sigmoid. Self-gated activation that can be negative, unlike ReLU.
Purpose
Providing smooth, self-gating nonlinearity. Can outperform ReLU, especially in deeper networks.
Common uses
Efficient neural network architectures (EfficientNet, mobile models)
Situations where smooth activation helps
Deeper networks where gradient flow is important
Modern computer vision architectures
What it's NOT
Not ReLU – Smooth, not piecewise linear; can be negative
Not just sigmoid – Multiplies input by its sigmoid, doesn't just squash
Not computationally free – Requires sigmoid computation
Analogy
Like a gate that uses its own input signal to decide how much to open—the stronger the positive input, the more it amplifies itself.
VI.3SoftplusSmooth approximation to ReLU. The curve approaches zero for negative inputs and becomes linear for positive inputs, but without sharp corners.+
What it is
Smooth approximation to ReLU. The curve approaches zero for negative inputs and becomes linear for positive inputs, but without sharp corners.
Purpose
Providing ReLU-like behavior with everywhere-differentiable smooth curve. Used when mathematical smoothness is desired.
Operations that introduce stochastic behavior or modify data to improve robustness, regularization, or invariance. This includes noise injection, drop mechanisms, and data augmentation operators expressed at the operation level.
13 entries
VII.2DropoutRandomly sets a fraction of activations to zero during training. Each forward pass drops different random elements.+
What it is
Randomly sets a fraction of activations to zero during training. Each forward pass drops different random elements.
Purpose
Preventing overfitting by forcing the network to not rely on any single neuron. Creates ensemble-like effect from one network.
Common uses
Regularizing fully-connected layers
Preventing co-adaptation of neurons
Most neural networks as standard regularization
After dense layers, before final classification
What it's NOT
Not data augmentation – Applied to internal activations, not input data
Not pruning – Temporary and random during training, not permanent removal
Not BatchNorm – Dropout zeros elements randomly; BatchNorm normalizes
Not active during inference – Usually disabled during testing
Analogy
Like practicing a team sport where random players are benched each game. The team learns not to rely on any one player, making everyone important.
VII.2Dropout2DDrops entire feature maps (channels) instead of individual elements. Spatial dropout for convolutional networks.+
What it is
Drops entire feature maps (channels) instead of individual elements. Spatial dropout for convolutional networks.
Purpose
Preventing co-adaptation of feature maps. More appropriate than regular dropout for convolutional layers.
Common uses
Regularizing convolutional networks
After convolutional layers where spatial structure matters
Preventing channel co-adaptation
Vision architectures
What it's NOT
Not regular dropout – Drops whole channels, not individual pixels
Not spatial dropout on individual features – Operates on entire feature maps
Not stochastic depth – Drops channels, not layers
Analogy
Like turning off entire color channels in an image (all red, all green, etc.) rather than random individual pixels.
VII.2StochasticDepthRandomly skips entire layers during training, using residual connections. Randomly drops computational paths.+
What it is
Randomly skips entire layers during training, using residual connections. Randomly drops computational paths.
Purpose
Regularizing very deep networks, reducing training time, and improving gradient flow.
Common uses
Very deep residual networks
Efficient training of large models
Preventing over-reliance on specific layers
Models with many residual blocks
What it's NOT
Not dropout – Drops entire layers, not activations
Not pruning – Temporary during training, not permanent removal
Not active at test time – All layers used during inference
Analogy
Like practicing a relay race where team members randomly sit out—forces the team to work with different combinations, making everyone essential.
VII.2TokenDropRandomly removes some tokens from a sequence during training. Reduces sequence length dynamically.+
What it is
Randomly removes some tokens from a sequence during training. Reduces sequence length dynamically.
Purpose
Speeding up transformer training, regularization, and forcing models to handle missing information.
Common uses
Efficient transformer training
Vision transformers (dropping image patches)
Regularizing sequence models
Reducing computational cost in long sequences
What it's NOT
Not attention masking – Physically removes tokens, doesn't just mask
Not random token replacement – Removes entirely, doesn't substitute
Not dropout – Removes entire tokens, not individual features
Analogy
Like speed-reading where you skip some words but still understand the passage—forces the model to be robust to missing information.
VII.1UniformRandomDraw independent values uniformly between declared bounds.+
What it is
Draw independent values uniformly between declared bounds.
Purpose
Supply explicit random samples to a neural computation.
Operations that define objectives, learning rules, gradient transforms, schedules, and quantization/compression mechanics. This kingdom captures how models are trained and how parameters and representations are discretized or compressed.
46 entries
VIII.1CrossEntropyLogitsCompares predicted probabilities (from logits) to true labels, measuring how "surprised" the model would be by the true answer.+
What it is
Compares predicted probabilities (from logits) to true labels, measuring how "surprised" the model would be by the true answer.
Purpose
The standard loss for classification. Encourages the model to assign high probability to correct classes.
Common uses
Training classifiers (image classification, text classification, etc.)
Any multi-class prediction task
Language modeling
Most supervised learning with categorical outputs
What it's NOT
Not mean squared error – Cross-entropy is for probabilities/categories; MSE is for continuous values
Not just softmax – Includes both softmax and logarithmic loss computation
Not only for neural networks – Used across machine learning for probabilistic classification
Analogy
Like a penalty for being surprised. If you confidently predict rain (high probability) and it rains, small penalty. If you say "no chance of rain" and it pours, huge penalty.
VIII.1MeanSquaredErrorAverages the squared differences between predictions and targets. Penalizes larger errors more than smaller ones.+
What it is
Averages the squared differences between predictions and targets. Penalizes larger errors more than smaller ones.
Purpose
Standard loss for regression tasks. Measures how far predictions are from true values.
Common uses
Regression (predicting continuous values like prices, temperatures)
Image reconstruction tasks
Denoising autoencoders
Any task where you want to minimize distance to true values
What it's NOT
Not cross-entropy – For continuous values, not categories/probabilities
Not mean absolute error – Squares errors, doesn't just take absolute value
Not robust to outliers – Squared term makes it very sensitive to large errors
Analogy
Like measuring how far your darts land from the bullseye, but giving extra penalty for really bad throws (squaring the distance).
VIII.1KLDivergenceMeasures how one probability distribution differs from another. Asymmetric measure of distribution mismatch.+
What it is
Measures how one probability distribution differs from another. Asymmetric measure of distribution mismatch.
Purpose
Comparing learned distributions to target distributions, especially in variational inference and generative models.
Common uses
Variational autoencoders (matching latent distribution to prior)
Not a distance metric – Asymmetric (KL(P||Q) ≠ KL(Q||P)) and doesn't satisfy triangle inequality
Not cross-entropy – Related but different; cross-entropy includes entropy term
Not symmetric – Order matters; measuring P against Q differs from Q against P
Analogy
Like measuring how much extra information you'd need to describe one distribution using another distribution's coding scheme. The "surprise" of using the wrong distribution.
VIII.2SGDStochastic Gradient Descent—updates parameters by moving them in the direction opposite to the gradient, scaled by learning rate.+
What it is
Stochastic Gradient Descent—updates parameters by moving them in the direction opposite to the gradient, scaled by learning rate.
Purpose
The fundamental optimization algorithm. Adjusts weights to reduce loss.
Common uses
Training neural networks (though often with momentum)
Baseline optimization algorithm
Situations where simplicity is valued
Often augmented with momentum for better performance
What it's NOT
Not an architecture – It's how you train, not what you train
Not guaranteed to find global optimum – Can get stuck in local minima
Not using all data at once – "Stochastic" means it uses batches/samples
Analogy
Like hiking downhill in fog. You can only see your immediate slope (gradient), so you take steps downhill. Learning rate determines step size.
VIII.2AdamAdaptive optimizer that maintains running averages of gradient and squared gradient, automatically adjusting learning rate per parameter.+
What it is
Adaptive optimizer that maintains running averages of gradient and squared gradient, automatically adjusting learning rate per parameter.
Purpose
Providing fast convergence with less learning rate tuning than SGD. Adapts to each parameter's behavior.
Common uses
Default optimizer for many modern architectures
Training transformers and language models
Situations where automatic learning rate adaptation helps
When you want good performance without extensive tuning
What it's NOT
Not always better than SGD – Can generalize worse on some vision tasks
Not parameter-free – Still has hyperparameters (learning rate, betas, epsilon)
Not the same as AdaGrad or RMSProp – Combines ideas from both but with bias correction
Analogy
Like hiking with a smart walking stick that remembers how steep recent slopes were and adjusts your stride accordingly for each leg independently.
VIII.2AdamWAdam with decoupled weight decay. Separates weight decay from the adaptive learning rate.+
What it is
Adam with decoupled weight decay. Separates weight decay from the adaptive learning rate.
Purpose
Fixing a subtle issue in original Adam where weight decay interacted incorrectly with adaptive learning rates.
Common uses
Training large transformers (BERT, GPT, etc.)
Modern deep learning where better regularization helps
Situations where original Adam's weight decay behavior was problematic
Current best-practice for many tasks
What it's NOT
Not hugely different from Adam – Same core algorithm, different weight decay implementation
Not always necessary – Difference matters more for some tasks than others
Not a replacement for all regularization – Still might need dropout, etc.
Analogy
Like Adam's smart walking stick, but also has a separate mechanism that ensures you don't carry unnecessary weight (weight decay) independent of terrain adaptation.
VIII.3GradientClipByNormIf gradient magnitude exceeds a threshold, scale it down to the threshold while preserving direction.+
What it is
If gradient magnitude exceeds a threshold, scale it down to the threshold while preserving direction.
Purpose
Preventing exploding gradients that would destabilize training, especially in recurrent networks.
Common uses
Training RNNs and LSTMs
Any architecture prone to gradient explosion
Reinforcement learning
Situations where gradients can become extreme
What it's NOT
Not gradient clipping by value – Clips based on total magnitude, not individual elements
Not normalization – Only clips when exceeding threshold, doesn't rescale all gradients
Not a replacement for good architecture – Band-aid for gradient problems, not a full solution
Analogy
Like a speed limiter on a car. You can accelerate or brake normally, but if you'd go over the speed limit, the limiter caps your speed.
VIII.3GradientClipByValueClips each element of the gradient independently to be within a range, like [-1, 1].+
What it is
Clips each element of the gradient independently to be within a range, like [-1, 1].
Purpose
Preventing individual gradient elements from becoming extreme and destabilizing updates.
Common uses
Alternative to norm-based clipping
When element-wise extremes are the problem
Some reinforcement learning algorithms
Situations where norm clipping isn't enough
What it's NOT
Not gradient clipping by norm – Clips each element independently, not the overall magnitude
Not the common choice – Norm-based clipping usually preferred
Not preserving gradient direction – Can change direction by clipping elements differently
Analogy
Like limiting individual ingredients in a recipe rather than limiting total amount. Each ingredient has its own cap.
VIII.4UniformAffineQuantizeMaps floating-point values to a discrete set of levels (like 256 levels for 8-bit), using a uniform spacing and learned zero-point/scale.+
What it is
Maps floating-point values to a discrete set of levels (like 256 levels for 8-bit), using a uniform spacing and learned zero-point/scale.
Purpose
Reducing model size and computation by using lower-precision arithmetic while maintaining accuracy.
Common uses
Deploying models on mobile or edge devices
Reducing memory footprint
Speeding up inference with integer arithmetic
Model compression for production
What it's NOT
Not pruning – Reduces precision, doesn't remove weights
Not lossless – Trading accuracy for efficiency
Not only for deployment – Can train with quantization too (quantization-aware training)
Analogy
Like converting a high-resolution photo to one with only 256 colors. Takes less space, loads faster, but loses some detail.
VIII.1BinaryCrossEntropyLoss function for binary classification. Measures how well predicted probabilities match true binary labels (0 or 1).+
What it is
Loss function for binary classification. Measures how well predicted probabilities match true binary labels (0 or 1).
Purpose
Training binary classifiers. Penalizes confident wrong predictions more than uncertain ones.
Multi-label classification (each label is independent binary)
Sigmoid output layers
Any yes/no decision tasks
What it's NOT
Not categorical cross-entropy – For two classes, not many
Not MSE – Designed for probabilities, not continuous values
Not hinge loss – Probabilistic interpretation, not margin-based
Analogy
Like scoring a true/false test where you're heavily penalized for being confidently wrong.
VIII.1HingeLossMargin-based loss from SVM theory. Encourages correct class score to be higher than others by at least a margin.+
What it is
Margin-based loss from SVM theory. Encourages correct class score to be higher than others by at least a margin.
Purpose
Training models to not just classify correctly, but with confident margins.
Common uses
Support vector machines
Ranking problems
Face verification (triplet loss is related)
When margin interpretation is meaningful
What it's NOT
Not cross-entropy – Margin-based, not probabilistic
Not MSE – Encourages margins, not close values
Not only for SVMs – Can be used with neural networks
Analogy
Like a high jump where clearing the bar by any amount counts the same—you just need to beat the threshold by the required margin.
VIII.1ContrastiveLossPulls similar examples together and pushes dissimilar examples apart in embedding space.+
What it is
Pulls similar examples together and pushes dissimilar examples apart in embedding space.
Purpose
Learning representations where semantic similarity corresponds to geometric proximity.
Common uses
Face recognition (learning face embeddings)
Similarity learning
Metric learning
Self-supervised learning
What it's NOT
Not classification loss – Learns embeddings, not class probabilities
Not triplet loss – Uses pairs, not triplets
Not contrastive learning framework – This is the loss; frameworks use it
Analogy
Like organizing magnets where similar ones attract and dissimilar ones repel, naturally clustering related items.
VIII.2SGDWithMomentumSGD that maintains a velocity term, like a ball rolling downhill that builds up speed. Combines current gradient with previous momentum.+
What it is
SGD that maintains a velocity term, like a ball rolling downhill that builds up speed. Combines current gradient with previous momentum.
Purpose
Accelerating convergence and dampening oscillations. Usually much better than plain SGD.
Common uses
Default variant of SGD in most frameworks
Training convolutional networks for vision
When SGD-family optimizers are preferred
Often better generalization than Adam on vision tasks
What it's NOT
Not vanilla SGD – Includes momentum term
Not Adam – Doesn't adapt learning rate per parameter
Not Nesterov momentum – Standard momentum, not lookahead variant
Analogy
Like pushing a heavy cart—once it gets moving, it's easier to keep going and harder to change direction suddenly.
VIII.2AdaGradAdapts learning rate per parameter based on historical gradients. Parameters with large gradients get smaller learning rates.+
What it is
Adapts learning rate per parameter based on historical gradients. Parameters with large gradients get smaller learning rates.
Purpose
Automatically adjusting learning rates for features that appear rarely vs. frequently.
Common uses
Sparse data and NLP (before Adam became dominant)
When different features have vastly different scales
Online learning scenarios
Less common now but historically important
What it's NOT
Not Adam – Simpler, doesn't use momentum
Not RMSProp – Accumulates all history, not recent window
Not the best choice usually – Adam/RMSProp often better
Analogy
Like adjusting your pace based on total distance covered—the more you've walked, the more cautiously you step.
VIII.2RMSPropLike AdaGrad but uses exponential moving average of squared gradients, preventing learning rates from decreasing too much.+
What it is
Like AdaGrad but uses exponential moving average of squared gradients, preventing learning rates from decreasing too much.
Purpose
Adaptive learning rates that don't decay too aggressively, fixing AdaGrad's main weakness.
Common uses
Alternative to Adam
When Adam's bias correction isn't needed
RNN training (historically)
Situations where simpler than Adam is preferred
What it's NOT
Not AdaGrad – Uses moving average, not full history
Not Adam – Lacks momentum and bias correction
Not outdated – Still useful in some contexts
Analogy
Like AdaGrad but with a fading memory—recent terrain matters more than distant past.
VIII.3GradientNoiseInjectionAdds random noise to gradients during training. Deliberate perturbation of gradient signals.+
What it is
Adds random noise to gradients during training. Deliberate perturbation of gradient signals.
Purpose
Regularization, escaping sharp minima, and improving generalization.
Common uses
Improving generalization
Escaping local minima
Reinforcement learning (policy gradient methods)
Researching optimization dynamics
What it's NOT
Not dropout – Adds noise to gradients, not activations
Not data augmentation – Perturbs learning signal, not data
Not common practice – Specialized technique, not standard
Analogy
Like adding small random jiggles while descending a hill to avoid getting stuck in small divots.
VIII.4SymmetricQuantizeQuantization where the zero-point is fixed (usually at 0), and positive/negative ranges are symmetric.+
What it is
Quantization where the zero-point is fixed (usually at 0), and positive/negative ranges are symmetric.
Purpose
Simpler quantization scheme when symmetric ranges suffice. Often used for weights.
Common uses
Weight quantization (weights often roughly symmetric)
When zero-point doesn't need calibration
Simpler hardware implementations
Post-training quantization
What it's NOT
Not affine quantization – No learnable zero-point offset
Not the only choice – Affine can be better for activations
Not lossless – Still approximates original values
Analogy
Like a thermometer centered at zero where positive and negative sides have equal range, simpler than one with an arbitrary zero point.
VIII.4WeightPruningMaskBinary mask that zeros out selected weights permanently. Explicit representation of which weights are "pruned."+
What it is
Binary mask that zeros out selected weights permanently. Explicit representation of which weights are "pruned."
Purpose
Creating sparse networks by removing less important weights, reducing model size and computation.
Common uses
Model compression
Efficient inference
Discovering minimal network structures
Reducing overfitting through structured regularization
What it's NOT
Not dropout – Permanent pruning, not temporary
Not quantization – Removes weights, doesn't reduce precision
Not automatic – Requires strategy for choosing what to prune
Analogy
Like editing a document by permanently deleting unnecessary words rather than just hiding them—smaller final document.
VIII.1NegativeLogLikelihoodScore the log probability assigned to the target class.+
What it is
Score the log probability assigned to the target class.
Purpose
Define an explicit training objective.
Common uses
Train a classifier whose output already contains log probabilities.
Tensor and behavior contract
Inputs
Log probabilities [N,C,...] and integer class targets.
Outputs
Per-target losses or a reduced scalar.
loss = -log_probability[target]
Parameters
Class weights, ignored target index, reduction.
Shape and rank constraints
Targets are valid classes or the ignored index.
Behavioral invariants
The declared reduction and weighting determine the final objective scale.
Semantics
Deterministic for the same inputs and declared parameters.
Examples
Train a classifier whose output already contains log probabilities.
Try another name, an alias such as “GQA,” or a broader purpose.
About the encyclopedia
This encyclopedia catalogs every species in the Neural Operation Taxonomy IndeX (NOTIX). Each entry explains what the operation does, why you'd use it, and what it's not—all in language accessible to someone learning these concepts for the first time.
Every one of the 362 indexed entries has an explicit family and domain. Families group operations by mathematical structure; aliases link to their canonical operations, while compositions and implementation variants retain their documented identities.
The original phylum positions remain stable. Three appended phyla cover tensor construction, graph control flow, and ordered prefix accumulation.
New encyclopedia entries include input/output specifications, parameters, shape constraints, invariants, examples, related operations, and primary references. Numeric identifiers and opcodes remain assigned by the taxonomy generator and kernel registry.
Behavior is rule-based (shape transforms, nonlinearities, norms, dropout, etc.)
A
Algorithmic
Training objectives & losses, optimization, scheduling, gradient transforms, quantization
Domains appear directly in descriptors and binary headers.
Binary Encoding & Header Format
High-Level Layout
The goal is to provide a compact, deterministic, engine-friendly format that still maps cleanly back to the taxonomy and documentation.
The NOTIX header is composed of three 64-bit words (192 bits):
192 bits3 × 64-BIT WORDS
Word 0Identity & taxonomy
Word 1Numerics & layout
Word 2Compact params, dims, role, extension count
Word 3: Reserved / Unused (must be zero for now)Optional 256-bit profile
There is also a 256-bit profile for systems that prefer 32-byte alignment:
Any number of extension words may follow, in 64-bit units, as specified by the header.
Status: Working design intended for implementation. Field layout and semantics are considered stable enough to code against, but any future changes will be versioned via the VERSION field and documented explicitly.
Fusion Composition System
Semantic Equivalence
A fused kernel is a single kernel implementation that performs the equivalent work of multiple atomic operations in sequence.
However, fused kernels can obscure the semantic meaning of what's happening. NOTIX addresses this by requiring every fused kernel to document its composition explicitly.
dense_bias_fp32
XW
II.1MatMulX[M,K], W[K,N]
VI.4Addproduct[M,N], b[N]
Y
MatMul → broadcast Add
The bias is broadcast across rows.
The operation's composition is independent of whether an implementation uses one fused kernel or several instructions. In particular, Dense, DENSE, historical DenseAffine, and native dense_bias_fp32 name MatMul → broadcast Add; they do not introduce a separate atomic species. MatMul remains an atomic member of DenseFamily, and Add retains its own atomic identity in VI.4.
A fused kernel must be semantically equivalent to executing its component operations in sequence.
Opcode Registry & Microkernel ABI
Opcodes vs Species
The goal is to decouple the semantic taxonomy from the execution layer, while keeping a clean, fast, and predictable interface between them.
The descriptor (NOTIX header and NotixOpDesc-like structure) describes a concrete instance of that operation.
The opcode identifies a particular kernel implementation (e.g. dense_f32_rowmajor on CPU).
Dispatch tables map opcodes to kernel pointers, per device or backend.
Taxonomy SpeciesClassId/KindIdDescriptorOpcodeKernel function
Species define semantics; opcodes define how we implement them on a given backend.
Reserved Ranges
These are guidelines; final ranges are defined in the registry doc and codegen tools.
Range
Operation group
0x0001–0x0FFF
Scalar / pointwise operations (Kingdom VI + simple math)