News

Article

Rapid, Chemical-Free Chocolate Analysis Using NIR Spectroscopy

Author(s):

Fact checked by:

Key Takeaways

  • NIR spectroscopy with PLSR provides a non-destructive, efficient method for analyzing dark chocolate, accurately predicting key components like fat, sugar, and theobromine.
  • The study achieved high prediction accuracy for fat (R² = 0.98), sucrose (R² = 0.92), and theobromine (R² = 0.94), with lower precision for caffeine due to its low concentration.
SHOW MORE

Researchers have developed a fast, chemical-free method using near-infrared spectroscopy to accurately analyze the quality of dark chocolate, offering a sustainable alternative to traditional testing techniques.

Key Points

  • Researchers from the Hungarian University of Agriculture and Life Sciences demonstrated that NIR spectroscopy combined with partial least squares regression (PLSR) provides a rapid, non-destructive, and environmentally friendly method for analyzing key dark chocolate components like fat, sucrose, theobromine, and caffeine.
  • The method showed high prediction accuracy for fat (R² = 0.98), sucrose (R² = 0.92), theobromine (R² = 0.94), and cocoa content (R² = 0.98), with low error margins confirmed by RMSECV values.
  • While effective overall, the method faces challenges in predicting trace compounds and handling extremely high cocoa content samples.

In a recent study, a team of researchers from the Hungarian University of Agriculture and Life Sciences investigated a better method to analyze the quality of dark chocolate. This study, published in the journal Food Chemistry, demonstrated how NIR spectroscopy, combined with partial least squares regression (PLSR), offers a powerful, non-destructive, and environmentally friendly method for evaluating key chocolate components such as fat, sugar, caffeine, and theobromine (1).

The chocolate industry is thriving, and it is expected to continue to grow. By 2029, the chocolate market is expected to reach $67.88 billion in revenue (2,3). Part of what drives the success of the chocolate industry is ensuring that the chocolate being sent out to market is of high quality. Traditionally, analyzing compounds in chocolate has required time-consuming and chemically intensive laboratory methods (1). However, in this study, the Hungarian research team demonstrated that NIR spectroscopy can not only replace these techniques, but also deliver accurate, reproducible results in a fraction of the time.

Flat lay view of dark chocolate chopped. Texture of cracked chocolate with copy space. | Image Credit: © Elena Uve - stock.adobe.com

Flat lay view of dark chocolate chopped. Texture of cracked chocolate with copy space. | Image Credit: © Elena Uve - stock.adobe.com

Several key compounds comprise chocolate and give it its sensory and physical qualities. The levels of fat, sucrose, and theobromine often dictate its quality. By analyzing 50-gram samples of chocolate with a Bruker MPA spectrometer operating in the 12,500–3,800 cm⁻¹ range, the researchers collected diffuse reflectance spectra using rotating quartz cuvettes (1). Each measurement was averaged over 32 scans to improve precision (1).

After scanning the chocolate samples, the research team took the spectral data and developed the predictive models. The results obtained showed that the coefficient of determination (R²), which is a statistical measure of prediction accuracy, was exceptionally high for fat (R² = 0.98), sucrose (R² = 0.92), theobromine (R² = 0.94), and even cocoa content (R² = 0.98) (1). Although caffeine predictions were somewhat less precise (R² = 0.76), this lack of precision was attributed to its naturally low concentration in chocolate, making it harder to quantify using NIR alone (1).

The researchers also noted that the root mean square error of cross-validation (RMSECV) values were also low. For example, fat content showed an RMSECV of just 1.08 g/100g across a range of 30.79–63.55 g/100g (1). For cocoa content, the method achieved an RMSECV of 1.93%, covering a wide range of chocolate samples from 45.28% to 95.78% cocoa content (1). This was an encouraging result because RMSECV measures the margin of error for each model, so this means that the model’s accuracy was pretty good.

After compiling all the findings, the research team then employed conventional high performance liquid chromatography (HPLC) techniques. Theobromine and caffeine levels were measured using an Agilent 1200 HPLC system with ultraviolet (UV) detection and gradient elution methods. Meanwhile, sugar content was determined using a refractive index detector and a Luna Omega SUGAR hydrophilic-interaction chromatography (HILIC) column with isocratic separation. These results served as the benchmark for building the NIR-based regression models (1).

By integrating traditional sample preparation methods with spectral data analysis, the researchers were able to compare the two techniques directly and found that NIR performed well. Notably, the fat content was cross-validated with the AOAC Method 963.15 to confirm accuracy (1).

What are the current remaining challenges?

The implications of the study are significant for the chocolate industry, where rapid, reliable quality control is critical. Although the method proposed in this study achieved great results, several challenges remain. First, the method struggled in predicting compounds with low natural abundance, such as caffeine (1). To solve this challenge, the researchers suggested that expanding the data set or using enhanced data processing techniques could improve prediction accuracy for these trace components (1). Additionally, chocolates with extremely high cocoa content (above 99%) were found to be outliers, slightly skewing the models for sucrose and caffeine prediction.

By reducing reliance on hazardous solvents and streamlining the testing process, NIR spectroscopy serves as a beneficial solution for both producers and the environment.

References

  1. Benes, E.; Matejka, G.; Fodor, M. Near-infrared Spectroscopy for Comprehensive Analysis of Dark Chocolate Composition. Food Chem. 2025, 469, 142562. DOI: 10.1016/j.foodchem.2024.142562
  2. Wetzel, W. Infrared Spectroscopy with Kohonen Networks and Multivariate Analysis for Cocoa Content Prediction. Spectroscopy. Available at: https://www.spectroscopyonline.com/view/infrared-spectroscopy-with-kohonen-networks-and-multivariate-analysis-for-cocoa-content-prediction (accessed 2025-08-04).
  3. Fortune Business Insiders, Cocoa and Chocolate Market Size, Share & COVID-19 Impact Analysis, By Type (Cocoa Ingredients (Butter, Liquor, Powder) and Chocolate (Dark, Milk, White, and Filled)), By Application (Food & Beverage, Cosmetics, Pharmaceuticals, and Others), and Regional Forecast, 2022-2029. Fortune Business Insiders. Available at: https://www.fortunebusinessinsights.com/industry-reports/cocoa-and-chocolate-market-100075 (accessed 2025-07-08).

Newsletter

Get essential updates on the latest spectroscopy technologies, regulatory standards, and best practices—subscribe today to Spectroscopy.

Related Videos
Christian Huck discusses how spectroscopic techniques are revolutionizing food analysis. | Photo Credit: © Spectroscopy.