In this paper, we propose an algorithm to maximize downlink rate performance in the context of multiple-input multiple-output (MIMO) Heterogeneous Networks (HetNets). Specifically, we evaluate the benefits of flexible duplexing, a promising strategy that consists in combining uplink and downlink cells within the same channel use. In order to handle intercell interference, we rely on the interference alignment (IA) technique, taking into account the impact of the channel estimation errors on the inter-cell interference leakage. Determining the best uplink/downlink configuration is a combinatorial problem, and therefore we consider several approaches to reduce the computational demands of the problem. First, we use a statistical characterization for the average rates achieved by IA in order to avoid the calculation of alignment solutions for all possible settings in the network. Additionally, we propose two hierarchical switching (HS) strategies so that only a subset among the total number of combinations is explored. As a performance baseline, we include in the comparison the conventional time division duplex (TDD) approach and the well-known minimum mean square error (MMSE) decoder. The obtained results show that downlink rates achieved by implementing flexible duplexing and applying inter-cell IA significantly outperform conventional TDD transmissions. Finally, the proposed hierarchical schemes are shown to obtain almost the same rates as exhaustive search with much lower computational cost.