explain both of this step by step and consider giving me information about both of this with detailed mathemetical concepts as well as thedetailed flowgraph to implement into program. :
Multi-Head Attention Layer: You can experiment with using a multi-head attention layer instead of the causal self-attention layer. Multi-head attention can attend to all positions in the input sequence, which might be beneficial for certain tasks like sentiment analysis, where the context from the entire input is crucial.

Bi-Directional Attention: Modify the attention mechanism to allow bi-directional attention, which means each token can attend to both left and right contexts. This approach could be useful for bidirectional language tasks, such as machine translation or text summarization.
please keep every information deep and explisitly perfect.  Provide exactly two different responses that are separated with 6 asterisk symbols: ******.
user