# IECI: A Pipeline Framework for Iterative Event Causal Identification with Dynamic Inference Chains
## 3 Methodology
### Semantic-Role Guided Causal Inference Graph
#### 3.2.4 Causal Graph Refinement  
To effectively model the complex causal structure between events and capture latent inference patterns in causal chains, this module introduces a graph-structure-aware mechanism for causal information updating. The node representation \(z_{i}\) in the causal graph is progressively refined through a process of causal inference complementation. **Causality completion based on inference chains. ** First, based on the identified causal relationships in the current graph, we identify all Transitive Chains shaped as \(\left(\mathrm{e_{i}\to e_{j},e_{j}\to e_{k}}\right)\), which represent the potential conduction paths from \(\mathrm{e_{i}}\) to \(\mathrm{e_{k}}\). However, we do not directly add the transitive link to avoid erroneous complementation. We introduce the semantic similarity of event embeddings as a decision criterion. Specifically, if the cosine similarity between the embeddings of events \(\mathrm{e_{i}}\) and \(\mathrm{e_{k}}\) is satisfied with a predefined threshold, the causal edge \(\left(\mathrm{e_{i}\to e_{k}}\right)\) is complemented:  
\[\cos(\mathrm{h_{i}},\mathrm{h_{k}})=\frac{\mathrm{h_{i}^{\top}h_{k}}}{\parallel \mathrm{h_{i}\parallel\cdot\parallel h_{k}\parallel}}>\delta, \tag{25}\]  
\(\delta\) is the similarity threshold. **Attention-based edge weight calculation. ** The causal graph is divided into intra-sentence and inter-sentence for attention calculation to improve the model's inference accuracy. The higher the importance of the source and target nodes, the more critical the edge is to the inference. The attention scores of the source and target nodes are calculated by combining the contextual event representations \(\mathrm{h_{i}},\mathrm{h_{j}}\):  
\[\alpha_{\mathrm{i}\to j}^{\left(\mathrm{s}\right)}=\sigma(\mathrm{W_{s}} \mathrm{h_{i}}+\mathrm{b_{s}}),\alpha_{\mathrm{i}\to j}^{\left(\mathrm{t} \right)}=\sigma\big{(}\mathrm{W_{s}}\mathrm{h_{j}}+\mathrm{b_{t}}\big{)}, \tag{26}\]  
where \(\mathrm{W_{s}}\) denotes the learnable weight matrix of the source node. \(\mathrm{b_{s}}\) denotes the bias term of the source node. \(\alpha_{\mathrm{i}\to j}^{\left(\mathrm{s}\right)}\) denotes the attentional weight of the event \(\mathrm{e_{i}}\) to the event pair \(\left(\mathrm{e_{i}},\mathrm{e_{j}}\right)\). \(\alpha_{\mathrm{i}\to j}^{\left(\mathrm{t}\right)}\) denotes the attentional weight of the event \(\mathrm{e_{j}}\) to the event pair \(\left(\mathrm{e_{i}},\mathrm{e_{j}}\right)\). \(\sigma\) is the activation function. The combined attention weight \(\mathrm{w_{ij}}\) of the edges connected to the event pair \(\left(\mathrm{e_{i}},\mathrm{e_{j}}\right)\) is calculated as follows:  
\[\mathrm{w_{ij}}=\alpha_{\mathrm{i}\to j}^{\left(\mathrm{s}\right)}+\alpha_{ \mathrm{i}\to j}^{\left(\mathrm{t}\right)}, \tag{27}\]  
**Multi-Head Attention aggregation and node representation update. ** The Multi-Head Attention mechanism is introduced to update the representation of each event node \(\mathrm{e_{i}}\) in the graph. This update is based on the representations and edge weights of its neighboring nodes. In the \(\left(1+1\right)\)th iteration, the representation \(\mathrm{z_{i}^{\left(1+1\right)}}\) of node \(\mathrm{e_{i}}\) in the causal graph is calculated as follows:  
\[\mathrm{z_{i}^{\left(1+1\right)}}=\parallel_{\mathrm{m}=1}^{\mathrm{M}}\sigma \Big{(}\sum\
olimits_{\mathrm{j}\in\mathcal{N}\left(\mathrm{i}\right)}\mathrm{ w_{ij}^{\left(\mathrm{m}\right)}}\cdot\mathrm{W^{\left(\mathrm{m}\right)}}\mathrm{z_{j}^{ \left(\mathrm{l}\right)}}\Big{)}, \tag{28}\]  
where \(\parallel_{\mathrm{m}=1}^{\mathrm{M}}\) denotes the concatenation of outputs from all M attention heads along the feature dimension. \(\sigma\) is the activation function. \(\mathcal{N}\left(\mathrm{i}\right)\) is the set of neighbors of the event node \(\mathrm{e_{i}}\). \(\mathrm{w_{ij}^{\left(\mathrm{m}\right)}}\) is the edge attention matrix of the node pairs \(\left(\mathrm{e_{i}},\mathrm{e_{j}}\right)\) in the m-th attention head.