Practical attempts are made to develop a generalized framework that is capable of characterizing the diverse forms of deformation band. A distinct element model enabling grain fracture and pore collapse is presented, to quantify attributes such as porosity, grain size, mineralogy, cementation, and boundary constraint. The micro-cracking activity, grain fragmentation and energy components are tracked to inspect the tempo-spatial development of localization under contractional regimes. Typically, the porosity exerts the first-order control on the evolution of failure mode with confining pressure: the low-confinement response is always dilatant with the generation of axial split or shear band, and the high-confinement behaviors depend on porosity, where distributed cataclasis dominates at low porosity and collapsed pores often coalesce into a compaction band at high porosity. The nucleation and propagation of localization relate closely to the micro-cracking activity and energy budget, on which grain sorting, boundary constraint, mineralogy and cementation attributes have a direct impact. When the maximum grain size is not more than five times the minimum, the relative abundance of coarser grains facilitates the compaction localization, which is accompanied by a smaller magnitude in both fragmentation and energy release. The mineralogy and cementation generally affect the competition of tensile and shear cracking events on the grain interior and boundary, and have minor effect on the rupture morphology; the frictional boundary does little to the cracking rate while seriously impact the low-confinement performance. Numerical results suggest that the compaction band may originate from the intrinsic defect characterized by pore structure, and the other attributes are of secondary importance.