Skip to main content
. 2024 Sep 19;24(18):6062. doi: 10.3390/s24186062
Algorithm 1 Multi-modal Disinformation Detection
  • 1:

    Input: Raw text data T, Image data I

  • 2:

    Output: Comprehensive representation C

  • 3:

    Textual Feature Extraction:

  • 4:

       Tokenize text: Tt=tokenize(T)

  • 5:

       Normalize words: Tn=normalize(Tt)

  • 6:

       Replace emojis: Te=replace_emojis(Tn)

  • 7:

       Shorten sentences: Ts=shorten(Te)

  • 8:
       Extract BERT embeddings:
    E=BERT(Ts)whereE=[h4,h3,h2,h1]
  • 9:

       Combine embeddings: Tf=combine(E)

  • 10:

    Visual Feature Extraction:

  • 11:
       Pre-trained ResNet V2 model:
    I1=ResNet(I)
  • 12:
       Fully connected layers:
    If=FC(I1)
  • 13:
       Process visual representation:
    Im=process(If)wheredI=16
  • 14:

    Attention Mechanism:

  • 15:
       Apply attention:
    ATI=Attention(Tf,If)
    AIT=Attention(If,Tf)
    AII=Attention(If,If)
  • 16:
       Fully connected layers with normalization:
    RTI=FC(ATI)+Tf
    RIT=FC(AIT)+If
    RII=FC(AII)+If
  • 17:

    Final Processing:

  • 18:
       Compress and combine features:
    RII=FC(RII)
  • 19:
       Fully connected layer with 32 neural units:
    C=FC32([Tf,If,RTI,RIT,RII])