In various practical noise control scenarios, such as duct noise mitigation, industrial machinery, architectural acoustics, and underwater applications, it is essential to develop noise absorbers that deliver effective low-frequency attenuation while maintaining compact dimensions. To achieve low-frequency absorption within a limited spatial volume, this study proposes an embedded Helmholtz resonator featuring a roughened neck and establishes a numerical computational model that incorporates thermos viscous effects. A quantitative investigation is conducted on three types of embedded rough-neck geometries (rectangular-grooved, triangular-grooved, and undulated) to elucidate their acoustic performance, with particular attention to differences in acoustic transmission loss and acoustic impedance characteristics. In response to the practical demand for even lower-frequency attenuation, this work further focuses on optimizing the structural parameters of an embedded rectangular-grooved Helmholtz resonator (ERHR). A back-propagation (BP) neural network models and predicts how structural parameters impact the acoustic transmission coefficient, elucidating the effects of geometric variations. Moreover, by coupling the BP network with the Golden Jackal Optimization (GJO) algorithm, a BP-GJO optimization model is developed to refine the structural parameters. The findings reveal that the proposed method significantly improves resonator spatial utilization at a specific noise frequency while preserving acoustic transmission loss performance. This work thereby provides a promising strategy for designing low-frequency, compact Helmholtz resonators suitable for a wide range of noise control applications.