Related Experiment Videos
Learning to Recall with Transformers Beyond Orthogonal Embeddings
Nuri Mert Vural1, Alberto Bietti2, Mahdi Soltanolkotabi3
1University of Toronto and Vector Institute. Work done while interning at the Flatiron Institute.
Summary
This study analyzes large language models (LLMs) trained on finite data with random embeddings. It reveals how sample size, embedding dimension, and sequence length multiplicatively determine the model's knowledge storage capacity.
Area of Science:
- Artificial Intelligence
- Machine Learning Theory
- Deep Learning
Background:
- Large language models (LLMs) demonstrate strong knowledge storage and retrieval capabilities, crucial for tasks like question answering.
- Transformers are key to LLM performance, encoding information during training and retrieving it during inference.
- Current theoretical analyses often use idealized assumptions (infinite data, orthogonal embeddings) not reflective of real-world training.
Purpose of the Study:
- To analyze the storage capacity of transformers under realistic training conditions, specifically finite datasets and non-orthogonal embeddings.
- To investigate the impact of gradient descent on a single-layer transformer's ability to learn token-retrieval tasks.
- To derive explicit formulas for storage capacity and understand its scaling properties.
Main Methods:
- Analysis of a single-layer transformer model using empirical gradient descent.
- Focus on the 'early phase' of training on a token-retrieval task with random embeddings.
- Numerical validation of derived theoretical scalings and comparison with statistical lower bounds.
Main Results:
- Derived explicit formulas for the storage capacity of the transformer model.
- Revealed a multiplicative dependence of storage capacity on sample size (N), embedding dimension (d), and sequence length (L).
- Demonstrated that this multiplicative scaling is intrinsic to the problem under non-orthogonal embeddings.
Conclusions:
- The study provides a theoretical understanding of LLM storage capacity in realistic, non-idealized settings.
- The findings highlight the interplay between data, model architecture, and training dynamics in determining knowledge storage.
- The derived scalings offer insights into designing and training more efficient large language models.
Related Concept Videos
Associative Learning
Associative learning is a fundamental concept in behavioral psychology, wherein a connection is established between two stimuli or events, leading to a learned response. This process is critical in understanding how behaviors are acquired and modified. Conditioning, the mechanism through which associations are formed, can be divided into two main types: classical conditioning and operant conditioning, each elucidating different aspects of associative learning.
Classical conditioning, also known...
Classical conditioning, also known...
Transformers
A device that transforms voltages from one value to another using induction is called a transformer. A transformer consists of two separate coils, or windings, wrapped around the same soft iron core. However, they are electrically insulated from each other.
The iron core has a substantial relative permeability. Therefore, the magnetic field lines generated due to the current in one winding are almost entirely confined within the core, such that the same magnetic flux permeates each turn of both...
The iron core has a substantial relative permeability. Therefore, the magnetic field lines generated due to the current in one winding are almost entirely confined within the core, such that the same magnetic flux permeates each turn of both...
Types Of Transformers
Transformers can provide desired voltages to a circuit by modifying the number of turns in the secondary windings.
If the ratio of the number of turns in the secondary winding to that of the primary winding is greater than one, then the transformer is said to be a step-up transformer. In a step-up transformer, the voltage at the secondary winding is greater than the voltage applied at the primary winding.
However, if this ratio is less than one, the transformer is said to be a step-down...
If the ratio of the number of turns in the secondary winding to that of the primary winding is greater than one, then the transformer is said to be a step-up transformer. In a step-up transformer, the voltage at the secondary winding is greater than the voltage applied at the primary winding.
However, if this ratio is less than one, the transformer is said to be a step-down...
Long-Term Memory
Long-term memory is a relatively permanent type of memory, capable of storing vast amounts of information over extended periods. Its storage capacity is generally considered unlimited.
Long-term memory can be categorized into two primary types: explicit and implicit memory. Explicit memory, also known as declarative memory, involves the conscious recollection of information that we deliberately try to remember, recall, and articulate. This type of memory encompasses specific facts, events, and...
Long-term memory can be categorized into two primary types: explicit and implicit memory. Explicit memory, also known as declarative memory, involves the conscious recollection of information that we deliberately try to remember, recall, and articulate. This type of memory encompasses specific facts, events, and...
Observational Learning
Albert Bandura's observational learning, also known as imitation or modeling, occurs when a person observes and imitates another's behavior. It is a quicker process than operant conditioning. A well-known example is the Bobo doll study, where children who saw an adult acting aggressively towards the doll were more likely to act aggressively when left alone, compared to those who observed a nonaggressive adult. Many psychologists view observational learning as a form of latent learning because...
Transformers with Off-Nominal Turns Ratios
In scenarios involving parallel transformers with disparate ratings, developing per-unit models requires accommodating off-nominal turns ratios. This situation arises when the selected base voltages are not proportional to the transformer’s voltage ratings. Consider a transformer where the rated voltages are related by the term a. If the chosen voltage bases satisfy a relationship involving term b, term c is defined as the ratio of these bases. This ratio is then substituted into the rated...