  Computational spectroscopic instruments with Broadband Encoding Stochastic
(BEST) filters allow the reconstruction of the spectrum at high precision with
only a few filters. However, conventional design manners of BEST filters are
often heuristic and may fail to fully explore the encoding potential of BEST
filters. The Parameter Constrained Spectral Encoder and Decoder (PCSED) - a
neural network-based framework is presented for the design of BEST filters in
spectroscopic instruments. By incorporating the target spectral response
definition and the optical design procedures comprehensively, PCSED links the
mathematical optimum and practical limits confined by available fabrication
techniques. Benefiting from this, the BEST-filter-based spectral camera present
a higher reconstruction accuracy with up to 30 times' enhancement and a better
tolerance on fabrication errors. The generalizability of PCSED is validated in
designing metasurface- and interference-thin-film-based BEST filters.
