Multimodal learning

From HandWiki
Short description: Machine learning methods using multiple input modalities

Multimodal learning, in the context of machine learning, is a type of deep learning using a combination of various modalities of data, often arising in real-world applications. An example of multi-modal data is data that combines text (typically represented as feature vector) with imaging data consisting of pixel intensities and annotation tags. As these modalities have fundamentally different statistical properties, combining them is non-trivial, which is why specialized modelling strategies and algorithms are required. The model is then trained to able to understand and work with multiple forms of data.

Motivation

Many models and algorithms have been implemented to retrieve and classify certain types of data, e.g. image or text (where humans who interact with machines can extract images in form of pictures and texts that could be any message etc.). However, data usually come with different modalities (it is the degree to which a system's components may be separated or combined) which carry different information. For example, it is very common to caption an image to convey the information not presented in the image itself. Similarly, sometimes it is more straightforward to use an image to describe the information which may not be obvious from texts. As a result, if different words appear in similar images, then these words likely describe the same thing. Conversely, if a word is used to describe seemingly dissimilar images, then these images may represent the same object. Thus, in cases dealing with multi-modal data, it is important to use a model which is able to jointly represent the information such that the model can capture the correlation structure between different modalities. Moreover, it should also be able to recover missing modalities given observed ones (e.g. predicting possible image object according to text description). The Multimodal Deep Boltzmann Machine model satisfies the above purposes.

Background: Boltzmann machine

A Boltzmann machine is a type of stochastic neural network invented by Geoffrey Hinton and Terry Sejnowski in 1985. Boltzmann machines can be seen as the stochastic, generative counterpart of Hopfield nets. They are named after the Boltzmann distribution in statistical mechanics. The units in Boltzmann machines are divided into two groups: visible units and hidden units. General Boltzmann machines allow connection between any units. However, learning is impractical using general Boltzmann Machines because the computational time is exponential to the size of the machine[citation needed]. A more efficient architecture is called restricted Boltzmann machine where connection is only allowed between hidden unit and visible unit, which is described in the next section.

Restricted Boltzmann machine

A restricted Boltzmann machine[1] is an undirected graph model with stochastic visible variables and stochastic hidden variables. Each visible variable is connected to each hidden variable. The energy function of the model is defined as

[math]\displaystyle{ E(\mathbf v,\mathbf h;\theta) = -\sum_{i=1}^D\sum_{j=1}^{F}W_{ij}v_ih_j -\sum_{i=1}^Db_iv_i -\sum_{j=1}^Fa_jh_j }[/math]

where [math]\displaystyle{ \theta = \{\mathbf v,\mathbf h; \theta\} }[/math] are model parameters: [math]\displaystyle{ W_{ij} }[/math] represents the symmetric interaction term between visible unit [math]\displaystyle{ i }[/math] and hidden unit [math]\displaystyle{ j }[/math]; [math]\displaystyle{ b_i }[/math] and [math]\displaystyle{ a_j }[/math] are bias terms. The joint distribution of the system is defined as

[math]\displaystyle{ P(\mathbf{v};\theta) = \frac{1}{\mathcal{Z}(\theta)}\sum_{\mathbf h}\mathrm{exp}(-E(\mathbf v,\mathbf h;\theta)) }[/math]

where [math]\displaystyle{ \mathcal{Z}(\theta) }[/math] is a normalizing constant. The conditional distribution over hidden [math]\displaystyle{ \mathbf h }[/math] and [math]\displaystyle{ \mathbf v }[/math] can be derived as logistic function in terms of model parameters.

[math]\displaystyle{ P(\mathbf h|\mathbf v;\theta) = \prod_{j=1}^Fp(h_j|\mathbf v) }[/math], with [math]\displaystyle{ p(h_j=1|\mathbf v) = g(\sum_{i=1}^DW_{ij}v_i + a_j) }[/math]
[math]\displaystyle{ P(\mathbf v|\mathbf h;\theta) = \prod_{i=1}^Dp(v_i|\mathbf h) }[/math], with [math]\displaystyle{ p(v_i=1|\mathbf h) = g(\sum_{j=1}^FW_{ij}h_j + b_i) }[/math]

where [math]\displaystyle{ g(x) = \frac{1}{(1+\mathrm{exp}(-x))} }[/math] is the logistic function.

The derivative of the log-likelihood with respect to the model parameters can be decomposed as the difference between the model's expectation and data-dependent expectation.

Gaussian-Bernoulli RBM

Gaussian-Bernoulli RBMs[2] are a variant of restricted Boltzmann machine used for modeling real-valued vectors such as pixel intensities. It is usually used to model the image data. The energy of the system of the Gaussian-Bernoulli RBM is defined as

[math]\displaystyle{ E(\mathbf v,\mathbf h;\theta) = \sum_{i=1}^D\frac{(v_i-b_i)^2}{2\sigma_i^2} -\sum_{i=1}^D\sum_{j=1}^{F}\frac{v_i}{\sigma_i}W_{ij}v_ih_j -\sum_{i=1}^Db_iv_i -\sum_{j=1}^Fa_jh_j }[/math]

where [math]\displaystyle{ \theta = \{\mathbf a,\mathbf b,\mathbf w,\mathbf \sigma\} }[/math] are the model parameters. The joint distribution is defined the same as the one in restricted Boltzmann machine. The conditional distributions now become

[math]\displaystyle{ P(\mathbf h|\mathbf v;\theta) = \prod_{j=1}^Fp(h_j|\mathbf v) }[/math], with [math]\displaystyle{ p(h_j=1|\mathbf v) = g(\sum_{i=1}^DW_{ij}\frac{v_i}{\sigma_i} + a_j) }[/math]
[math]\displaystyle{ P(\mathbf v|\mathbf h;\theta) = \prod_{i=1}^Dp(v_i|\mathbf h) }[/math], with [math]\displaystyle{ p(v_i|\mathbf h) \sim \mathcal{N}(\sigma_i\sum_{j=1}^FW_{ij}h_j + b_i,\sigma_i^2) }[/math]

In Gaussian-Bernoulli RBM, the visible unit conditioned on hidden units is modeled as a Gaussian distribution.

Replicated Softmax Model

The Replicated Softmax Model[3] is also a variant of restricted Boltzmann machine and commonly used to model word count vectors in a document. In a typical text mining problem, let [math]\displaystyle{ K }[/math] be the dictionary size, and [math]\displaystyle{ M }[/math] be the number of words in the document. Let [math]\displaystyle{ \mathbf V }[/math] be a [math]\displaystyle{ M \times K }[/math] binary matrix with [math]\displaystyle{ v_{ik} = 1 }[/math] only when the [math]\displaystyle{ i^{th} }[/math] word in the document is the [math]\displaystyle{ k^{th} }[/math] word in the dictionary. [math]\displaystyle{ \hat v_k }[/math] denotes the count for the [math]\displaystyle{ k^{th} }[/math] word in the dictionary. The energy of the state [math]\displaystyle{ \{\mathbf V,\mathbf h\} }[/math] for a document contains [math]\displaystyle{ M }[/math] words is defined as

[math]\displaystyle{ E(\mathbf V,\mathbf h) = -\sum_{j=1}^{F}\sum_{k=1}^{K}W_{jk}\hat v_kh_j - \sum_{k=1}^Kb_k\hat v_k - M\sum_{j=1}^{F}a_jh_j }[/math]

The conditional distributions are given by

[math]\displaystyle{ p(h_j=1|\mathbf V) = g(Ma_j + \sum_{k=1}^K\hat v_kW_{jk}) }[/math]
[math]\displaystyle{ p(v_{ik} = 1|\mathbf h) = \frac{\mathrm{exp}(b_k + \sum_{j=1}^Fh_jW_{jk}}{\sum_{q=1}^{K}\mathrm{exp}(b_q + \sum_{j=1}^Fh_jW_{jq}}) }[/math]

Deep Boltzmann machines

A deep Boltzmann machine[4] has a sequence of layers of hidden units. There are only connections between adjacent hidden layers, as well as between visible units and hidden units in the first hidden layer. The energy function of the system adds layer interaction terms to the energy function of general restricted Boltzmann machine and is defined by [math]\displaystyle{ \begin{align} E({\mathbf v, \mathbf h; \theta} ) = & -\sum_{i=1}^D\sum_{j=1}^{F_1}W_{ij}^{(1)}v_ih_j^{(1)} -\sum_{j=1}^{F_1}\sum_{l=1}^{F_2}W_{jl}^{(2)}h_j^{(1)}h_{l}^{(2)}\\ & -\sum_{l=1}^{F_2}\sum_{p=1}^{F_3}W_{lp}^{(3)}h_l^{(2)}h_p^{(3)} - \sum_{i = 1}^Db_iv_i - \sum_{j=1}^{F_1}b_j^{(1)}h_j^{(1)} - \sum_{l=1}^{F_2}b_l^{(2)}h_l^{(2)} - \sum_{p=1}^{F_3}b_p^{(3)}h_p^{(3)} \end{align} }[/math]

The joint distribution is

[math]\displaystyle{ P(\mathbf{v};\theta) = \frac{1}{\mathcal{Z}(\theta)}\sum_{\mathbf h}\mathrm{exp}(-E(\mathbf v,\mathbf h^{(1)},\mathbf h^{(2)},\mathbf h^{(3)};\theta)) }[/math]

Multimodal deep Boltzmann machines

Multimodal deep Boltzmann machine[5][6] uses an image-text bi-modal DBM where the image pathway is modeled as Gaussian-Bernoulli DBM and text pathway as Replicated Softmax DBM, and each DBM has two hidden layers and one visible layer. The two DBMs join together at an additional top hidden layer. The joint distribution over the multi-modal inputs defined as [math]\displaystyle{ \begin{align} P(\mathbf v^m,\mathbf v^t;\theta) & = \sum_{\mathbf h^{(2m)},\mathbf h^{(2t)},\mathbf h^{(3)}}P(\mathbf h^{(2m)},\mathbf h^{(2t)},\mathbf h^{(3)})(\sum_{\mathbf h^{(1m)}}P(\mathbf v_m,\mathbf h^{(1m)}|\mathbf h^{(2m)}))(\sum_{\mathbf h^{(1t)}}P(\mathbf v^t,\mathbf h^{(1t)}|\mathbf h^{(2t)}))\\ & = \frac{1}{\mathcal{Z}_M(\theta)}\sum_{\mathbf h}\mathrm{exp}(\sum_{kj}W_{kj}^{(1t)}v_k^th_j^{(1t)} \\ &+ \sum_{jl}W_{jl}^{(2t)}h_j^{(1t)}h_l^{(2t)}+\sum_kb_k^tv_k^t+M\sum_jb_j^{(1t)}h_j^{(1t)}+\sum_lb_l^{(2t)}h_l^{(2t)}\\ & - \sum_i\frac{(v_i^m-b_i^m)^2}{2\sigma^2} + \sum_{ij}\frac{v_i^m}{\sigma_i}W_{ij}^{(1m)}h_j^{(1m)} \\ &+ \sum_{jl}W_{jl}^{(2m)}h_j^{(1m)}h_l^{(2m)}+\sum_jb_j^{(1m)}h_j^{(1m)}+\sum_lb_l^{(2m)}h_l{(2m)}\\ & + \sum_{lp}W^{(3t)}h_l^{(2t)}h_p^{(3)} + \sum_{lp}W^{(3m)}h_l^{(2m)}h_p^{(3)} + \sum_pb_p^{(3)}h_p^{(3)} \end{align} }[/math]

The conditional distributions over the visible and hidden units are

[math]\displaystyle{ p(h_j^{(1m)}=1|\mathbf v^m,\mathbf h^{(2m)}) = g(\sum_{i=1}^DW_{ij}^{(1m)}\frac{v_i^m}{\sigma_i} + \sum_{l=1}^{F_2^m}W_{jl}^{(2m)}h_l^{(2m)}+b_j^{(1m)}) }[/math]
[math]\displaystyle{ p(h_l^{(2m)}=1|\mathbf h^{(1m)},\mathbf h^{(3)}) = g(\sum_{j=1}^{F_1^m}W_{jl}^{(2m)}h_j^{(1m)} + \sum_{p=1}^{F_3}W_{lp}^{(3m)}h_p^{(3)}+b_l^{(2m)}) }[/math]
[math]\displaystyle{ p(h_j^{(1t)}=1|\mathbf v^t,\mathbf h^{(2t)}) = g(\sum_{k=1}^{K}W_{kl}^{(1t)}v_k^{(t)} + \sum_{l=1}^{F_2^t}W_{jl}^{(2t)}h_l^{(2t)}+Mb_j^{(1t)}) }[/math]
[math]\displaystyle{ p(h_l^{(2t)}=1|\mathbf h^{(1t)},\mathbf h^{(3)}) = g(\sum_{j=1}^{F_1^t}W_{jl}^{(2t)}h_j^{(1t)} + \sum_{p=1}^{F_3}W_{lp}^{(3t)}h_p^{(3)}+b_l^{(2t)}) }[/math]
[math]\displaystyle{ p(h_p^{3)}=1|\mathbf h^{(2)}) = g(\sum_{l=1}^{F_2^m}W_{lp}^{(3m)}h_l^{(2m)} + \sum_{l=1}^{F_2^t}W_{lp}^{(3t)}h_l^{(2t)}+b_p^{(3)}) }[/math]
[math]\displaystyle{ p(v_{ik}^t = 1|\mathbf h^{(1t)}) = \frac{\mathrm{exp}(\sum_{j=1}^{F_1^t}h_j^{(1t)}W_{jk}^{(1t)} + b_k^t)}{\sum_{q=1}^K\mathrm{exp}(\sum_{j=1}^{F_1^t}h_j^{(1t)}W_{jq}^{(1t)} + b_k^t)} }[/math]
[math]\displaystyle{ p(v_i^m|\mathbf h^{(1m)}) \sim \mathcal{N}(\sigma_i\sum_{j=1}^{F_1^m}W_{ij}^{(1m)}h_j^{(1m)} + b_i^m,\sigma_i^2) }[/math]

Inference and learning

Exact maximum likelihood learning in this model is intractable, but approximate learning of DBMs can be carried out by using a variational approach, where mean-field inference is used to estimate data-dependent expectations and an MCMC based stochastic approximation procedure is used to approximate the model’s expected sufficient statistics.[7]

Application

Multimodal deep Boltzmann machines are successfully used in classification and missing data retrieval. The classification accuracy of multimodal deep Boltzmann machine outperforms support vector machines, latent Dirichlet allocation and deep belief network, when models are tested on data with both image-text modalities or with single modality.[citation needed] Multimodal deep Boltzmann machine is also able to predict missing modalities given the observed ones with reasonably good precision.[citation needed] Self Supervised Learning brings a more interesting and powerful model for multimodality. OpenAI developed CLIP and DALL-E models that revolutionized multimodality.

Multimodal deep learning is used for cancer screening – at least one system under development integrates such different types of data.[8][9]

Multimodal transformers

See also

References

  1. "Restricted Boltzmann Machine". 1986. https://www.cs.cmu.edu/~bhiksha/courses/deeplearning/Fall.2014/pdfs/Smolensky.1986.pdf. 
  2. "Gaussian-Bernoulli RBM". 1994. http://cseweb.ucsd.edu/~yfreund/papers/freund94unsupervised.pdf. 
  3. "Replicated Softmax Model". 2009a. http://papers.nips.cc/paper/3856-replicated-softmax-an-undirected-topic-model.pdf. 
  4. "Deep Boltzmann Machine". 2009b. http://www.utstat.toronto.edu/~rsalakhu/papers/dbm.pdf. 
  5. "Multimodal Learning with Deep Boltzmann Machine". 2012. http://papers.nips.cc/paper/4683-multimodal-learning-with-deep-boltzmann-machines.pdf. 
  6. "Multimodal Learning with Deep Boltzmann Machine". 2014. http://www.jmlr.org/papers/volume15/srivastava14b/srivastava14b.pdf. 
  7. "Approximations to the Likelihood Gradient". 2008. http://icml2008.cs.helsinki.fi/papers/638.pdf. 
  8. Quach, Katyanna. "Harvard boffins build multimodal AI system to predict cancer" (in en). The Register. https://www.theregister.com/2022/08/09/ai_cancer_multimodal/. 
  9. Chen, Richard J.; Lu, Ming Y.; Williamson, Drew F. K.; Chen, Tiffany Y.; Lipkova, Jana; Noor, Zahra; Shaban, Muhammad; Shady, Maha et al. (8 August 2022). "Pan-cancer integrative histology-genomic analysis via multimodal deep learning" (in English). Cancer Cell 40 (8): 865–878.e6. doi:10.1016/j.ccell.2022.07.004. ISSN 1535-6108. PMID 35944502.