Japanese Financial SentiCSE
Sentiment-aware sentence embedding model for Japanese economic text, based on SentiCSE (Kim et al., COLING 2024). The model is trained to place sentences with the same sentiment (positive / neutral / negative) close together and sentences with different sentiments far apart.
Training code: erieriya/senticse-fin-japanese-public
Model Details
- Base model: rinna/japanese-roberta-base
- Training data: Economy Watchers Survey (retarfi/economy-watchers-survey)
- Method: Sentiment-guided contrastive learning (SentiCSE) with three sentiment labels
- Best checkpoint: step 2500, val_macro_f1=0.7466, test_macro_f1=0.7366 (linear probe on the CLS embedding)
Usage
import torch
import torch.nn.functional as F
from transformers import AutoModel, T5Tokenizer
model_name = "eriyaharuna/japanese-financial-senticse"
tokenizer = T5Tokenizer.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name)
model.eval()
texts = [
"来客数が増えており、売上は前年を上回っている。",
"新商品の売れ行きが好調で、受注も増えている。",
"客足が遠のき、売上は前年を大きく下回っている。",
]
inputs = tokenizer(texts, padding=True, truncation=True, max_length=64, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
embeddings = F.normalize(outputs.last_hidden_state[:, 0], dim=-1)
print(embeddings @ embeddings.T) # cosine similarity
Use the final hidden state of the first token (last_hidden_state[:, 0]) as the sentence embedding.
This is the same embedding used for the linear probe results above.
Do not use pooler_output; the pooler layer is not trained and is randomly initialized when loaded with AutoModel.
Warnings about unused lm_head / mlp weights and newly initialized pooler weights are expected.
Citation
If you use this model, please cite our JSAI 2026 paper (in Japanese) and the original SentiCSE paper:
@inproceedings{haruna2026ternary,
title={Exploring an Embedding Model Using Ternary Sentiment for the Economic Domain},
author={Haruna, Eriya and Shishido, Naoki and Keyaki, Atsushi},
booktitle={Proceedings of the 40th Annual Conference of the Japanese Society for Artificial Intelligence (JSAI 2026)},
pages={2H5-OS-2b-03},
year={2026},
url={https://www.jstage.jst.go.jp/article/pjsai/JSAI2026/0/JSAI2026_2H5OS2b03/_article/-char/ja/},
note={経済ドメインにおける3値センチメントに基づく埋め込みモデルの検討 (in Japanese)}
}
@inproceedings{kim2024senticse,
title={SentiCSE: A Sentiment-aware Contrastive Sentence Embedding Framework with Sentiment-guided Textual Similarity},
author={Kim, Jaemin and Na, Yohan and Kim, Kangmin and Lee, Sang Rak and Chae, Dong-Kyu},
booktitle={LREC-COLING 2024},
year={2024}
}