Giter Site home page Giter Site logo

cosine-discounting's Introduction

Solving Cosine Similarity Underestimation between High Frequency Words by ℓ2 Norm Discounting

research paper

oblectives:

  • Investigate the impact of word frequency on cosine similarity of contextualized word embedding of masked language models such as BERT
  • Mitigate the impact of word frequency on cosine similarity underestimation of contextualized word embedding in high-frequency words

Publication: ACL 2023

1. prepare BookCorpus:

  • download and save BookCorpus dataset

2. word embedding and BERT properties collection:

  • collect word embedding, word frequency, and l2-norm from the entire BookCorpus

3. word frequency VS l2_norm:

  • plots between word frequency and l2-norm

4. WIC preprocess:

  • Process WiC by adding word frequency, default BERT cosine similarity, and BERT word embedding

5. parameters of the classifier:

  • Bayesian optimization to find the theta of the classifier

6. WIC 5 cross validation dataset prep:

  • Prepare 5 cross-validations dataset from WiC

7. l2_norm discounting:

  • Cosine similarity prediction of the l2-norm discounting method compared to default BERT

University of Liverpool thesis

part 1: data collection

  • word embedding and BERT properties collection
  • distributions of words

part 2: relationships between word frequency and BERT's properties

  • word frequency VS local l2-norm
  • word frequency VS global l2-norm
  • word frequency VS l2-norm variance
  • word frequency VS global isotropy
  • word frequency VS global self-similarity

part3: approaches to mitigate the impact of word frequency on under and over cosine similarity estimation of BERT

  • BERT baseline
  • approach1: a single linear adjustment
  • approach2: two-way linear adjustment
  • approach3: word type-dependent adjustment
  • approach4: probabilistic word type-dependent adjustment
  • approach5: z-score normalization

cosine-discounting's People

Contributors

saeth40 avatar

Stargazers

Jeff Carpenter avatar Miyazawa Akira avatar

Watchers

 avatar

cosine-discounting's Issues

request for some word properties file

Hey author!

I want to load word properties file in "Pulication/ano3 word frequency VS l2_norm.ipynb/Dataset preparation", but i have some problem, can you provided the file of word properties file ?

Thank you so much!

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.