Maciej Malicki
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 1e100 IBU prompt 2022-02-11 13:00 CET Who will change the slides to the next ones? Can I do this on my own, please? ## Slide 0 (Title) HELLO, EVERYBODY I'm Maciej Malicki and with Matthew Leonowicz we form a team called *ten to the power one hundred IBU*. So the main project motivation was to pass a meme as a Machine Learning project. The vague TLDR what we achieve is predicting star ratings for beers and assign sentences of beer reviews to some aspects, that are rated by beer drinkers. *Next slide, please.* ## Slide 1 (Data) So we came up with our project idea by finding Stanford Large Dataset Collection Ratebeer dataset. Unfortunately the dataset was removed as requested by RateBeer.com, but we managed to get it anyway. Later on we excitedly scrapped a similar Polish webpage too! We take into consideration multi-aspect reviews meaning that a single review consists of a text and numerical scores for a few aspects like aroma, taste, appearance, palate which means taste in a broader sense, connected to tongue feeling. And last but not least overall score. *Next slide, please.* ## Slide 2 (Research Questions) Along with the dataset we found a paper from 2012 introducing a model predicting the most probable aspect of a given sentence. So we take a look at a sentence of a review and predict for example that it's about beer aroma. As a side effect the model produced word clouds, which were quite common back in 2010s and could predict values of aspect ratings too. The model weights can be used for scores prediction too. So we enthusiastically thought of implementing and assessing it. *Next slide, please.* ## Slide 3 (Tools and Techniques) On the left we can see that paper that I just mentioned. It learns sentence-aspect assignment by unsupervised gradient descent on Negative Log Likelihood. Then we can use the trained model weights for other tasks too. We thought of that we can do something more and as a bonus. That's why we also mapped our reviews to word or sentence embeddings and then proceeded with K-nearest neighbours for predicting stars for aroma, smell, overall rating and so on. We used Pytorch for easy gradients & textual data representation and the SpaCy Natural Language Processing tool for tokenisation and sentence split. We played with Facebook FAISS library for indexing 1M of our encoded reviews for fast search. *Next slide, please.* ## Slide 4 (NLL Minimization) Let's deep diver into how our aspect assignment model is trained. We associate every word with a set of weights. Two types of weights are introduced. Thetas describe which aspect is word about. Phis measure how positive is the sentiment of a word considering a given aspect. Using these weights we can calculate numerical probability scores for all sentences we have. Then we softmax them to pick the most probable aspect for a given sentence. *Next slide, please.* ## Slide 5 (How This Thing Can be Even Unsupervised?) We have no data about real aspect assignment for any sentence. So how can we know which aspects are described by sentences? If a sentneces mentions 'appearance', then it's about 'appearance'. That's why we initialize words mentioning the aspect for one for all the aspects and proceed and proceed with training. At first the model will promote words occurring with word 'appearance' as discussing 'appearance' for example. And it's trained for some time with the objective being maximizing Negative Log Likelihood of observed aspect assignment. So we require the model to be more certain about its aspect predictions. ## Slide 5 (Cloud pictures) *Next slide, please.* <!-- ## Slide 6 (Actual Polish cloud) Let's maybe skip this one for now, as we can possibly run out of time. ## Slide 7 (English cloud) jaka chmura jest, każdy widzi --> ## Slide 8 Lessons learned O ASPEKT RATIGNU: the first approach was to examine rating distribution and correlation, which you can see in these graphs. It turned out that people are pretty predictible. So we decided to exploit this information and create a model that focuses on probability of a given score. Our accuracy was 35% and our mse was 1.4 which was pretty good for a naive model but rather unsatisfying as the results were similar to each other. We also use phis from former aspect model which describe words sentiment. It helps to add some noise yet still, unsatisfying. So we decided to try a diffrent approach and use words embedding. KNN, big k removes extreeme ratings, accuracy 45% and mse 1.3. Still pretty unsatisfying but we agreed to end it here. After a month and a half we achieved our first representative word cloud milestone. It was pretty satisfying to look at, but at the same time really depressing as it was at this moment that we realized its January already. The clock was ticking and we covered only one of the research questions. So after this time of struggles we decided to take it more seriously and come up with a model for predicting aspect rating. We had some inital problems with understanding and recreating the paper and even wondered whether it makes any sense. We tried different methods and come up with our own modified model at the end. It was a simple idea based on a fact that we can exploit the ratings distribution and use it to infer ratings for reviews outside of our dataset. It proved really effective, yet again - depressing. Because of the fact that extreme ratings were rarerly seen, our model wasn't really able to predict such outcomes. He couldn't handle some absymal beer or a best IPA you have ever seen. So we tried using different approach, which is - words embedding. I (personally) don't know much about those models except the fact that they do work. We focused on SBERT and FASTTEXT with KNN and tried them out. The results were shocking (postiviely). SBERT was able to come up with a rating for a review with a 46% accuracy (remember that there are 10 * 20 * 10 * 5 * 5 = 50000 possible ratings). After closer examination it turned out, that unfortunetly it has the same weakness. It can't predict extreme ratings (and it's probably because we use K bigger than 15 in KNN). Nevertheless the results were better and we were close the deadline. So to sum up: We succeded with providing an answer to every research question that we posed and we are satified with the models and proud of the progess that we've made. Our results are easily interpretable and explainable. We created some fancy graphs Although, there are many paths we can take to improve our work. Weight initialisation plays a vital role in training​. *Next slide, please.* ## Slide 9 (Further work possible) * Datasets from other domains (wines, toys and games, ebooks, pubs, ...) * Use LDA (Latent Dirichlet Allocation) as a baseline​ * Explore SVM extension paper​ * Experiment with meta parameters, in particular weight decay (penalize high weights to regularize)​ * Get rid of PyTorch and find derivatives analytically, which shouldn't be hard​ ## Slide n As we ran out of time, we encourage everybody to take a look at the wordclouds blablablalbla repo github nanana ## Backup 1 ## Backup 2 Both our segmentation and summarization tasks can be expressed as weighted bipartite graph cover. Each of the sentences at left (from a BeerAdvocate review) must be matched to an aspect. The optimal cover is highlighted using bold edges. For the segmentation task (left graph), five nodes are constrained to match to each of the five aspects, ensuring that each aspect appears at least once in the segmentation (the remaining two unconstrained aspects are both ‘smell’ in this case). The summarization task (right graph) includes precisely one node for each aspect, so that each aspect is summarized using the sentence that most closely aligns with that aspect’s rating. *Cheers* :) :beers:

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully