The proliferation of distributed renewable energy resources and plug-in electric vehicles (EVs) have helped residential electricity consumers evolve into prosumers as they participate in the local energy market (LEM) by engaging in transactions of surplus electricity. In this system, the budgetbalance problem is a frequent issue, particularly when Vickrey-Clarke-Groves (VCG)-based mechanisms are applied to managing the two-sided nature of LEM. Although this issue could be partially addressed by manually modifying the LEM, the variance in the LEM environment needs to be better understood. This paper proposes a deep learning-based automatic mechanism design (AMD) method to improve VCG for tackling the budget-balanced two-sided LEM, as a way to avoid tedious manual adjustments. A convolutional neural network (CNN) with self-attention mechanism is constructed to extract features from biddings and to provide robust generalization capabilities for participating prosumers. The gated recurrent units (GRUs) are utilized to extend the proposed approach to the non-stationary bidding environment. This improved mechanism is targeted as efficient and incentive compatible, with the ability to keep the balance between the budget-balance and individual rationality. Case studies are conducted to demonstrate effectiveness of the proposed automatically improved mechanism and adaptive ability to various bidding environments.