Code Monkey home page Code Monkey logo

momok's Introduction

Mixture of Modality Knowledge Experts for Robust Multi-modal Knowledge Graph Completion

🌈 Overview

model

🔬 Dependencies

  • Python==3.9
  • numpy==1.24.2
  • scikit_learn==1.2.2
  • torch==2.0.0
  • tqdm==4.64.1

💻 Data preparation

The multi-model embedding of MMKGs are too large so you should download them from the Google Drive Link (updated soon).

📕 Train and Evaluation

You can refer to the training scripts in scripts/train.sh to reproduce our experiment results. Here is an example for DB15K dataset.

nohup python train.py --cuda 0 --lr 0.001 --mu 0.0001 --dim 200 --dataset MKG-W --epochs 2000 > log.txt &

nohup python train.py --cuda 1 --lr 0.0005 --mu 0.0001 --dim 300 --dataset MKG-Y --epochs 2000 > log.txt &

The evaluation results will be printed in the command line after training.

🤝 Cite:

@misc{zhang2024mixture,
      title={Mixture of Modality Knowledge Experts for Robust Multi-modal Knowledge Graph Completion}, 
      author={Yichi Zhang and Zhuo Chen and Lingbing Guo and Yajing Xu and Binbin Hu and Ziqi Liu and Wen Zhang and Huajun Chen},
      year={2024},
      eprint={2405.16869},
      archivePrefix={arXiv},
      primaryClass={cs.AI}
}

momok's People

Contributors

zhang-each avatar

Stargazers

dangerous avatar  avatar wangshou avatar  avatar  avatar Zhuo Chen avatar  avatar

Watchers

Eric avatar Huajun Chen avatar  avatar Kostas Georgiou avatar  avatar

momok's Issues

代码疑问

P1 P2 P3 图1中为MIEstimator最小化互信息传入的特征,其中EXPERT_OUTPUTS维度应该为[B,N,D],那么在def train estimator(self,embeddings): strs,imgs,txts=embeddings idx1,idx2=random.sample(range(self.num),k=2) str1,str2=strs[idx1,strs[idx2] img1,img2=imgs[idx1],imgs[idx2] txt1,txt2=txts[idx1],txts[idx2]中的STR1,STR2的维度为[N,D],这样的输入内容是否符合预期?根据文章的理解,也许传入特征应该是[N,D]更为合理,第一个维度应该是专家数量? 图2中的MOE专家网络返回值应该为3个值,但在图3 中只有两个,这样会导致运行报错,请问这样的设计是否合理?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.