Neural scaling law

Neural scaling law

In machine learning, a neural scaling law is an empirical scaling law that describes how neural network performance changes as key factors are scaled up or down. These factors typically include the number of parameters, training dataset size, and training cost. Some models also exhibit performance gains by scaling inference through increased test-time compute (TTC), extending neural scaling laws beyond training to the deployment phase. == Introduction == In general, a deep learning model can be characterized by four parameters: model size, training dataset size, training cost, and the post-training error rate (e.g., the test set error rate). Each of these variables can be defined as a real number, usually written as N , D , C , L {\displaystyle N,D,C,L} (respectively: parameter count, dataset size, computing cost, and loss). A neural scaling law is a theoretical or empirical statistical law between these parameters. There are also other parameters with other scaling laws. === Size of the model === In most cases, the model's size is simply the number of parameters. However, one complication arises with the use of sparse models, such as mixture-of-expert models. With sparse models, during inference, only a fraction of their parameters are used. In comparison, most other kinds of neural networks, such as transformer models, always use all their parameters during inference. === Size of the training dataset === The size of the training dataset is usually quantified by the number of data points within it. Larger training datasets are typically preferred, as they provide a richer and more diverse source of information from which the model can learn. This can lead to improved generalization performance when the model is applied to new, unseen data. However, increasing the size of the training dataset also increases the computational resources and time required for model training. With the "pretrain, then finetune" method used for most large language models, there are two kinds of training dataset: the pretraining dataset and the finetuning dataset. Their sizes have different effects on model performance. Generally, the finetuning dataset is less than 1% the size of pretraining dataset. In some cases, a small amount of high quality data suffices for finetuning, and more data does not necessarily improve performance. Many scaling laws, due to their inherent diminishing returns nature, value data based on a submodular set function which was shown in a paper on this topic. === Cost of training === Training cost is typically measured in terms of time (how long it takes to train the model) and computational resources (how much processing power and memory are required). It is important to note that the cost of training can be significantly reduced with efficient training algorithms, optimized software libraries, and parallel computing on specialized hardware such as GPUs or TPUs. The cost of training a neural network model is a function of several factors, including model size, training dataset size, the training algorithm complexity, and the computational resources available. In particular, doubling the training dataset size does not necessarily double the cost of training, because one may train the model for several times over the same dataset (each being an "epoch"). === Performance === The performance of a neural network model is evaluated based on its ability to accurately predict the output given some input data. Common metrics for evaluating model performance include: Negative log-likelihood per token (logarithm of perplexity) for language modeling; Accuracy, precision, recall, and F1 score for classification tasks; Mean squared error (MSE) or mean absolute error (MAE) for regression tasks; Elo rating in a competition against other models, such as gameplay or preference by a human judge. Performance can be improved by using more data, larger models, different training algorithms, regularizing the model to prevent overfitting, and early stopping using a validation set. When the performance is a number bounded within the range of [ 0 , 1 ] {\displaystyle [0,1]} , such as accuracy, precision, etc., it often scales as a sigmoid function of cost, as seen in the figures. == Examples == === (Hestness, Narang, et al, 2017) === The 2017 paper is a common reference point for neural scaling laws fitted by statistical analysis on experimental data. Previous works before the 2000s, as cited in the paper, were either theoretical or orders of magnitude smaller in scale. Whereas previous works generally found the scaling exponent to scale like L ∝ D − α {\displaystyle L\propto D^{-\alpha }} , with α ∈ { 0.5 , 1 , 2 } {\displaystyle \alpha \in \{0.5,1,2\}} , the paper found that α ∈ [ 0.07 , 0.35 ] {\displaystyle \alpha \in [0.07,0.35]} . Of the factors they varied, only task can change the exponent α {\displaystyle \alpha } . Changing the architecture optimizers, regularizers, and loss functions, would only change the proportionality factor, not the exponent. For example, for the same task, one architecture might have L = 1000 D − 0.3 {\displaystyle L=1000D^{-0.3}} while another might have L = 500 D − 0.3 {\displaystyle L=500D^{-0.3}} . They also found that for a given architecture, the number of parameters necessary to reach lowest levels of loss, given a fixed dataset size, grows like N ∝ D β {\displaystyle N\propto D^{\beta }} for another exponent β {\displaystyle \beta } . They studied machine translation with LSTM ( α ∼ 0.13 {\displaystyle \alpha \sim 0.13} ), generative language modelling with LSTM ( α ∈ [ 0.06 , 0.09 ] , β ≈ 0.7 {\displaystyle \alpha \in [0.06,0.09],\beta \approx 0.7} ), ImageNet classification with ResNet ( α ∈ [ 0.3 , 0.5 ] , β ≈ 0.6 {\displaystyle \alpha \in [0.3,0.5],\beta \approx 0.6} ), and speech recognition with two hybrid (LSTMs complemented by either CNNs or an attention decoder) architectures ( α ≈ 0.3 {\displaystyle \alpha \approx 0.3} ). === (Henighan, Kaplan, et al, 2020) === A 2020 analysis studied statistical relations between C , N , D , L {\displaystyle C,N,D,L} over a wide range of values and found similar scaling laws, over the range of N ∈ [ 10 3 , 10 9 ] {\displaystyle N\in [10^{3},10^{9}]} , C ∈ [ 10 12 , 10 21 ] {\displaystyle C\in [10^{12},10^{21}]} , and over multiple modalities (text, video, image, text to image, etc.). In particular, the scaling laws it found are (Table 1 of ): For each modality, they fixed one of the two C , N {\displaystyle C,N} , and varying the other one ( D {\displaystyle D} is varied along using D = C / 6 N {\displaystyle D=C/6N} ), the achievable test loss satisfies L = L 0 + ( x 0 x ) α {\displaystyle L=L_{0}+\left({\frac {x_{0}}{x}}\right)^{\alpha }} where x {\displaystyle x} is the varied variable, and L 0 , x 0 , α {\displaystyle L_{0},x_{0},\alpha } are parameters to be found by statistical fitting. The parameter α {\displaystyle \alpha } is the most important one. When N {\displaystyle N} is the varied variable, α {\displaystyle \alpha } ranges from 0.037 {\displaystyle 0.037} to 0.24 {\displaystyle 0.24} depending on the model modality. This corresponds to the α = 0.34 {\displaystyle \alpha =0.34} from the Chinchilla scaling paper. When C {\displaystyle C} is the varied variable, α {\displaystyle \alpha } ranges from 0.048 {\displaystyle 0.048} to 0.19 {\displaystyle 0.19} depending on the model modality. This corresponds to the β = 0.28 {\displaystyle \beta =0.28} from the Chinchilla scaling paper. Given fixed computing budget, optimal model parameter count is consistently around N o p t ( C ) = ( C 5 × 10 − 12 petaFLOP-day ) 0.7 = 9.0 × 10 − 7 C 0.7 {\displaystyle N_{opt}(C)=\left({\frac {C}{5\times 10^{-12}{\text{petaFLOP-day}}}}\right)^{0.7}=9.0\times 10^{-7}C^{0.7}} The parameter 9.0 × 10 − 7 {\displaystyle 9.0\times 10^{-7}} varies by a factor of up to 10 for different modalities. The exponent parameter 0.7 {\displaystyle 0.7} varies from 0.64 {\displaystyle 0.64} to 0.75 {\displaystyle 0.75} for different modalities. This exponent corresponds to the ≈ 0.5 {\displaystyle \approx 0.5} from the Chinchilla scaling paper. It's "strongly suggested" (but not statistically checked) that D o p t ( C ) ∝ N o p t ( C ) 0.4 ∝ C 0.28 {\displaystyle D_{opt}(C)\propto N_{opt}(C)^{0.4}\propto C^{0.28}} . This exponent corresponds to the ≈ 0.5 {\displaystyle \approx 0.5} from the Chinchilla scaling paper. The scaling law of L = L 0 + ( C 0 / C ) 0.048 {\displaystyle L=L_{0}+(C_{0}/C)^{0.048}} was confirmed during the training of GPT-3 (Figure 3.1 ). === Chinchilla scaling (Hoffmann, et al, 2022) === One particular scaling law ("Chinchilla scaling") states that, for a large language model (LLM) autoregressively trained for one epoch, with a cosine learning rate schedule, we have: { C = C 0 N D L = A N α + B D β + L 0 {\displaystyle {\begin{cases}C=C_{0}ND\\L={\frac {A}{N^{\alpha }}}+{\frac {B}{D^{\beta }}}+L_{0}\end{cases}}} where the variables are C {\displaystyle C} is the cost o

StatCrunch

StatCrunch is a web-based statistical software application from Pearson Education. StatCrunch was originally created for use in college statistics courses. As a full-featured statistics package, it is now also used for research and for other statistical analysis purposes. == History == American statistics professor Webster West created StatCrunch in 1997. Over the next 19 years West assisted by others added many more statistical procedures and graphing capabilities, and made user interface improvements. In 2005, West received two awards for StatCrunch: the CAUSEweb Resource of the Year Award and the MERLOT Classics Award. In 2013, the StatCrunch Java code was rewritten in JavaScript in order to avoid Java browser security problems, and so that it would run on iOS and Android. In 2015, new ways of importing data were added, including importing multi-page data directly from Wikipedia tables and other Web sources, and also importing with drag-and-drop for various data formats. In 2016, StatCrunch was acquired by Pearson Education, which had already been serving as the primary distributor of StatCrunch for several years. == Software == A StatCrunch license is included with many of Pearson's statistical textbooks. Because StatCrunch is a web application, it works on multiple platforms, including Windows, macOS, iOS, and Android. Data in StatCrunch is represented in a "data table" view, which is similar to a spreadsheet view, but unlike spreadsheets, the cells in a data table can only contain numbers or text. Formulas cannot be stored in these cells. There are many ways to import data into StatCrunch. Data can be typed directly into cells in the data table. Entire blocks of data may be cut-and-pasted into the data table. Text files (.csv, .txt, etc.) and Microsoft Excel files (.xls and .xlsx) can be drag-and-dropped into the data table. Data can be pulled into StatCrunch directly from Wikipedia tables or other Web tables, including multi-page tables. Data can be loaded directly from Google Drive and Dropbox. Shared data sets saved by other StatCrunch community users can be searched for by title or keyword and opened in a data table. Graphs, results, and reports created by StatCrunch can be shared with other users, in addition to the sharing of data sets. StatCrunch has a library of data transformation functions. StatCrunch can also recode and reorganize data. All data is stored in memory, and all processing happens on the client, so response is fast, even with large data sets. StatCrunch can interact with multiple graphs simultaneously. If a user selects a data point on one graph, then that same data point is highlighted on all other displayed graphs. In addition to standard statistical and graphing procedures, StatCrunch has a collection of about forty "applets" which illustrate statistical concepts interactively.

Scott Fahlman

Scott Elliott Fahlman (born March 21, 1948) is an American computer scientist and Professor Emeritus at Carnegie Mellon University's Language Technologies Institute and Computer Science Department. He is notable for early work on automated planning and scheduling in a blocks world, on semantic networks, on neural networks (especially the cascade correlation algorithm), on the programming languages Dylan, and Common Lisp (especially CMU Common Lisp), and he was one of the founders of Lucid Inc. During the period when it was standardized, he was recognized as "the leader of Common Lisp." From 2006 to 2015, Fahlman was engaged in developing a knowledge base named Scone, based in part on his thesis work on the NETL Semantic Network. He also is credited with coining the use of the emoticon. == Life and career == Fahlman was born in Medina, Ohio, the son of Lorna May (Dean) and John Emil Fahlman. He attended the Massachusetts Institute of Technology (MIT), where he received a Bachelor of Science (B.S.) and Master of Science (M.S.) degree in electrical engineering and computer science in 1973, and a Doctor of Philosophy (Ph.D.) in artificial intelligence in 1977. He has noted that his doctoral diploma says the degree was awarded for "original research as demonstrated by a thesis in the field of Artificial Intelligence" and suggested that it may be the first doctorate to use that term. He is a fellow of the American Association for Artificial Intelligence. Fahlman acted as thesis advisor for Donald Cohen, David B. McDonald, David S. Touretzky, Skef Wholey, Justin Boyan, Michael Witbrock, and Alicia Tribble Sagae. From May 1996 to July 2001, Fahlman directed the Justsystem Pittsburgh Research Center. === Boltzmann Machine (1983) === In 1983, Fahlman, Geoffrey Hinton, and Terry Sejnowski published a paper in Proceedings of the AAAI-83 Conference, Washington DC, August 1983. The paper was titled as "Massively Parallel Architectures for AI: NETL, Thistle and Boltzmann Machines". === Emoticons === Fahlman was not the first to suggest the concept of the emoticon – a similar concept for a marker appeared in an article of Reader's Digest in May 1967, although that idea was never put into practice. In an interview printed in The New York Times in 1969, Vladimir Nabokov noted: "I often think there should exist a special typographical sign for a smile – some sort of concave mark, a supine round bracket." Fahlman is credited with originating the first smiley emoticon, which he thought would help people on a message board at Carnegie Mellon to distinguish serious posts from jokes. He proposed the use of :-) and :-( for this purpose, and the symbols caught on. The original message from which these symbols originated was posted on 19 September 1982. The message was recovered by Jeff Baird on 10 September 2002 and read: 19-Sep-82 11:44 Scott E Fahlman :-) From: Scott E Fahlman I propose that the following character sequence for joke markers: :-) Read it sideways. Actually, it is probably more economical to mark things that are NOT jokes, given current trends. For this, use :-(

How to Choose an AI Video Generator

Looking for the best AI video generator? An AI video generator is software that uses machine learning to help you get more done — it can save you hours every week by automating repetitive work. Most options offer a generous free tier, with paid plans unlocking higher limits, faster processing, and team features. Whether you are a beginner or a pro, the right AI video generator slots into your workflow and pays for itself fast. This guide breaks down the top picks, their pros and cons, and who each one is best for.

Imitation learning

Imitation learning is a paradigm in reinforcement learning, where an agent learns to perform a task by supervised learning from expert demonstrations . It is also called learning from demonstration and apprenticeship learning. It has been applied to underactuated robotics, self-driving cars, quadcopter navigation, helicopter aerobatics, and locomotion. == Approaches == Expert demonstrations are recordings of an expert performing the desired task, often collected as state-action pairs ( o t ∗ , a t ∗ ) {\displaystyle (o_{t}^{},a_{t}^{})} . === Behavior Cloning === Behavior Cloning (BC) is the most basic form of imitation learning. Essentially, it uses supervised learning to train a policy π θ {\displaystyle \pi _{\theta }} such that, given an observation o t {\displaystyle o_{t}} , it would output an action distribution π θ ( ⋅ | o t ) {\displaystyle \pi _{\theta }(\cdot |o_{t})} that is approximately the same as the action distribution of the experts. BC is susceptible to distribution shift. Specifically, if the trained policy differs from the expert policy, it might find itself straying from expert trajectory into observations that would have never occurred in expert trajectories. This was already noted by ALVINN, where they trained a neural network to drive a van using human demonstrations. They noticed that because a human driver never strays far from the path, the network would never be trained on what action to take if it ever finds itself straying far from the path. === DAgger === DAgger (Dataset Aggregation) improves on behavior cloning by iteratively training on a dataset of expert demonstrations. In each iteration, the algorithm first collects data by rolling out the learned policy π θ {\displaystyle \pi _{\theta }} . Then, it queries the expert for the optimal action a t ∗ {\displaystyle a_{t}^{}} on each observation o t {\displaystyle o_{t}} encountered during the rollout. Finally, it aggregates the new data into the dataset D ← D ∪ { ( o 1 , a 1 ∗ ) , ( o 2 , a 2 ∗ ) , . . . , ( o T , a T ∗ ) } {\displaystyle D\leftarrow D\cup \{(o_{1},a_{1}^{}),(o_{2},a_{2}^{}),...,(o_{T},a_{T}^{})\}} and trains a new policy on the aggregated dataset. === Decision transformer === The Decision Transformer approach models reinforcement learning as a sequence modelling problem. Similar to Behavior Cloning, it trains a sequence model, such as a Transformer, that models rollout sequences ( R 1 , o 1 , a 1 ) , ( R 2 , o 2 , a 2 ) , … , ( R t , o t , a t ) , {\displaystyle (R_{1},o_{1},a_{1}),(R_{2},o_{2},a_{2}),\dots ,(R_{t},o_{t},a_{t}),} where R t = r t + r t + 1 + ⋯ + r T {\displaystyle R_{t}=r_{t}+r_{t+1}+\dots +r_{T}} is the sum of future reward in the rollout. During training time, the sequence model is trained to predict each action a t {\displaystyle a_{t}} , given the previous rollout as context: ( R 1 , o 1 , a 1 ) , ( R 2 , o 2 , a 2 ) , … , ( R t , o t ) {\displaystyle (R_{1},o_{1},a_{1}),(R_{2},o_{2},a_{2}),\dots ,(R_{t},o_{t})} During inference time, to use the sequence model as an effective controller, it is simply given a very high reward prediction R {\displaystyle R} , and it would generalize by predicting an action that would result in the high reward. This was shown to scale predictably to a Transformer with 1 billion parameters that is superhuman on 41 Atari games. === Other approaches === See for more examples. == Related approaches == Inverse Reinforcement Learning (IRL) learns a reward function that explains the expert's behavior and then uses reinforcement learning to find a policy that maximizes this reward. Recent works have also explored multi-agent extensions of IRL in networked systems. Generative Adversarial Imitation Learning (GAIL) uses generative adversarial networks (GANs) to match the distribution of agent behavior to the distribution of expert demonstrations. It extends a previous approach using game theory.

Autoscaling

Autoscaling, (also written as auto scaling, auto-scaling, or known as automatic scaling), is a method used in cloud computing that dynamically adjusts the amount of computational resources in a server farm - typically measured by the number of active servers - automatically based on the load on the farm. For example, the number of servers running behind a web application may be increased or decreased automatically based on the number of active users on the site. Since such metrics may change dramatically throughout the course of the day, and servers are a limited resource that cost money to run even while idle, there is often an incentive to run "just enough" servers to support the current load while still being able to support sudden and large spikes in activity. Autoscaling is helpful for such needs, as it can reduce the number of active servers when activity is low, and launch new servers when activity is high. Autoscaling is closely related to, and builds upon, the idea of load balancing. == Advantages == Autoscaling offers the following advantages: For companies running their own web server infrastructure, autoscaling typically means allowing some servers to go to sleep during times of low load, saving on electricity costs (as well as water costs if water is being used to cool the machines). For companies using infrastructure hosted in the cloud, autoscaling can mean lower bills, because most cloud providers charge based on total usage rather than maximum capacity. Even for companies that cannot reduce the total compute capacity they run or pay for at any given time, autoscaling can help by allowing the company to run less time-sensitive workloads on machines that get freed up by autoscaling during times of low traffic. Autoscaling solutions, such as the one offered by Amazon Web Services, can also take care of replacing unhealthy instances and therefore protecting somewhat against hardware, network, and application failures. Autoscaling can offer greater uptime and more availability in cases where production workloads are variable and unpredictable. Autoscaling differs from having a fixed daily, weekly, or yearly cycle of server use in that it is responsive to actual usage patterns, and thus reduces the potential downside of having too few or too many servers for the traffic load. For instance, if traffic is usually lower at midnight, then a static scaling solution might schedule some servers to sleep at night, but this might result in downtime on a night where people happen to use the Internet more (for instance, due to a viral news event). Autoscaling, on the other hand, can handle unexpected traffic spikes better. == Terminology == In the list below, we use the terminology used by Amazon Web Services (AWS). However, alternative names are noted and terminology that is specific to the names of Amazon services is not used for the names. == Practice == === Amazon Web Services (AWS) === Amazon Web Services launched the Amazon Elastic Compute Cloud (EC2) service in August 2006, that allowed developers to programmatically create and terminate instances (machines). At the time of initial launch, AWS did not offer autoscaling, but the ability to programmatically create and terminate instances gave developers the flexibility to write their own code for autoscaling. Third-party autoscaling software for AWS began appearing around April 2008. These included tools by Scalr and RightScale. RightScale was used by Animoto, which was able to handle Facebook traffic by adopting autoscaling. On May 18, 2009, Amazon launched its own autoscaling feature along with Elastic Load Balancing, as part of Amazon Elastic Compute Cloud. Autoscaling is now an integral component of Amazon's EC2 offering. Autoscaling on Amazon Web Services is done through a web browser or the command line tool. In May 2016 Autoscaling was also offered in AWS ECS Service. On-demand video provider Netflix documented their use of autoscaling with Amazon Web Services to meet their highly variable consumer needs. They found that aggressive scaling up and delayed and cautious scaling down served their goals of uptime and responsiveness best. In an article for TechCrunch, Zev Laderman, the co-founder and CEO of Newvem, a service that helps optimize AWS cloud infrastructure, recommended that startups use autoscaling in order to keep their Amazon Web Services costs low. Various best practice guides for AWS use suggest using its autoscaling feature even in cases where the load is not variable. That is because autoscaling offers two other advantages: automatic replacement of any instances that become unhealthy for any reason (such as hardware failure, network failure, or application error), and automatic replacement of spot instances that get interrupted for price or capacity reasons, making it more feasible to use spot instances for production purposes. Netflix's internal best practices require every instance to be in an autoscaling group, and its conformity monkey terminates any instance not in an autoscaling group in order to enforce this best practice. === Microsoft's Windows Azure === On June 27, 2013, Microsoft announced that it was adding autoscaling support to its Windows Azure cloud computing platform. Documentation for the feature is available on the Microsoft Developer Network. === Oracle Cloud === Oracle Cloud Platform allows server instances to automatically scale a cluster in or out by defining an auto-scaling rule. These rules are based on CPU and/or memory utilization and determine when to add or remove nodes. === Google Cloud Platform === On November 17, 2014, the Google Compute Engine announced a public beta of its autoscaling feature for use in Google Cloud Platform applications. As of March 2015, the autoscaling tool is still in Beta. === Facebook === In a blog post in August 2014, a Facebook engineer disclosed that the company had started using autoscaling to bring down its energy costs. The blog post reported a 27% decline in energy use for low traffic hours (around midnight) and a 10-15% decline in energy use over the typical 24-hour cycle. === Kubernetes Horizontal Pod Autoscaler === Kubernetes Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replicaset based on observed CPU utilization (or, with beta support, on some other, application-provided metrics) == Alternative autoscaling decision approaches == Autoscaling by default uses reactive decision approach for dealing with traffic scaling: scaling only happens in response to real-time changes in metrics. In some cases, particularly when the changes occur very quickly, this reactive approach to scaling is insufficient. Two other kinds of autoscaling decision approaches are described below. === Scheduled autoscaling approach === This is an approach to autoscaling where changes are made to the minimum size, maximum size, or desired capacity of the autoscaling group at specific times of day. Scheduled scaling is useful, for instance, if there is a known traffic load increase or decrease at specific times of the day, but the change is too sudden for reactive approach based autoscaling to respond fast enough. AWS autoscaling groups support scheduled scaling. === Predictive autoscaling === This approach to autoscaling uses predictive analytics. The idea is to combine recent usage trends with historical usage data as well as other kinds of data to predict usage in the future, and autoscale based on these predictions. For parts of their infrastructure and specific workloads, Netflix found that Scryer, their predictive analytics engine, gave better results than Amazon's reactive autoscaling approach. In particular, it was better for: Identifying huge spikes in demand in the near future and getting capacity ready a little in advance Dealing with large-scale outages, such as failure of entire availability zones and regions Dealing with variable traffic patterns, providing more flexibility on the rate of scaling out or in based on the typical level and rate of change in demand at various times of day On November 20, 2018, AWS announced that predictive scaling would be available as part of its autoscaling offering.

Hebbian theory

Hebbian theory is a neuropsychological theory claiming that an increase in synaptic efficacy arises from a presynaptic cell's repeated and persistent stimulation of a postsynaptic cell. It is an attempt to explain synaptic plasticity, the adaptation of neurons during the learning process. Hebbian theory was introduced by Donald Hebb in his 1949 book The Organization of Behavior. The theory is also called Hebb's rule, Hebb's law, Hebb's postulate, and cell assembly theory. Hebb states it as follows: Let us assume that the persistence or repetition of a reverberatory activity (or "trace") tends to induce lasting cellular changes that add to its stability. ... When an axon of cell A is near enough to excite a cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A's efficiency, as one of the cells firing B, is increased. The theory is often summarized as "Neurons that fire together, wire together." However, Hebb emphasized that cell A needs to "take part in firing" cell B, and such causality can occur only if cell A fires just before, not at the same time as, cell B. This aspect of causation in Hebb's work foreshadowed what is now known about spike-timing-dependent plasticity, which requires temporal precedence. Hebbian theory attempts to explain associative or Hebbian learning, in which simultaneous activation of cells leads to pronounced increases in synaptic strength between those cells. It also provides a biological basis for errorless learning methods for education and memory rehabilitation. In the study of neural networks in cognitive function, it is often regarded as the neuronal basis of unsupervised learning. == Engrams, cell assembly theory, and learning == Hebbian theory provides an explanation for how neurons might connect to become engrams, which may be stored in overlapping cell assemblies, or groups of neurons that encode specific information. Initially created as a way to explain recurrent activity in specific groups of cortical neurons, Hebb's theories on the form and function of cell assemblies can be understood from the following: The general idea is an old one, that any two cells or systems of cells that are repeatedly active at the same time will tend to become 'associated' so that activity in one facilitates activity in the other. Hebb also wrote: When one cell repeatedly assists in firing another, the axon of the first cell develops synaptic knobs (or enlarges them if they already exist) in contact with the soma of the second cell. D. Alan Allport posits additional ideas regarding cell assembly theory and its role in forming engrams using the concept of auto-association, or the brain's ability to retrieve information based on a partial cue, described as follows: If the inputs to a system cause the same pattern of activity to occur repeatedly, the set of active elements constituting that pattern will become increasingly strongly inter-associated. That is, each element will tend to turn on every other element and (with negative weights) to turn off the elements that do not form part of the pattern. To put it another way, the pattern as a whole will become 'auto-associated'. We may call a learned (auto-associated) pattern an engram. Research conducted in the laboratory of Nobel laureate Eric Kandel has provided evidence supporting the role of Hebbian learning mechanisms at synapses in the marine gastropod Aplysia californica. Because synapses in the peripheral nervous system of marine invertebrates are much easier to control in experiments, Kandel's research found that Hebbian long-term potentiation along with activity-dependent presynaptic facilitation are both necessary for synaptic plasticity and classical conditioning in Aplysia californica. While research on invertebrates has established fundamental mechanisms of learning and memory, much of the work on long-lasting synaptic changes between vertebrate neurons involves the use of non-physiological experimental stimulation of brain cells. However, some of the physiologically relevant synapse modification mechanisms that have been studied in vertebrate brains do seem to be examples of Hebbian processes. One such review indicates that long-lasting changes in synaptic strengths can be induced by physiologically relevant synaptic activity using both Hebbian and non-Hebbian mechanisms. == Principles == In artificial neurons and artificial neural networks, Hebb's principle can be described as a method of determining how to alter the weights between model neurons. The weight between two neurons increases if the two neurons activate simultaneously, and reduces if they activate separately. Nodes that tend to be either both positive or both negative at the same time have strong positive weights, while those that tend to be opposite have strong negative weights. The following is a formulaic description of Hebbian learning (many other descriptions are possible): w i j = x i x j , {\displaystyle \,w_{ij}=x_{i}x_{j},} where w i j {\displaystyle w_{ij}} is the weight of the connection from neuron j {\displaystyle j} to neuron i {\displaystyle i} , and x i {\displaystyle x_{i}} is the input for neuron i {\displaystyle i} . This is an example of pattern learning, where weights are updated after every training example. In a Hopfield network, connections w i j {\displaystyle w_{ij}} are set to zero if i = j {\displaystyle i=j} (no reflexive connections allowed). With binary neurons (activations either 0 or 1), connections would be set to 1 if the connected neurons have the same activation for a pattern. When several training patterns are used, the expression becomes an average of the individuals: w i j = 1 p ∑ k = 1 p x i k x j k , {\displaystyle w_{ij}={\frac {1}{p}}\sum _{k=1}^{p}x_{i}^{k}x_{j}^{k},} where w i j {\displaystyle w_{ij}} is the weight of the connection from neuron j {\displaystyle j} to neuron i {\displaystyle i} , p {\displaystyle p} is the number of training patterns and x i k {\displaystyle x_{i}^{k}} the k {\displaystyle k} -th input for neuron i {\displaystyle i} . This is learning by epoch, with weights updated after all the training examples are presented and is last term applicable to both discrete and continuous training sets. Again, in a Hopfield network, connections w i j {\displaystyle w_{ij}} are set to zero if i = j {\displaystyle i=j} (no reflexive connections). A variation of Hebbian learning that takes into account phenomena such as blocking and other neural learning phenomena is the mathematical model of Harry Klopf. Klopf's model assumes that parts of a system with simple adaptive mechanisms can underlie more complex systems with more advanced adaptive behavior, such as neural networks. == Relationship to unsupervised learning, stability, and generalization == Because of the simple nature of Hebbian learning, based only on the coincidence of pre- and post-synaptic activity, it may not be intuitively clear why this form of plasticity leads to meaningful learning. However, it can be shown that Hebbian plasticity does pick up the statistical properties of the input in a way that can be categorized as unsupervised learning. This can be mathematically shown in a simplified example. Let us work under the simplifying assumption of a single rate-based neuron of rate y ( t ) {\displaystyle y(t)} , whose inputs have rates x 1 ( t ) . . . x N ( t ) {\displaystyle x_{1}(t)...x_{N}(t)} . The response of the neuron y ( t ) {\displaystyle y(t)} is usually described as a linear combination of its input, ∑ i w i x i {\displaystyle \sum _{i}w_{i}x_{i}} , followed by a response function f {\displaystyle f} : y = f ( ∑ i = 1 N w i x i ) . {\displaystyle y=f\left(\sum _{i=1}^{N}w_{i}x_{i}\right).} As defined in the previous sections, Hebbian plasticity describes the evolution in time of the synaptic weight w {\displaystyle w} : d w i d t = η x i y . {\displaystyle {\frac {dw_{i}}{dt}}=\eta x_{i}y.} Assuming, for simplicity, an identity response function f ( a ) = a {\displaystyle f(a)=a} , we can write d w i d t = η x i ∑ j = 1 N w j x j {\displaystyle {\frac {dw_{i}}{dt}}=\eta x_{i}\sum _{j=1}^{N}w_{j}x_{j}} or in matrix form: d w d t = η x x T w . {\displaystyle {\frac {d\mathbf {w} }{dt}}=\eta \mathbf {x} \mathbf {x} ^{T}\mathbf {w} .} As in the previous chapter, if training by epoch is done an average ⟨ … ⟩ {\displaystyle \langle \dots \rangle } over discrete or continuous (time) training set of x {\displaystyle \mathbf {x} } can be done: d w d t = ⟨ η x x T w ⟩ = η ⟨ x x T ⟩ w = η C w . {\displaystyle {\frac {d\mathbf {w} }{dt}}=\langle \eta \mathbf {x} \mathbf {x} ^{T}\mathbf {w} \rangle =\eta \langle \mathbf {x} \mathbf {x} ^{T}\rangle \mathbf {w} =\eta C\mathbf {w} .} where C = ⟨ x x T ⟩ {\displaystyle C=\langle \,\mathbf {x} \mathbf {x} ^{T}\rangle } is the correlation matrix of the input under the additional assumption that ⟨ x ⟩ = 0 {\displaystyle \langle \mathbf