Manuscript Offprint
arXiv:2610.12741Neural expectation-maximization and meta-models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
We interpret Transformer networks as learned approximations to a hybrid probabilistic-inference procedure that combines max-product Loopy Belief Propagation (LBP) with Expectation–Maximization (EM). In this view, a Transformer performs inference in partially observed Markov Random Fields (MRFs) whose structure and parameters are not given a priori but are inferred from data. We show that self-attention implements a differentiable approximation to max-product LBP on an input-conditioned, dynamically structured MRF, with attention weights encoding learned structural affinities. We further establish an EM correspondence at the level of depth: each layer updates latent representations in an E-step-like forward pass, while the transition across layers acts as an implicit M-step. Building on this interpretation, we introduce meta-models, a design paradigm in which inputs generate instance-specific parameters, unifying mechanisms such as self-attention, mixture-of-experts, and gated units within a single framework. Empirical results support the proposed perspective.
Keywords Self-attention · Transformer · Loopy Belief Propagation · Expectation-Maximization · Meta-Model
1 Introduction

Figure 1: Expectation-Maximization interpretation of DNNs. A layer corresponds to an iteration of the EM. The forward pass corresponds to the E-step. The transition from parameter to the next layer implicitly corresponds to the M-step.

Figure 2: Illustration of a meta-model. The input vector x first interacts with the 3D meta-parameter and outputs the 2D parameter . Then, x interacts with and produces the output z. Meta-model is what makes a model capable of in-context learning. Self-attention, MoE, GLUs, etc. are members of meta-models.
Transformers have become the dominant architecture for modern sequence modeling, language understanding, and large-scale generative modeling since the introduction of self-attention [26]. Despite their empirical success, the internal computation performed by a Transformer remains difficult to characterize in algorithmic terms. A growing body of work has therefore shifted from treating Transformers as black-box function approximators toward explaining what their layers, attention heads, and residual streams compute [8, 22]. This paper contributes to that line of work by asking whether Transformer computation can be understood as a familiar inference procedure rather than as a collection of isolated architectural mechanisms.
Existing explanations illuminate important aspects of Transformer behavior, but they remain partial. Studies of in-context learning show that Transformers can implement gradient-descent-like or Bayesian updates; and message-passing views relate attention to graph computation [1, 5, 28, 27]. However, these perspectives do not fully account for how self-attention, depth, latent-variable refinement, graph-structure selection, and layerwise parameter changes fit into a single probabilistic picture.
We propose such an interpretation by viewing Transformers as neuralized Expectation-Maximization. Under this view, the underlying model is a partially observed Markov Random Field (MRF) with both unknown structure and parameters. Self-attention approximates Loopy Belief Propagation (LBP) over a dynamically inferred graph structure, where the attention between two tokens acts as the soft connection strength within such MRF and the value vector acts as the maximizer of the aggregated message (aka. belief). Successive layers play the role of Expectation-Maximization (EM) iterations [7, 29, 16] for parameter learning. Specifically, a layer of a Transformer corresponds to an iteration of the EM. The forward pass of a layer corresponds to the E-step, where the latent variables are updated based on the last iteration. The change from the parameters of layer to of the next layer implicitly corresponds to the M-step, where the parameters are updated.
This paper makes the following contributions:
• We derive a correspondence between self-attention and approximate LBP on a dynamically structured MRF, where attention weights act as learned structural affinities and values approximate individual message maximizers.
• We interpret the depth of a Transformer as an EM-like iterative procedure in which the forward pass updates latent variables and the transition between layer parameters corresponds to parameter refinement.
• We use this EM perspective to motivate meta-models, a design paradigm in which the parameters of a forward pass are generated from the input by meta-parameters .
• We show that self-attention, Mixture-of-Experts layers, gated mechanisms, LSTM, and selective state-space models can be viewed as members or close relatives of this meta-model principle.
Transformers and expectation-maximization. A line of work interprets transformer depth as iterative probabilistic fitting. [4] prove that transformers can approximate the EM algorithm, together with spectral (tensor power) iterations, on Gaussian mixtures. The first is an interpretation tied to a specific modeling choice, and the second is an expressivity result for a particular model class. The distinction is that our analysis frames the algorithm as probabilistic latent-variable inference: the E-step updates latent variables z, while changes in layer parameters are interpreted as an implicit M-step.
Transformers and belief propagation. Message passing on graphs has long been a template for neural computation. Neural message passing [10] unified many graph architectures under one framework, and Factor Graph Neural Networks [32] extend this to learned message passing on factor graphs. Closer to attention, [33] introduce graphical models with attention to capture context-specific independence, applying them to perceptual grouping. Several recent papers connect transformers directly to BP. Other work uses BP as a design principle: [18] refine self-attention with a one-step BP update to mitigate attention localization in small-scale models, and [17] propose a differential-attention message-passing transformer. These papers either establish an equivalence under specific architectural assumptions or use BP to improve the architecture. The connection between attention and graph computation has also been studied through graph neural networks and graph attention mechanisms [27]. These methods treat attention coefficients as learned edge weights and thereby resemble message passing on graphs.
The present paper differs in its use of BP as the organizing principle: the messages , beliefs , and structural indicators are mapped directly to the components of self-attention.
Dynamic Parameters and Meta-Model Architectures Many successful neural architectures can be interpreted as using input-dependent computation. Hypernetworks [12] established the principle that one network (the meta-parameters) can generate the weights of another. Mixture-of-Experts models route tokens to different experts using learned gates [25], while gated convolutional and recurrent models modulate information flow through input-conditioned gates [6, 14]. More recently, selective state-space models such as Mamba use input-dependent state-space parameters to obtain efficient sequence modeling with dynamic behavior [11].
These architectures are usually studied as separate design families: routing models, gated models, recurrent models, or state-space models. The meta-model view proposed here treats them as instances of a broader principle suggested by EM.
3 Method
LBP and EM are two classic algorithms specialized at doing inference in different situations. LBP make inferences on partially observed models with known structure and parameters, while EM on partially observed models with known structure but unknown parameters. However, with real-life data, not only are they often partially observed but also the underlying structure and parameters are both unknown. Applying either LPB or EM to real-life data will not work effectively. We show that the architecture of Transformers combines LPB and EM to make inferences on such complex data. This combination is what makes Transformers effective.
3.1 The Underlying Model

Figure 3: The PGM that underlies a encoder Transformer. 1) On the left is the original BN: tokens X are generated by a sequence of latent variables Z. Z are further connected to an unknown hierarchy of intermediate layers S, which further traces back to a root cause Y. 2) In the middle is the model after moralization: we abstract away S by moralizing the BN over S into a chain graph. 3) On the right is the model after variable elimination: we perform variable elimination on observed tokens X. The final model is a fully connected MRF on Z and Y.
Let us consider a encoder Transformer and examine the probabilistic graphic model (PGM) that underlies it. Our assumption is that the underlying PGM is a Bayesian Network (BN) as shown on the left of Fig. 3. The sequence of observed tokens is generated by a sequence of latent variables . Z is further connected to an unknown hierarchical of intermediate layers S, which finally trace back to a latent root cause Y. The full factorization is
The structure of S is unknown and dynamic, as it can vary from instance to instance. However, we can abstract it away by moralizing the BN over S into a chain graph, as shown in the middle of Fig. 3. As a last step, we can perform Variable Elimination on observed leaf variables X, as shown to the right of Fig. 3. In this way, we are able to bake the information of an observation into its latent variable . This can be seen as imposing a pseudo prior on :
where is observed. As we shall see later, the embedding of a token can be seen as the maximizer of this pseudo-prior:
After the above operations, we are left with a fully connected MRF on Z and Y. We can unify our notation and treat Y as a special latent variable
Let the set of resultant factors on this MRF be for some . We make the following assumption:
Assumption 1 Any factor whose arity is larger than 2 can be reasonably approximated by the product of a finite number of pairwise factors.
With this assumption, can be approximated by a set of pairwise factors . We posit that this MRF with pairwise factors is the model that Transformer works on implicitly.
Assumption 2 Encoder Transformers implicitly make inferences on MRFs with pairwise factors that vary from instance to instance.
3.2 Attention as Belief Propagation
We show that the attention mechanism can be mapped to the max-product BP algorithm. Given the MRF above, with pairwise factors , where we define as its node potential. In BP, at time step , every variable passes a (max-product) message to every other variable
where is the set of neighbors of node j. Then, at the end of iteration, every variable updates its own belief
Note that for the sake of uniformity, here includes itself and that the self-message . Taking log from both sides,
where indicates whether nodes and are neighbors. In Transformers, each node (or token position) stores the argument that maximizes its log belief:
If we expand each log message at its maximizer using second-order Taylor expansion, then we can write the belief maximizer as the precision-weighted average of the individual message maximizers:
where is the negative Hessian. This equation should look familiar by far. If we further assume that is isotropic,
then,
Self-attention uses the following equations to compute the terms in Eq.12:
(14) where are feature vectors for query, key, and value, and are their weight matrices. We note here that the initial belief , mentioned in the last section. Thus, the embedding of each token can be seen as the maximizer of the prior.
Note that is capable of learning and adjusting the strength of the connection between two variables, which is equivalent to learning the structure of the underlying MRF. Consequently, the repetitive applications of layers of self-attention can be seen as performing LBP to infer the latent variables and inferring the structure of the MRF at the same time.
3.3 Transformers as Expectation-Maximization
In the last section, we see how self-attention handles hidden variables and unknown structure. There is one last loose thread: the unknown parameters. In this section, we show that a Transformer instantiates itself as a hard EM [20] to infer the MAP parameters.
Formally, consider supervised learning. Let x be the input, y the label, z the unobserved latent variables, and the model parameters. The goal of the model is
We have
Let and be, respectively, the parameter and the output of layer l of a Transformer. Then
where we have defined
With Gibbs inequality,
which implies that improvement in results in at least as much improvement in the log likelihood.
The forward pass of layer computes , i.e., the E step. However, instead of computing the exact posterior , layer only runs one iteration of approximate max-product BP to get an estimated maximizer . Then we have
The job of the next layer is to maximize , i.e., the M step. Specifically, The parameter of the next layer corresponds to the parameter that maximizes :
See Fig. 1 for an illustration. In summary, we can view a layer of a Transformer as an iteration of the EM. The forward pass of a layer corresponds to the E step, where the latent variables for each token are updated on the basis of last layer. The change in the parameters of a layer compared to its previous layer implicitly corresponds to the M step, where the model parameters are updated.
The EM point of view has several consequences. Here, we list a few we can think of.
• It provides key insight into the in-context learning capability of Transformers, to be elaborated in the next section.
• Training a model is equivalent to learning an EM algorithm.
• It partly explains the efficacy of ResNet[13], where each layer is only responsible for learning an increment to latent variables.
• The parameters of different layers are essentially different estimates of the same set of parameters. This may partly explain why DNNs do not suffer from significant overfitting [30], because the effective number of parameters remains constant as layers grow. This constitutes a complementary point of view to some previous ones [21, 23, 2].
3.4 Meta-Models
An important consequence of the EM point of view lies in the M-step: . The M-step says that the parameters of layer should be dependent on its input , which implies a procedure that generates parameters based on the input, prior to the forward pass. This leads to a natural model design paradigm defined by the following two sequential passes:
where f is the forward pass, F the meta-forward pass, the parameters, the meta-parameters, and z and respectively the input and output. In the meta-forward pass, F takes z as input and determines what parameters to use in the forward pass. This dynamic generation of parameters is what makes in-context learning possible. In fact, many familiar deep architectures are members of meta-models.
Self-attention as a meta-model . Let be the input and output and be the query, key, and value matrices. The following setup is equivalent to self-attention:
where is the Softmax operation.
MoE as a meta-model . In the Mixture of Experts (MoE) models, let be the number of experts, the parameters for each expert, the routing parameters, and respectively the input and output. The following setup is equivalent to MoE:
where is the Softmax operation. Note that MoE is essentially a meta version of the linear layer.
Meta-models also include LSTM [14] and Mamba [11], which we will leave to interested readers. Meta-models entail a two-pass procedure of thinking about your own thinking, which could possibly be likened to the meta-cognition [9] in psychology.
Meta-Linear model . Here, we also propose a ordinary design for the Meta-Linear layer. Let be a linear operation with parameter and its meta-linear operation with parameter . Then
where and . is some (parameterized) nonlinearity that projects -dimension to -dimension, if . If we let , where is -by- , and interpret as the number of experts, then this is equivalent to a -expert MoE model. The parameter count (excluding nonlinearity) of a Meta-Linear layer is times that of a linear layer. See Fig. 2 for an illustration.
3.5 Generalized Meta-Models
We can further generalize the idea of meta-models to higher orders. Here, we take the linear layer as an example. For an -th order meta-linear (or meta-linear) layer with input and output , the procedure becomes
where is called meta -parameter, and the meta -forward pass. Note, especially, that is the output, and . The parameter count of a generalized meta-linear layer of order is
which grows exponentially with its order.
4 Experiments
4.1 Retrieving the Probabilistic Graphs
If Transformers are indeed making inferences in the PGMs mentioned in Section 3.1, we can somehow retrieve the PGMs from their outputs. In an attempt to do this, we do the following experiments. Given an input text, we take the output feature vector of each token from the last layer of a Transformer, and remove vectors of those non-semantic or special tokens, e.g. punctuations, newlines, </s>, and <pad>. However, the class tokens, e.g. <s> and [CLS], used for final classification, if present, are retained. We compute the similarity matrix S, where each entry is the cosine similarity between two feature vectors.
Then we run single-linkage agglomerative hierarchical clustering algorithm on the matrix to detect hierarchical communities and plot the results as dendrograms. We do experiments on multiple movie reviews and real-life texts from X (formerly Twitter) with multiple Transformers from Huggingface. Models include:
• twitter-roberta-base-sentiment-latest [19]. A RoBERTa-base model pretrained on about 124M tweets (2018-2021) and fine-tuned for three-class sentiment classification (negative, neutral, positive) on the TweetEval benchmark (Loureiro et al., 2022; Barbieri et al., 2020). Its class token is <s>.
• distilbert-base-uncased [24]. A compact (66M parameters), general-purpose English encoder obtained by distilling BERT-base (Sanh et al., 2019). Its class token is [CLS].
• BGE-M3 [3]. A multilingual embedding model built on XLM-RoBERTa (about 568M parameters). Its class token is <s>.
• Qwen3-Embedding-0.6B [31]. A 0.6B-parameter text embedding model derived from the Qwen3 foundation model. It does not have a class token.
The results are shown in Fig. 4. A few important observations can be made from the results.
• Most compound words, phrases, and collocations, e.g. "like-minded", "cleaned up", are immediately grouped together by Transformers. This indicates Transformers are aware of the fact that they form a single entity and each word in a compound is generated by that entity.
• These recognized entities are further merged with other related tokens or entities, forming a hierarchy.
• Some pronouns are immediate neighbors to some other entities to which they refer in the original texts.
• The class token is significantly distant from other communities and is lastly merged into the hierarchy, which indicates that Transformers recognize it as the root cause.
Roberta
"Toy Story 5 is a beautiful, timely story that captures the moment and examines our relationship with technology and real, human connection."
bge-m3

distilbert
Qwen3-Embedding
"Remember that I predicted a long time ago that President Obama will attack Iran because of his inability to negotiate properly-not skilled!"
"I paid for TwitterBlue to support Elon and the platform. He cleaned up the place but lost a ton of advertising revenue. I'm sure there are many like-minded users who cared less about getting their bird painted blue and continue paying their monthly dues."
Figure 4: The agglomerative hierarchical clustering dendrograms for various models and texts. We run single-linkage agglomerative hierarchical clustering algorithm on the features of Transformers' last layer to detect hierarchical communities and plot the results as dendrograms. We can see that the class tokens are lastly merged into the hierarchy, supporting our theory.
4.2 Meta-Linear models
We evaluate the expressiveness and classification capabilities of Linear and Meta-Linear models on synthetic data generated from Gaussian Mixture Models (GMMs).
To evaluate model performance across multiple sub-distributions, we generated distinct 2D datasets (), each consisting of two Gaussian mixture distributions representing Class 0 () and Class 1 (). We repeat the experiments for various number of GMM models of . The generated data are visualized in Fig.5.
Covariance Sampling: For each dataset , a shared covariance matrix is sampled from a Wishart distribution ( ) with scale matrix .
Class Separation: The difference in class means is scaled according to a target Mahalanobis distance , yielding high linear separability (93–98%) per sub-model.
Data Splitting: Each class contains , samples per dataset. The combined dataset is split into training (75%), evaluation (15%), and test (15%) using stratified sampling.
Theoretical classification accuracy: We also compute the theoretical upper bound for classification accuracy on test set using the optimal Bayes decision boundary from training set. For each sub-model , the decision boundary is given by the linear discriminant score , where
Predictions are assigned based on , establishing the ground-truth classification accuracy on the test split.
Models compared: We compare several custom neural network layer formulations designed to dynamically weight input features:
-
Linear: A vanilla linear layer of the form .
-
Meta-Linear: A implementation evaluating , where meta-weight is of shape and meta-bias of . We compare different choices of non-linearity :
• Identity
• Swish(x) = x ⊙ Sigmoid(x)
• Parametrized Swish(x) = x ⊙ Sigmoid(Vx)
• SwiGLU(x) = Vx ⊙ Sigmoid(Vx) ⊙ Wx
• Ground-truth MoE: We can make Meta-Linear equivalent to MoE by . We let number of experts be the ground-truth .
We use Binary Cross-Entropy optimized via ADAM [15] with a learning rate and batch size 32 for 1000 epochs. Loss and accuracy are monitored at each epoch on the training and evaluation set, with final generalization accuracy evaluated on the held-out test dataset. The results are shown in Fig. 6.
Based on the experimental evaluation, the following conclusions can be drawn:
• Baseline Degradation with Multi-Modal Complexity: The vanilla Linear layer is highly effective (accuracy 0.9383) only for simple, linearly separable data (M = 1). As M increases to M = 2, 4, and 8, the classification task becomes significantly non-linear, causing the vanilla Linear model's accuracy to degrade to 0.6283, 0.5361, and ultimately 0.5171, respectively.
• Superior Expressiveness of Meta-Linear Models: Dense Meta-Linear formulations successfully overcome the limitations of the baseline by dynamically weighting weight matrix. Across all multi-modal datasets ( ), the Meta-Linear variants consistently outperform the standard Linear layer, demonstrating a greater capacity to model complex decision boundaries.
• Efficacy of Non-Linear Gating Functions: The specific choice of non-linearity ( ) plays a critical role in the model’s classification capability. Advanced gating mechanisms, particularly SwiGLU and Parametrized Swish (PSwish), provide better adaptability than simpler formulations like the identity (no-gate) function. For instance, at the highest complexity ( ), the Meta-Linear SwiGLU variant achieves an evaluation accuracy of 0.6842, substantially outperforming the vanilla baseline.
Multi-GMM Dataset with Ground-Truth Decision Boundaries

(a) Number of GMMs M = 1
Multi-GMM Dataset with Ground-Truth Decision Boundaries
Multi-GMM Dataset with Ground-Truth Decision Boundaries

(b)
Multi-GMM Dataset with Ground-Truth Decision Boundaries

(c)
Multi-GMM Dataset with Ground-Truth Decision Boundaries

(d)
Figure 5: The generated synthetic multi-GMM data sets consisting of different number of GMM models . with ground-truth Bayes decision boundaries.
• Ground-Truth MoE as the Performance Upper Bound: The Ground-truth MoE, which explicitly sets the number of experts equal to the number of sub-models ( ), establishes the theoretical upper limit for classification accuracy in these experiments. It remains highly robust against dataset complexity, maintaining top-tier accuracies of 0.9400 at M = 2, 0.9022 at M = 4, and 0.8079 at M = 8.
5 Conclusion
This paper has developed a probabilistic-inference interpretation of Transformers as Loopy Belief Propagated Expectation-Maximization. The central problem is to explain how self-attention, depth, latent representation updates, graph-structure selection, and layerwise parameter variation can be understood within one theoretical framework. We argue that self-attention approximates LBP in a dynamically structured MRF, where attention weights encode learned structural affinities and value vectors approximate message-specific maximizers. We further interpreted successive Transformer layers as an EM-like process in which the forward pass updates latent variables and the transition from to acts as an implicit M-step.
This perspective suggests that several known properties of deep architectures have a common origin. Residual depth can be understood as iterative refinement of latent variables, while dynamic computation mechanisms such as self-attention, MoE, gated units, LSTM, and selective state-space models can be viewed as forms of input-conditioned parameter

(a)

(b)

(c)

(d)
Figure 6: Training results for comparing different linear models for different .
generation. Empirical findings are strongly supportive of our claims. Even without empirical claims, the derivations provide a unified language via graphical-model views of Transformer computation.
Future work should make this interpretation quantitatively testable. First, one can measure whether attention maps behave like inferred MRF structures by comparing them with known dependency graphs in synthetic graphical-model tasks. Second, one can test the EM interpretation by tracking whether layer-wise representations and parameters improve a surrogate objective across depth. Third, the meta-model principle motivates new architectures that generate parameters with controlled order and sparsity, allowing a direct study of the tradeoff between expressive dynamic computation and the exponential parameter growth of generalized meta-models.
References
[1] Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma, and Denny Zhou. What learning algorithm is in-context learning? investigations with linear models. In International Conference on Learning Representations, 2023.
[2] Mikhail Belkin, Daniel Hsu, Siyuan Ma, and Soumik Mandal. Reconciling modern machine-learning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116(32):15849–15854, 2019.
[3] Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. Bge m3-embedding: Multilingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. arXiv preprint arXiv:2402.03216, 4(5), 2024.
[4] Zhiheng Chen, Ruofan Wu, and Guanhua Fang. Transformers as unsupervised learning algorithms: A study on gaussian mixtures. arXiv preprint arXiv:2505.11918, 2025. Proves transformers can approximate the EM algorithm and spectral (tensor power) iterations.
[5] Damai Dai, Yutao Sun, Li Dong, Yaru Hao, Zhifang Sui, and Furu Wei. Why can GPT learn in-context? language models secretly perform gradient descent as meta-optimizers. In Findings of the Association for Computational Linguistics: ACL 2023, pages 4005–4019. Association for Computational Linguistics, 2023.
[6] Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 933–941. PMLR, 2017.
[7] Arthur P. Dempster, Nan M. Laird, and Donald B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society: Series B (Methodological), 39(1):1–38, 1977.
[8] Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. A mathematical framework for transformer circuits. Transformer Circuits Thread, 2021.
[9] John H Flavell. Metacognition and cognitive monitoring: A new area of cognitive–developmental inquiry. American psychologist, 34(10):906, 1979.
[10] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. International Conference on Machine Learning (ICML), 2017. arXiv:1704.01212. Canonical message-passing neural network (MPNN).
[11] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023.
[12] David Ha, Andrew Dai, and Quoc V. Le. Hypernetworks. International Conference on Learning Representations (ICLR), 2017. arXiv:1609.09106. Foundational: a network (meta-parameters) generates the weights (parameters) of another network — the meta-model principle.
[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778. IEEE Computer Society, 2016.
[14] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997.
[15] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
[16] Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, Cambridge, MA, 2009.
[17] Chin Wa Lau, Xiang Shi, Ziyan Zheng, Haiwen Cao, and Nian Guo. Interplay between belief propagation and transformer: Differential-attention message passing transformer. arXiv preprint arXiv:2509.15637, 2025.
[18] Nakyung Lee, Yeongoon Kim, Minhae Oh, Suhwan Kim, Jin Woo Koo, Hyewon Jo, and Jungwoo Lee. Mitigating attention localization in small scale: Self-attention refinement via one-step belief propagation. arXiv preprint arXiv:2509.07324, 2025.
[19] Daniel Loureiro, Francesco Barbieri, Leonardo Neves, Luis Espinosa Anke, and Jose Camacho-Collados. Timelms: Diachronic language models from twitter. In Proceedings of the 60th annual meeting of the association for computational linguistics: System demonstrations, pages 251–260, 2022.
[20] Radford M Neal and Geoffrey E Hinton. A view of the em algorithm that justifies incremental, sparse, and other variants. In Learning in graphical models, pages 355–368. Springer, 1998.
[21] Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nathan Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, volume 30, pages 5947–5956. Curran Associates, Inc., 2017.
[22] Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. In-context learning and induction heads. arXiv preprint arXiv:2209.11895, 2022.
[23] Tomaso Poggio, Qianli Liao, and Andrzej Banburski. Complexity control by gradient descent in deep networks. Nature communications, 11(1):1027, 2020.
[24] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.
[25] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In International Conference on Learning Representations, 2017.
[26] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, pages 5998–6008. Curran Associates, Inc., 2017.
[27] Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. Graph attention networks. In International Conference on Learning Representations, 2018.
[28] Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit Bayesian inference. In International Conference on Learning Representations, 2022.
[29] Jonathan S. Yedidia, William T. Freeman, and Yair Weiss. Understanding belief propagation and its generalizations. In Gerhard Lakemeyer and Bernhard Nebel, editors, Exploring Artificial Intelligence in the New Millennium, pages 239–269. Morgan Kaufmann, San Francisco, CA, 2003.
[30] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning (still) requires rethinking generalization. Communications of the ACM, 64(3):107–115, 2021.
[31] Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, An Yang, Dayiheng Liu, Junyang Lin, et al. Qwen3 embedding: Advancing text embedding and reranking through foundation models. arXiv preprint arXiv:2506.05176, 2025.
[32] Zhen Zhang, Mohammed Haroon Dupty, Fan Wu, Javen Qinfeng Shi, and Wee Sun Lee. Factor graph neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2023.
[33] Guangyao Zhou, Wolfgang Lehrach, Antoine Dedieu, Miguel Lázaro-Gredilla, and Dileep George. Graphical models with attention for context-specific independence and an application to perceptual grouping. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2022.