# Leveraging Advanced NLP Techniques and Data Augmentation to Enhance Online Misogyny Detection
## 3 Proposed Work
### Topic Modeling  
Once the dataset was enriched, we employed Latent Dirichlet Allocation (LDA) to uncover latent topics and understand the underlying themes in the sequences of data. LDA is a generative probabilistic model that assumes each sequence is a mixture of several topics, with each topic being a distribution over words [32,33]. Throughout LDA, we were able to explore the thematic structure of the sequences, revealing hidden patterns and relationships that distinguish different types of content, such as misogynistic versus non-misogynistic sequences. LDA assumes that the process of generating each sequence follows these steps: For each sequence \(d\), a topic distribution \(\theta_{d}\) is drawn from a Dirichlet distribution with parameter \(\alpha\), which represents the proportion of topics within the sequence. Then, for each word \(w_{n,d}\) in sequence \(d\), a topic assignment \(z_{n,d}\) is drawn from the multinomial distribution defined by \(\theta_{d}\). Finally, a word \(w_{n,d}\) is drawn from the multinomial distribution defined by the topic \(z_{n,d}\), where \(\phi_{k}\) is the word distribution for topic \(k\), drawn from a Dirichlet distribution with parameter \(\beta\). The joint probability of the observed words \(w\), topic assignments \(z\), topic distributions \(\theta\), and word distributions \(\phi\) is expressed as:  
\[P(w,z,\theta,\phi|\alpha,\beta)=\prod_{d=1}^{D}P(\theta_{d}|\alpha)\prod_{n=1 }^{N_{d}}P(z_{n,d}|\theta_{d})P(w_{n,d}|\phi_{z_{n,d}})\]  
where \(D\) is the total number of sequences (documents), \(N_{d}\) is the number of words in sequence \(d\), and \(\alpha\) and \(\beta\) are hyperparameters controlling the sparsity of topic distributions and word distributions, respectively. To infer the topic assignments for words in sequences, LDA uses collapsed Gibbs sampling. The conditional probability for the topic assignment of the \(i\)-th word in sequence \(d\) is given by:  
\[P(z_{i}=k|z_{-i},w)\propto\frac{n_{d,k}^{-i}+\alpha_{k}}{n_{d}^{-i}+K\alpha} \cdot\frac{n_{k,w_{i}}^{-i}+\beta_{w}}{n_{k}^{-i}+V\beta}\]  
This equation calculates the posterior probability of assigning topic \(k\) to the \(i\)-th word in a document. It depends on the current topic assignments \(z_{-i}\) (excluding the \(i\)-th word) and the word tokens \(w\). The term \(n_{d,k}^{-i}\) represents how many times topic \(k\) is assigned to words in document \(d\), excluding the \(i\)-th word. This measures the prevalence of topic \(k\) within the document. \(n_{d}^{-i}\), the total number of words in document \(d\) excluding the \(i\)-th word, acts as a normalizing factor. The parameter \(K\) denotes the total number of topics. The term \(n_{k,w_{i}}^{-i}\) indicates how often word \(w_{i}\) is assigned to topic \(k\), excluding the \(i\)-th instance of \(w_{i}\). This reflects how strongly word \(w_{i}\) relates to topic \(k\). \(n_{k}^{-i}\), the total number of words assigned to topic \(k\) (excluding the \(i\)-th word), provides a normalizing term. The parameter \(V\) is the total number of unique words in the vocabulary. The hyperparameter \(\alpha_{k}\) is a Dirichlet prior that controls the document-topic distribution. Larger values of \(\alpha_{k}\) result in more uniform topic proportions within a document. Similarly, \(\beta_{w}\), a Dirichlet prior for the topic-word distribution, affects how uniformly words are distributed across topics. The parameters \(\alpha\) and \(\beta\) are the sums of all \(\alpha_{k}\) and \(\beta_{w}\), respectively. The first term, \(\frac{n_{k,k}^{-i}+\alpha_{k}}{n_{d}^{-i}+Ka}\), captures the probability of topic \(k\) appearing in document \(d\), adjusted by \(\alpha_{k}\). The second term, \(\frac{n_{k,w_{i}}^{-i}+\beta_{w}}{n_{k}^{-i}+V\beta}\), describes the probability of word \(w_{i}\) being generated by topic \(k\), adjusted by \(\beta_{w}\).