• Stars
    star
    228
  • Rank 175,267 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tensorflow implementations of various Deep Semantic Matching Models (DSMM).

tensorflow-DSMM

Ongoing project for implementing various Deep Semantic Matching Models (DSMM). DSMM is widely used for:

  • duplicate detection
  • sentence similarity
  • question answering
  • search relevance
  • ...

Quickstart

Data

This project is developed with regard to the data format provided in the 第三届魔镜杯大赛.

You can see /data/DATA.md for the data format description and prepared data accordingly. Your data should be placed in the data directory. Current data directory also holds a toy data.

If you want to run a quick demo, you can download data from the above competition link. Download is allowed after registration.

Demo

python src/main.py

Supported Models

Representation based methods

  • DSSM style models
    • DSSM: use FastText as encoder
    • CDSSM: use TextCNN as encoder
    • RDSSM: use TextRNN/TextBiRNN as encoder

Interaction based methods

  • MatchPyramid style models
    • MatchPyramid: use identity/cosine similarity/dot product as match matrix
    • General MatchPyramid: use match matrices based on various embeddings and various match scores
      • word embeddings
        • original word embedding
        • compressed word embedding
        • contextual word embedding (use an encoder to encode contextual information)
      • match score
        • identity
        • cosine similarity/dot product
        • element product
        • element concat
  • BCNN style models
    • BCNN
    • ABCNN1
    • ABCNN2
    • ABCNN3
  • ESIM
  • DecAtt (Decomposable Attention)

Building Blocks

Encoder layers

  • FastText
  • TimeDistributed Dense Projection
  • TextCNN (Gated CNN and also Residual Gated CNN)
  • TextRNN/TextBiRNN with GRU and LSTM cell

Attention layers

  • mean/max/min pooling
  • scalar-based and vector-based attention
  • self and context attention
  • multi-head attention

Acknowledgments

This project gets inspirations from the following projects:

More Repositories

1

tensorflow-DeepFM

Tensorflow implementation of DeepFM for CTR prediction.
Python
2,015
star
2

kaggle-CrowdFlower

1st Place Solution for CrowdFlower Product Search Results Relevance Competition on Kaggle.
C++
1,755
star
3

kaggle-HomeDepot

3rd Place Solution for HomeDepot Product Search Results Relevance Competition on Kaggle.
Python
464
star
4

pytorch-DRL

PyTorch implementations of various Deep Reinforcement Learning (DRL) algorithms for both single agent and multi-agent.
Python
405
star
5

tensorflow-XNN

4th Place Solution for Mercari Price Suggestion Competition on Kaggle using DeepFM variant.
Python
278
star
6

tensorflow-LTR

Tensorflow implementations of various Learning to Rank (LTR) algorithms.
Python
218
star
7

caffe-windows

Caffe Windows with realtime data augmentation
C++
88
star
8

word2vec_cbow

this is a high performance cuda porting of cbow model of word2vec
Cuda
43
star
9

Kaggle_Walmart-Recruiting-Store-Sales-Forecasting

R code for Kaggle's Walmart Recruiting - Store Sales Forecasting
R
41
star
10

batch_normalization

Batch Normalization Layer for Caffe
C++
35
star
11

Kaggle_The_Hunt_for_Prohibited_Content

4th Place Solution for The Hunt for Prohibited Content Competition on Kaggle (http://www.kaggle.com/c/avito-prohibited-content)
Python
28
star
12

tensorflow-ASP-MTL

A Tensorflow implementation of Adversarial Shared-Private Model for Multi-Task Learning and Transfer Learning.
Python
25
star
13

Kaggle_Loan_Default_Prediction

R code for Kaggle's Loan Default Prediction - Imperial College London challenge
R
22
star
14

Kaggle_Galaxy_Zoo

Python & Theano code for Kaggle's Galaxy Zoo - The Galaxy Challenge
Python
8
star
15

image-rotation-angle-estimation

Effective estimation of image rotation angle using spectral method
MATLAB
7
star
16

tensorflow-DTN

A Tensorflow implementation of Domain Transfer Network.
Python
7
star
17

Kaggle_Higgs_Boson_Machine_Learning_Challenge

R's GBM model for Higgs Boson Machine Learning Challenge
R
6
star
18

Long-Capital

Quant Trading with Microsoft Qlib (https://github.com/microsoft/qlib)
Python
6
star
19

Kaggle_Acquire_Valued_Shoppers_Challenge

Code for Kaggle's Acquire Valued Shoppers Challenge
Python
5
star
20

Kaggle_Greek_Media_Monitoring_Multilabel_Classification

Code for Kaggles' Greek Media Monitoring Multilabel Classification (WISE 2014)
MATLAB
5
star
21

Stanford_CS229_Note

A draft note for Stanford CS229 Machine Learning course
TeX
3
star
22

GLF_Features_for_Median_Filtering_Forensics

MATLAB Toolbox for GLF Features for Median Filtering Forensics
MATLAB
2
star