Context - guided Embedding Adaptation for Effective Topic Modeling in Low-Resource Regimes (Neurips 2023)
간단 Preview
기존의 Embedding based neural topic modeling (ETM) 은 좋은 topic modeling 기법이지만 , 단어 의미의 동적으로 변하는 성격을 고려하지 않는다는 단점이 존재한다.
따라서 본 연구에서는 단어의 의미적으로 맞춤화된 단어 임베딩을 적응적으로 생성하는 효과적인 방법을 제안함.
(few-shot learning for TM 문제를 해결하기 위함)
1. contextual information 을 각 작업에 대해 semantic graph 로 압축하여 이를 Variational Graph Auto-Encoder 를 이용하여 모델링
2. word 의 latent space 에 학습가능한 Gaussian mixture prior 을 이용하여 보다 효율적으로 학습
1. Introduction
토픽 모델링에서의 few-shot learning 문제를 해결하기 위함
토픽 모델링에서의 few-shot learning ??
이 경우 토픽 모델링 작업은 주어진 문서 집합에서 의미 있는 주제를 식별하고 추출하는 것을 포함한다.
Adaptive word embedding
목표는 주어진 작업에 특별히 맞춰진 단어 임베딩을 만드는 것.
단어 임베딩은 단어를 연속적인 벡터 공간에 나타내는 것이며, 적응형 임베딩은 작업과 관련된 의미를 포착하기 위해 사용
제안은 적응형 단어 임베딩을 생성하기 위해 Variational graph auto-encoder 를 도입.
그래프 오토인코더는 그래프의 노드를 표현하기 위해 사용되는 신경망의 한 유형으로, 여기서 그래프는 작업 특정 맥락에서 단어 간의 의미적 관계를 나타낸다.
Variational Graph Auto-Encoder
모델은 단어의 잠재적 표현을 학습하기 위해 변분 그래프 오토인코더를 활용.
이는 단어를 의미를 포착하는 잠재 공간으로 부호화하는 것을 포함한다.
의미적 그래프가 중요한 구성 요소로 언급되며, 이는 단어 간의 의미적 및 구조적 종속성을 고려하는 모델을 나타냄.
해석 가능한 Topic 생성
작업과 관련된 해석 가능한 주제를 추출하기 위해 해당 방법은 군집화를 통해 주제를 학습
의미적으로 유사한 단어를 그룹화하여 일관된 주제를 형성하는 것을 의미
단어의 잠재 공간에 가우시안 혼합 사전이 부여되어 있으며, 이는 단어의 잠재적 표현에 대한 가우시안 분포의 혼합을 가정한다는 것을 나타냅니다.
이는 잠재 공간의 구조와 다양성을 포착하는 데 도움이 된다.
2. Meta-CETM
2.1 Problem Fomulation
Topic Modeling 에서의 Few-shot learning 문제를 정의.
1. Training corpora : D_c
c=1 부터 C 까지 domain 을 나타낸다.
각 corpus 는 다른 domain 을 나타냄
2. Goal
Topic Model 을 테스트 데이터셋 (D_test) 에 일반화할 수 있는 모델을 학습시키는것.
이렇게 학습된 Topic Model 은 빠르게 적응하고 새로운 domain 과 관련된 Topic 을 추출할 수 있어야한다.
3. Training 전략 : "episodic training" for Few-shot leaning
- episodic training : few-shot learning 에서 흔하게 쓰는 학습방법
- BoW (Bag-of-Words) 를 이용하여 각 task 를 나타내었다.
- V : voca , J : 각 task 의 document 수
- 요약
이 문제는 여러 도메인(학습 말뭉치)에서 모델을 훈련하고, 적은 양의 데이터(few-shot learning)로 빠르게 새 도메인에 대해 토픽생성을 할 수 있는가 ??
episodic training (meta learning)을 사용하며 작업은 다양한 학습 말뭉치에서 몇 개의 문서로 구성되고 BoW representation 과 작업별 종속성 그래프는 각 task 의 문서 내의 단어 간의 관계를 포착하고 이해하기 위해 사용
2.2 Generative Model
핵심 아이디어 : 주어진 문서의 문맥 정보를 활용하여 현재 작업에 적합한 동적 단어 임베딩을 학습하는 것
Contextualized Embedded Topic Model (Meta-CETM)
Meta-CETM은 Low-resource condition 에서 few-shot learning for topic modeling 을 다루기 위해 소개
이 모델은 문서로부터 맥락 정보를 활용하여 특정 task 에 맞는 Dynamic word embedding 을 생성
모델 구성 요소
각각의 주어진 task T(i)에 대해 모델은 BoW representation X(i) 을 이용
추가로 contextual information 에 기반한 단어 간의 semantic graph 를 구성하여 단어 의미에 대한 보완적인 정보를 제공하는 인접 행렬 A(i)를 얻는다.
생성 모델 목표
생성 모델의 목표는 특정 작업에 대한 BoW 표현 (X(i)) 및 의미 그래프 정보 (A(i))를 함께 캡처하고 모델링하는 것
Meta-CETM : VGAEs + ETMs
Generative model 은 Variational Graph Autoencoders 및 Embedded Topic Models (ETMs) 로부터 설계함
가정 : 단어의 latent space 가 BoW 및 semantic graph 의 공간으로 매핑될 수 있다
생성 과정
생성 과정은 단어의 공유된 latent space 에 대한 가정을 중심으로 구성된다.
특정 작업 T(i)에 대해 단어의 잠재 표현 (Z(i))이 사전 분포에서 sampling 한다.
여기서 Z(i)는 잠재 공간의 차원인 D와 어휘 크기인 V로 이루어진 행렬
생성 모델은 작업 내의 단어가 이 latent space 에서 어떻게 표현되는지에 대한 기초를 제시하여 BoW 및 의미 그래프 관측을 모두 캡처하는 데 기여한다.
요약
Meta-CETM 생성 모델은 자원이 부족한 상황에서 주제 모델링의 어려움에 대응하기 위해 설계함
이 모델은 BoW 표현 및 의미 그래프를 통한 문맥 정보를 통합하여 최근의 VGAEs (Variational Graph Auto-Encoder) 및 ETMs (Ebedded topic models) 의 발전에서 아이디어를 받아 공유된 latent space 에서 이러한 관측을 모델링합니다.
생성 과정은 주어진 작업에 대한 BoW 및 의미 그래프 정보를 연결하기 위해 사전 분포에서 latent word representation 을 샘플링하는 것으로 구성된다.
Meta-CETM 동작원리의 이해
Topic-Word Matrix
각 토픽은 word는 latent space 에서 Gaussian 분포로 나타낼 수 있다
각 단어 임베딩에 할당된 확률 밀도가 있는 가우시안 분포를 갖습니다
의미적으로 유사한 단어들은 잠재 공간에서 가깝고 동일한 토픽에서 생성될 것으로 기대한다.
Generation process of Meta-CETM

2.3 Variational Inference Algorithm
Task : T
Data : X
Goal : Approximate the posterior distributions over the latent variables and the parameter of GMM
Document-specific latent variable inference
- Residual multi layer perceptron (ResMLP)
- Variational posterior distribution
- Logistic Gaussian distribution
Task-specific latent variable inference
- Apply Gaussian distribution to approximate the variational posterior
- Parameter : mean vector , covariance matrix
Expectation Maximization for Solving
mu , sigma : Task-specific parameters of Gaussian mixture distribution
To approximate the posterior, using Expectation Maximization (EM) Algorithm to optimize to parameter

2.4 Training Objective and Optimization
By Jensen's inequality , solve to ELBO (Evidence Lower BOund)
ELBO = reconstruction errors for document BoW and graph adjacency matrix
- Variational Posterior Distribution
3. Experiments and Analysis
- 실험결과 정리




- Reference of Evaluation Measures 정리
1. per-holdout-word perplexity (PPL)
[46] Yulai Cong, Bo Chen, Hongwei Liu, and Mingyuan Zhou. Deep latent Dirichlet Allocation with topic-layer-adaptive stochastic gradient riemannian mcmc. arXiv preprint arXiv:1706.01724, 2017.
2. Reference of Topic Quality Measures
2-1. Topic Diversity (TD)
Feng Nan, Ran Ding, Ramesh Nallapati, and Bing Xiang. Topic modeling with Wasserstein autoencoders. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6345–6381, Florence, Italy, July 2019. Association for Computational Linguistics.
2-2. Topic Coherence (TC)
2-3. Normalized Pointwise Mutual Information (NPMI)
[50] David Newman, Jey Han Lau, Karl Grieser, and Timothy Baldwin. Automatic evaluation of topic coherence. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 100–108, Los Angeles, California, June 2010. Association for Computational Linguistics.
[51] Michael Röder, Andreas Both, and Alexander Hinneburg. Exploring the space of topic coherence measures. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining, WSDM ’15, page 399–408, New York, NY, USA, 2015. Association for Computing Machinery.
cf. The NPMI score is computed through the gensim package in https://radimrehurek.com/gensim/ models/coherencemodel.html.
3. Few-shot document classification
Classification strategy
-> Adapt to a task-specific classifier and comput the accuracy on the query set
4. Related Work
1. Hierarchical topic models
[54] David M Blei, Thomas L Griffiths, and Michael I Jordan. The nested Chinese restaurant process and bayesian nonparametric inference of topic hierarchies. Journal of the ACM (JACM), 57(2): 1–30, 2010.
[14] John Paisley, Chong Wang, David M Blei, and Michael I Jordan. Nested hierarchical Dirichlet processes. IEEE transactions on pattern analysis and machine intelligence, 37(2):256–270, 2014.
[46] Yulai Cong, Bo Chen, Hongwei Liu, and Mingyuan Zhou. Deep latent Dirichlet Allocation with topic-layer-adaptive stochastic gradient riemannian mcmc. arXiv preprint arXiv:1706.01724, 2017.
[55] Mingyuan Zhou, Yulai Cong, and Bo Chen. The Poisson gamma belief network. Advances in Neural Information Processing Systems, 28:3043–3051, 2015.
2. Neural Topic Models (NTMs)
[56] Dallas Card, Chenhao Tan, and Noah A Smith. A neural framework for generalized topic models. arXiv preprint arXiv:1705.09296, 2017
[15] Yishu Miao, Lei Yu, and Phil Blunsom. Neural variational inference for text processing. In International conference on machine learning, pages 1727–1736. PMLR, 2016
3. Embedded Topic Models (ETMs)
[18] Adji B Dieng, Francisco JR Ruiz, and David M Blei. Topic modeling in embedding spaces. Transactions of the Association for Computational Linguistics, 8:439–453, 2020.
[31] Zhibin Duan, Dongsheng Wang, Bo Chen, Chaojie Wang, Wenchao Chen, Yewen Li, Jie Ren, and Mingyuan Zhou. Sawtooth factorial topic embeddings guided gamma belief network. In ICML 2021: International Conference on Machine Learning, July 2021.
4. CTMs
[22] Federico Bianchi, Silvia Terragni, Dirk Hovy, Debora Nozza, and Elisabetta Fersini. Crosslingual contextualized topic models with zero-shot learning. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1676–1683, Online, April 2021. Association for Computational Linguistics.
[21] Federico Bianchi, Silvia Terragni, and Dirk Hovy. Pre-training is a hot topic: Contextualized document embeddings improve topic coherence. arXiv preprint arXiv:2004.03974, 2020.
5. Topic Modeling under the few-shot setting
[30] Zhibin Duan, Yishi Xu, Jianqiao Sun, Bo Chen, Wenchao Chen, Chaojie Wang, and Mingyuan Zhou. Bayesian deep embedding topic meta-learner. In International Conference on Machine Learning, pages 5659–5670. PMLR, 2022.
[27] Tomoharu Iwata. Few-shot learning for topic modeling. arXiv preprint arXiv:2104.09011, 2021.
5. Conclusion
This work , Propose a "novel NTM" : Meta-CETM
-> To address the fast adaption problem in document analysis under low-resource regimes.
Meta-CETM
- A task-specific graph to obtain context-related word embeddings
- The graph VAE with Gaussian Mixture prior to model the word representation and topic embeddings
- Optimized through the EM algorithm
- The superior performance of our model in solving the adaptation problem in topic modeling
6. Limitations and Future Work
- 본 연구에서 제안된 Method
Improve existing embedded topic models (ETMs) under the low-resource settings by introducing the task-specific graph with the Gaussian mixture prior
- Main Limitation
1. The reliance on the pre-trained parsing tools
2. 슬라이딩 윈도우 방법과 같은 다른 접근 방식도 그래프를 구성하는 데 사용될 수 있으며 이는 training 에 의존하지 않는다.
3. 논문에서는 강력한 성능을 보이지만 여전히 동일한 데이터셋에서 training 및 test 되었다.
4. 현재의 대규모 모델 시대에서는 큰 규모의 데이터셋에 대해 사전 훈련한 후 few-shot learning 이나 zero-shot learning 을 수행하는 것이 연구자들의 주목과 관심을 끌고 있다. 특히 베이지안 모델 같은 경우에 해당한다.
5. Pre-training 접근 방식은 본 논문의 범위를 벗어나며, 미래 연구에서 이 문제에 대해 철저한 조사를 수행할 것이다.