Papers › Sentiment Classification Using Document Embeddings Trained with Cosine Similarity

Sentiment Classification Using Document Embeddings Trained with Cosine Similarity

1 Jul 2019ACL 2019 7archive 2025-07-28

Tan Thongtan, Tanasanee Phienthrakul

In document-level sentiment classification, each document must be mapped to a fixed length vector. Document embedding models map each document to a dense, low-dimensional vector in continuous vector space. This paper proposes training document embeddings using cosine similarity instead of dot product. Experiments on the IMDB dataset show that accuracy is improved when using cosine similarity compared to using dot product, while using feature combination with Naive Bayes weighted bag of n-grams achieves a new state of the art accuracy of 97.42{\%}. Code to reproduce all experiments is available at https://github.com/tanthongtan/dv-cosine

PaperPDFCode

Code

tanthongtan/dv-cosine officialmentioned in paper report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

ClassificationDocument EmbeddingGeneral ClassificationSentiment AnalysisSentiment Classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Sentiment Analysis IMDb DV-ngrams-cosine Accuracy 93.13 #28 of 49 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections