Feed intake is one of the most important components of feed efficiency in dairy systems. However, it is a difficult trait to measure in commercial operations for individual cows. Milk spectrum from mid-infrared spectroscopy has been previously used to predict milk traits, and could be an alternative to predict dry matter intake (DMI). The objectives of this study were (1) to evaluate if milk spectra can improve DMI predictions based only on cow variables; (2) to compare artificial neural network (ANN) and partial least squares (PLS) predictions; and (3) to evaluate if wavelength (WL) selection through Bayesian network (BN) improves prediction quality. Milk samples (n = 1,279) from 308 mid-lactation dairy cows [127 ± 27 d in milk (DIM)] were collected between 2014 and 2016. For each milk spectra time point, DMI (kg/d), body weight (BW, kg), milk yield (MY, kg/d), fat (%), protein (%), lactose (%), and actual DIM were recorded. The DMI was predicted with ANN and PLS using different combinations of explanatory variables. Such combinations, called covariate sets, were as follows: set 1 (MY, BW0.75, DIM, and 361 WL); set 2 [MY, BW0.75, DIM, and 33 WL (WL selected by BN)]; set 3 (MY, BW0.75, DIM, and fat, protein, and lactose concentrations); set 4 (MY, BW0.75, DIM, 33 WL, fat, protein, and lactose); set 5 (MY, BW0.75, DIM, 33 WL, and visit duration in the feed bunk); set 6 (MY, DIM, and 33 WL); set 7 (MY, BW0.75, and DIM); set-WL (included 361 WL); and set-BN (included just 33 selected WL). All models (i.e., each combination of covariate set and fitting approach, ANN or PLS) were validated with an external data set. The use of ANN improved the performance of models 2, 5, 6, and BN. The use of BN combined with ANN yielded the highest accuracy and precision. The addition of individual WL compared with milk components (set 2 vs. set 3) did not improve prediction quality when using PLS. However, when ANN was employed, the model prediction with the inclusion of 33 WL was improved over the model containing only milk components (set 2 vs. set 3; concordance correlation coefficient = 0.80 vs. 0.72; coefficient of determination = 0.67 vs. 0.53; root mean square error of prediction 2.36 vs. 2.81 kg/d). The use of ANN and the inclusion of a behavior parameter, set 5, resulted in the best predictions compared with all other models (coefficient of determination = 0.70, concordance correlation coefficient = 0.83, root mean square error of prediction = 2.15 kg/d). The addition of milk spectra information to models containing cow variables improved the accuracy and precision of DMI predictions in lactating dairy cows when ANN was used. The use of BN to select more informative WL improved the model prediction when combined with cow variables, with further improvement when combined with ANN.