AI Wiki中文/EN

Multimodal fusion: interactions, missing inputs and correlated errors

多模态融合

Compare linear and tensor features, then test missingness, alignment and sensor covariance.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

The useful clue may be the relationship

Imagine two binary sensors. Each reports either −1 or +1; the target is +1 when they agree and −1 when they disagree. Looking at either sensor alone gives no clue on a balanced dataset. Even adding two linear predictions cannot express this agreement rule. The information sits in the relationship between the readings.

Multimodal fusion combines information from sources such as images, text, sound or structured measurements for a shared task. The sources need not have the same units, sampling rate or reliability. Ngiam and colleagues’ 2011 study distinguishes fusion with all modalities available from learning useful representations when some modalities disappear at later stages. Tensor Fusion Network, or TFN, makes interactions between modality embeddings explicit. These are specific contributions within a broader field, not claims that fusion began with either paper. Read linear regression and covariance and correlation first.

Explicit interactions help this balanced problem; ignoring sensor correlation can make fusion worse.
Explicit interactions help this balanced problem; ignoring sensor correlation can make fusion worse.

Choose what can interact, and at what stage

Feature-level fusion joins representations before a task predictor. Decision-level fusion combines predictions made separately. Intermediate fusion allows learned states to interact, possibly repeatedly. These labels describe where information meets; they do not by themselves specify the model’s expressive power.

For two scalar features a and b, a linear predictor over concatenated inputs is:

y^concat=β0+βaa+βbb.\hat y_{\mathrm{concat}}=\beta_0+\beta_a a+\beta_b b.

Let a and b be independent uniform signs and y=ab. Then E[y]=E[ay]=E[by]=0. The least-squares linear predictor is zero and its mean squared error is one. Add the product feature and the exact rule becomes representable:

ϕ(a,b)=[1,a,b,ab],y^=θ⊤ϕ(a,b),θ=[0,0,0,1].\phi(a,b)=[1,a,b,ab],\qquad \hat y=\theta^\top\phi(a,b),\qquad \theta=[0,0,0,1].

This is a limitation of the linear readout, not of concatenation followed by an expressive nonlinear network. The product feature exposes one interaction directly; a nonlinear network can learn such interactions implicitly.

TFN’s §4.2 augments each of three modality embeddings with a constant one and takes their outer product. Ordering the constant first or last only changes coordinate order:

Φ=[1;h(1)]⊗[1;h(2)]⊗[1;h(3)],D=∏m=13(dm+1).\Phi=[1;h^{(1)}]\otimes[1;h^{(2)}]\otimes[1;h^{(3)}],\qquad D=\prod_{m=1}^{3}(d_m+1).

The result contains a constant, unimodal terms, pairwise products and triple products. The outer product itself has no learned parameters; encoders and the later predictor do. For input dimensions 2,3,4 the explicit tensor has 3×4×5=60 coordinates. Storing the interaction can grow quickly. Low-rank factorizations or attention offer different capacity and cost choices; no explicit tensor is automatically better.

Missingness changes the available information. In the sign example, if b is unobserved while the original independent uniform law remains valid:

E[y∣a]=aE[b∣a]=0,E[(y−0)2∣a]=1.\mathbb E[y\mid a]=a\mathbb E[b\mid a]=0,\qquad \mathbb E[(y-0)^2\mid a]=1.

No predictor using only a can recover the missing independent sign under squared loss. Zero imputation happens to produce the optimal conditional mean here, but that does not make it a general missing-modality solution. A missing-value indicator distinguishes an absent measurement from a genuine zero; training and evaluation must reflect the expected availability pattern. Ngiam’s learning settings and denoising reconstruction approach make this training/test distinction explicit.

Reliability also depends on correlations. Suppose two unbiased sensors estimate the same scalar s, their errors have positive-definite covariance Σ, and we use a linear unbiased estimate with weights summing to one:

s^=w⊤z,1⊤w=1,Var⁡(s^−s)=w⊤Σw.\hat s=w^\top z,\qquad \mathbf1^\top w=1,\qquad \operatorname{Var}(\hat s-s)=w^\top\Sigma w.

A Lagrange multiplier gives 2Σw−λ1=0. Solving the constraint yields:

w∗=Σ−111⊤Σ−11,V∗=11⊤Σ−11.w^*=\frac{\Sigma^{-1}\mathbf1}{\mathbf1^\top\Sigma^{-1}\mathbf1},\qquad V^*=\frac{1}{\mathbf1^\top\Sigma^{-1}\mathbf1}.

Use a linear solve rather than explicitly inverting Σ. These are minimum-variance weights among linear unbiased estimators under the stated covariance, not a universal neural fusion rule. Weights need not always be positive. If errors are biased, covariance shifts, or sensors measure different targets, the assumptions need revision.

Three small tests before a large model

Save as multimodal_fusion.py; use Python 3.12 and NumPy 1.26.4. The program fits the complete four-case sign task by least squares, forms explicit tensors, removes or misaligns a modality, and solves a two-sensor covariance problem. Every dataset here is synthetic.

With N observations and d fused features, a dense least-squares solve typically costs O(Nd²+d³) when N is at least d, with O(Nd) design storage; numerical implementations can use rank-revealing decompositions. Explicit tensor construction costs O(D) per example. The covariance solve for M sensors costs O(M³); our M is two. These are separate computation models, not estimates of video-model latency.

"""Original fusion examples: interaction, missingness and correlated noise."""
import itertools,json
import numpy as np

def design(a,b,kind='tensor'):
    a=np.asarray(a,float);b=np.asarray(b,float)
    if a.ndim!=1 or a.shape!=b.shape or len(a)==0 or not np.isfinite(a).all() or not np.isfinite(b).all():raise ValueError('Matched finite vectors required')
    if kind=='concat':return np.c_[np.ones(len(a)),a,b]
    if kind=='tensor':return np.c_[np.ones(len(a)),a,b,a*b]
    raise ValueError('Unknown fusion')

def fit(a,b,y,kind='tensor'):
    x=design(a,b,kind);y=np.asarray(y,float)
    if y.shape!=(len(x),) or not np.isfinite(y).all():raise ValueError('Invalid target')
    theta=np.linalg.lstsq(x,y,rcond=None)[0]
    return theta,float(np.mean((x@theta-y)**2))

def tensor_features(*vectors):
    if not 2<=len(vectors)<=4:raise ValueError('Use 2..4 modalities')
    z=np.array([1.])
    for v in vectors:
        v=np.asarray(v,float)
        if v.ndim!=1 or len(v)>8 or not np.isfinite(v).all():raise ValueError('Small finite vectors required')
        z=np.multiply.outer(z,np.r_[1.,v]).ravel()
    return z

def precision_fusion(cov):
    cov=np.asarray(cov,float)
    if cov.shape!=(2,2) or not np.isfinite(cov).all() or not np.allclose(cov,cov.T) or np.linalg.eigvalsh(cov).min()<=0:raise ValueError('Positive definite covariance required')
    weights=np.linalg.solve(cov,np.ones(2));weights/=weights.sum()
    return weights,float(weights@cov@weights)

def masked_predict(theta,a,b,observed,kind='tensor'):
    mask=np.asarray(observed)
    if mask.dtype!=bool or mask.shape!=np.asarray(b).shape:raise ValueError('Explicit boolean observation mask required')
    # Zero imputation is a declared baseline, not guaranteed missing-modality inference.
    return design(a,np.where(mask,b,0),kind)@np.asarray(theta)

def demo():
    x=np.array(list(itertools.product([-1.,1.],repeat=2)));a,b=x.T;y=a*b
    concat,lc=fit(a,b,y,'concat');tensor,lt=fit(a,b,y)
    erased=masked_predict(tensor,a,b,np.zeros(4,dtype=bool));permuted=design(a,-b)@tensor
    cov=np.array([[1.,.8],[.8,4.]]);w,v=precision_fusion(cov);naive=np.array([.8,.2])
    return dict(concat_mse=lc,tensor_mse=lt,concat_coefficients=concat.tolist(),tensor_coefficients=tensor.tolist(),missing_b_mse=float(np.mean((erased-y)**2)),reversed_pair_mse=float(np.mean((permuted-y)**2)),precision_weights=w.tolist(),true_fused_variance=v,independence_assumed_variance=.8,naive_actual_variance=float(naive@cov@naive),tensor_dimension_2_3_4=int(len(tensor_features([0]*2,[0]*3,[0]*4))),scope='Balanced synthetic interaction and Gaussian error covariance; no sentiment benchmark.')
if __name__=='__main__':print(json.dumps(demo(),indent=2))

The concatenation readout has MSE 1; the product readout is zero up to floating-point rounding. Hide b and MSE returns to 1. Replace every paired b by −b while keeping the original targets, and MSE becomes 4: every predicted sign is reversed. More inputs do not compensate for incorrect pairing.

For covariance [[1,.8],[.8,4]], the optimal weights are about [.941176,.058824] and variance .988235. Pretending the sensors are independent suggests [.8,.2] and a reported variance .8, but their actual correlated-error variance is 1.056. That is worse than using the first sensor alone, whose variance is 1. This is a calculation under a specified covariance, not a measured result on real sensors.

Independent checks verify normal equations, exact interaction terms, missing-information limits, the closed-form two-sensor solution and a grid search over weights. A lower training loss is only one part of choosing a fusion method.

Availability, alignment and leakage belong in the design

A practical pipeline should identify what one sample means, align timestamps or objects, separate train/test identities, and record missing or low-quality modalities. Splitting frames from the same subject across train and test can make subject identity look like useful cross-modal understanding. The model’s success must be assessed against a strong single-modality baseline and the same information available at deployment.

Removing one modality, shuffling pairings and testing degraded inputs answer different questions. Removal measures reliance under missingness; shuffling breaks correspondence; degradation changes reliability. None by itself proves a learned causal relationship. A system may exploit a label shortcut in text while ignoring the image entirely.

The tensor comparison does not prove all early fusion fails or that larger tensors resist overfitting. TFN reports a particular architecture and task; its empirical observations are not a theorem about arbitrary data. An aligned dual tower and a visual language bridge are related but serve different interfaces and losses.

Test the relationship, not just the extra input

  1. Calculation. Why can no linear function of [1,a,b] exactly predict ab on all four sign pairs? Answer: The target is orthogonal to every design column on the balanced table. Least squares projects it to zero, leaving E[y²]=1. The missing product column represents the interaction.
  2. Prediction. Keep the labels but replace b with −b. What MSE does the fitted product rule obtain? Answer: It predicts −ab instead of ab. Each error has magnitude 2, so MSE is 4.
  3. Boundary. If b is missing and independent of a, could a more powerful predictor achieve squared error below one in expectation? Answer: Not with only a and this unchanged law. E[y|a]=0 minimizes conditional squared loss; the remaining conditional variance is one.
  4. Transfer. Why is weighting by individual inverse variances insufficient for covariance [[1,.8],[.8,4]]? Answer: The variance includes the cross-term 2w₁w₂(.8). Ignoring it produces weights [.8,.2] with actual variance 1.056, whereas solving with the full covariance yields .988235.

Separate the learning setting from the fusion operator

Read Ngiam et al.’s learning settings and selected §3 architecture discussion to ask which modalities exist at each stage. Then read TFN §4.2 and Figure 4 to inspect the interaction operator. Our scope is these passages; TFN PDF page 5 was visually checked. We did not reproduce audio-visual speech or sentiment benchmarks, copy upstream implementations, or infer a general guarantee from the papers’ empirical results.

Make a prediction, then check

Can independent inverse-variance weights ignore correlated sensor errors?

Choose one answer

Learning objectives

  • Distinguish fusion location from model capacity.
  • Construct interaction features and missing-information bounds.
  • Measure damage from misaligned pairs.
  • Derive covariance-aware sensor weights.

Prerequisites & connections

Explore related knowledge →

References

  1. Multimodal Deep Learning (ICML2011)
    Jiquan Ngiam; Aditya Khosla; Mingyu Kim; Juhan Nam; Honglak Lee; Andrew Y. Ng · 2011
  2. Tensor Fusion Network for Multimodal Sentiment Analysis (EMNLP2017)
    Amir Zadeh; Minghai Chen; Soujanya Poria; Erik Cambria; Louis-Philippe Morency · 2017

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Codex · 2026-09-20 · Single AI author checked TFN section4.2/Figure4 and Ngiam2011 selected availability/shared-representation discussion. Six paired equations and four explained exercises; original balanced product regression, tensor dimensions, missingness, broken alignment and covariance-aware fusion with independent closed-form/grid checks. A linear-concatenation failure is not a limitation of all nonlinear fusion.

  • Single AI author checked TFN section4.2/Figure4 and Ngiam2011 selected availability/shared-representation discussion. Six paired equations and four explained exercises; original balanced product regression, tensor dimensions, missingness, broken alignment and covariance-aware fusion with independent closed-form/grid checks. A linear-concatenation failure is not a limitation of all nonlinear fusion.
  • Four computed SVG variants per topic. Thirteen numeric/geometry tests and36 responsive cases passed; twelve final Chinese-mobile/English-desktop screenshots actually inspected. English spacing correction and initial test-mixin discovery error preserved. Full article acceptance recorded separately.

Source locations checked:

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.