Giter Site home page Giter Site logo

Test accuracy is very low about acnn HOT 21 OPEN

frankwork avatar frankwork commented on July 25, 2024
Test accuracy is very low

from acnn.

Comments (21)

Mariobai avatar Mariobai commented on July 25, 2024 4

@ChenMiya ๆˆ‘ๆƒณ้—ฎไธ€ไธ‹ไฝ ็Žฐๅœจๆ‰พๅˆฐไฝ ๆต‹่ฏ•้›†็š„ๅ‡†็กฎ็Ž‡็‰นๅˆซไฝŽ็š„ๅŽŸๅ› ไบ†ๅ—๏ผŸ

from acnn.

wangtianyiftd avatar wangtianyiftd commented on July 25, 2024 3

The question is how to calculate the score if there're several words in an entity.

@GatsbyUSTC In some papers, mean embeddings of those words are often used, too.

some reference

Recurrent Attention Network on Memory for Aspect Sentiment Analysis
Aspect Level Sentiment Classification with Deep Memory Network
Effective LSTMs for Target-Dependent Sentiment Classification

from acnn.

desh2608 avatar desh2608 commented on July 25, 2024 3

@GatsbyUSTC I agree with you. If we are using pretrained embeddings and not tuning them during training, an attention at the input layer would be meaningless. However, if embeddings are randomly initialized and updated while training, the attention would be useful to choose words which are key indicators for a class. At the same time, this would require a considerably larger training set.

from acnn.

GatsbyUSTC avatar GatsbyUSTC commented on July 25, 2024 2

@wangtianyiftd Thanks very much. Could I ask you another question since you seem to read lots of papers about attention. The attention mechanism works well on translation model. A word can focus on several words from another language based on attention. But do you think the attention mechanism will work on relation classification problem? Inner product means euclidean distance between embeddings. when we do relation classification, I don't think more attention on words which are close to entities will help solving the relation classification. I didn't get a better result after adding attention mechanism on cnn model, and I don't know the problem comes from the attention or hyperparameter. It will be nice if you can answer this question.

from acnn.

FrankWork avatar FrankWork commented on July 25, 2024 1

@GatsbyUSTC Attention on words try to find the most relevant words related to the entity pair, of course it will help. Take the relation "President" as an example, the word 'president' itself contribute a lot to the classification results. In theory, attention mechanism will assign a large weight to the word 'president'.

Although we can't reproduce the results of this paper, we can't deny the entire attention mechanism. Maybe you can reproduce other attention based paper.

from acnn.

FrankWork avatar FrankWork commented on July 25, 2024

I can't reproduce the results of the paper, maybe the code is not right. I don't know what's wrong.

from acnn.

dgai91 avatar dgai91 commented on July 25, 2024

@FrankWork my version which has achieved acnn is using pytorch, some data handling code copy from yours. maybe you could see it

from acnn.

dgai91 avatar dgai91 commented on July 25, 2024

@FrankWork thanks for your recommendation

from acnn.

FrankWork avatar FrankWork commented on July 25, 2024

@lawlietAi What is your test accuracy?

from acnn.

dgai91 avatar dgai91 commented on July 25, 2024

that is the reason i didn't put it on README

from acnn.

dgai91 avatar dgai91 commented on July 25, 2024

@FrankWork i think the original paper didn't use test data but use the eval data which divided from train data

from acnn.

allanj avatar allanj commented on July 25, 2024

Is there anyone actually obtaining the results from the original paper? I couldn't reach the performance specified in the paper.

from acnn.

FrankWork avatar FrankWork commented on July 25, 2024

@allanj no one.

from acnn.

GatsbyUSTC avatar GatsbyUSTC commented on July 25, 2024

@lawlietAi I'm not familiar with pytorch while I'm implementing the paper using tensorflow. And I'm stuck on a specific problem. In original paper, the author views an entity as a word and calculate a similarity score between them. But in fact, there're entities composed of several words. How do you deal with that? how to calculate the score in such situation?

from acnn.

dgai91 avatar dgai91 commented on July 25, 2024

sorry, i could not understand certainly on โ€œthemโ€. ๐Ÿ˜‚๐Ÿ˜‚

from acnn.

GatsbyUSTC avatar GatsbyUSTC commented on July 25, 2024

@lawlietAi Sorry. In input attention layer, the author calculate a score f between word in entity and word in sentence based on inner product. The question is how to calculate the score if there're several words in an entity.

from acnn.

FrankWork avatar FrankWork commented on July 25, 2024

@GatsbyUSTC If an entity contains several words, we just use the last word to represent the entity. It is a common practice.

from acnn.

dgai91 avatar dgai91 commented on July 25, 2024

attention is not almighty. but it can let network get the keywords from articles. this paper used 2 attention layers to increase the depth of nn, but att reduced information a lot. maybe it is the reason of bad performance
in addition, maybe this paper gave us a way to process long articles. i would do more experiment further

from acnn.

GatsbyUSTC avatar GatsbyUSTC commented on July 25, 2024

@FrankWork I did not deny the entire attention mechanism. The question is how can the attention learn to find the most relevant words on relation classification task. The attention mechanism in input layer proposed by the author just compute a inner product between entity and words so that words that are similar to entity will be paid more attention. Does it really help relation classification? Take "The school master teaches the lesson with a stick" for example, keyword for relation classification should be "with" since the correct relation is Instrument-Agency. Word "with" is relevant to the relation classification but it doesn't seem to be similar with "master" or "stick" which means we can't get a high attention score based on inner product. I just want to know the function of the attention mechanism here. Of course I know in some applications the attention mechanism will help, but they also get a good reason.

from acnn.

FrankWork avatar FrankWork commented on July 25, 2024

@GatsbyUSTC The inner product does not guarantee that the two words must be similar semantically. It can also be interpreted as relevance since the embeddings are learned. "with + n." is common in English, why can't they have higher inner product?

from acnn.

charlesfufu avatar charlesfufu commented on July 25, 2024

@FrankWork i think the original paper didn't use test data but use the eval data which divided from train data

You codes don't have the train or test data,So how to run your codes?

from acnn.

Related Issues (8)

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.