Do LLMs Know When They're Wrong About Molecular Property Prediction?

Study evaluates 7 LLMs on molecular property prediction: in-context learning works, but uncertainty signals are weak and memorized data causes overconfidence.
This study systematically evaluated seven frontier LLMs' ability to predict molecular properties through in-context learning and examined whether self-reported uncertainty correlates with prediction errors. On three contamination-screened clean datasets, LLM accuracy improved with more in-context examples, with the best model surpassing traditional baselines at 30 examples; however, increased reasoning effort had minimal impact. Self-reported uncertainty showed weak error-ranking ability, with a maximum Spearman correlation of only 0.46, comparable to baselines. Combining uncertainty with predictions, the best LLM matched baseline performance on some datasets. On the memorized ESOL dataset, accuracy did not improve with context, and models reported lower uncertainty for recallable molecules, exhibiting overconfidence. The study highlights the need for caution with LLM uncertainty estimates and stronger contamination screening and calibration.
Large language models (LLMs) have demonstrated strong capabilities across many domains, but are they reliable for molecular property prediction? A new study systematically evaluated seven frontier LLMs' ability to predict molecular properties through in-context learning, with particular focus on whether the models' self-reported uncertainty correlates with prediction errors. The study found that on clean datasets, LLMs can leverage in-context examples to improve accuracy, even surpassing traditional baselines; however, the models' self-reported uncertainty has weak error-ranking ability, and for memorized datasets, models exhibit overconfidence.
Study Design: Evaluating LLM Molecular Property Prediction and Uncertainty
The study selected seven frontier LLMs and conducted experiments on four molecular datasets. Each dataset underwent contamination screening to determine whether the LLM's training data included these molecules. Three datasets were found to be clean, while the fourth, the ESOL dataset, was memorized by most models and served as a control. The experiments required models to predict molecular properties based on in-context examples while simultaneously reporting their own uncertainty. The study also compared the performance of classical baseline models (trained on the same molecules).

In-context Learning refers to a model's ability to infer the output corresponding to a new task input solely through a small number of examples provided in the prompt (i.e., the "context"), without updating parameters. In molecular property prediction, researchers place several "molecule-property" pairs as examples in the prompt, then ask the model to predict the properties of new molecules. This paradigm relies on the model identifying task patterns from examples rather than learning through gradient descent. Its effectiveness is influenced by the number, quality, and ordering of examples, and may vary with model scale and pretraining data distribution. In this study, the number of in-context examples ranged from 0 to 30 to observe whether models can benefit from examples like traditional machine learning models.
In-Context Learning Significantly Improves Accuracy, but Reasoning Effort Has Minimal Impact
On the three clean datasets, all LLMs' prediction accuracy improved as the number of in-context examples increased. When provided with 30 examples, the best-performing LLM surpassed all baseline models. This indicates that LLMs can learn the patterns of molecular property prediction from in-context examples.
The study also examined whether requiring more reasoning effort from models affects accuracy. Results showed that varying reasoning effort had little impact on accuracy. This suggests that models may not be improving predictions through explicit reasoning steps, but rather relying on pattern recognition.
Reasoning Effort in such studies typically refers to prompting models to perform explicit step-by-step reasoning before giving an answer (e.g., "let's think step by step"), or adjusting the computational budget during generation (e.g., chain-of-thought length, number of samples). This study found that increasing reasoning effort had minimal impact on molecular property prediction accuracy, implying that models may primarily rely on pattern matching of in-context examples rather than explicit chemical reasoning. This contrasts with the traditional view that complex scientific tasks require multi-step reasoning, suggesting that current LLMs may take a "shallow" heuristic path in molecular property prediction.
Self-Reported Uncertainty Has Limited Error-Ranking Ability
The models' self-reported uncertainty showed weak ability in ranking prediction errors, with the highest Spearman rank correlation coefficient being only 0.46. This level is roughly comparable to baseline models' uncertainty estimates. In other words, although LLMs can report uncertainty, this uncertainty signal is insufficient to reliably distinguish between correct and incorrect predictions.

Spearman rank correlation coefficient is a non-parametric statistic used to measure the monotonic relationship between the ranks of two variables, ranging from -1 to 1. In this study, it was used to evaluate the ranking consistency between model self-reported uncertainty scores and prediction absolute errors: the higher the coefficient, the better the uncertainty can distinguish error magnitude. The maximum of only 0.46 indicates that the model's uncertainty signal only partially reflects error magnitude, far from the level required for reliable error detection (typically desired >0.7). For reference, traditional baseline models' uncertainty estimates are also roughly at this level, indicating that LLMs do not demonstrate uncertainty quantification capabilities beyond classical methods.
Combining Uncertainty and Prediction: Comparable to Baselines in Some Scenarios
The study further explored methods combining uncertainty with prediction results. On the lipophilicity dataset, when in-context examples were few, the most confident half of predictions from the best-performing LLM were the most accurate; on the BACE and antiviral datasets, as well as on the lipophilicity dataset with more in-context examples, the best LLM's performance was comparable to the best baseline. This indicates that under specific conditions, LLM predictions combined with uncertainty information can reach practical levels.
Memorized Data Leads to Overconfidence
On the contaminated ESOL dataset, LLM accuracy did not improve with increasing in-context examples, consistent with expectations for a memorized dataset. More specifically, for molecules where models could recall the correct values, they reported lower uncertainty. This indicates that when models rely on memory rather than in-context learning, they exhibit overconfidence, potentially giving incorrect but high-confidence predictions.
Data Contamination refers to the possibility that evaluation data may have already appeared in the LLM's pretraining corpus, causing the model to "recall" answers rather than truly "learn." This study marked the ESOL dataset as memorized by most models through contamination screening, serving as a control. Memorization leads to two problems: first, accuracy no longer improves with increasing in-context examples because the model directly accesses memory; second, models report lower uncertainty for molecules they can recall, i.e., overconfidence. This phenomenon is particularly dangerous in scientific evaluation because high-confidence incorrect predictions may mislead downstream decisions. Therefore, when evaluating LLMs' scientific capabilities, rigorous contamination screening is essential, and the mechanisms of "learning" versus "memorization" must be distinguished.
Conclusions and Implications
This study reveals both the potential and limitations of LLMs in molecular property prediction tasks. On clean data, LLMs can match or even surpass traditional baselines through in-context learning, but self-reported uncertainty signals are weak and difficult to use alone for error detection. For memorized data, models become overconfident, reminding us to treat model uncertainty estimates with caution in practical applications. Future work may need to combine external calibration methods or develop better uncertainty quantification techniques to improve the reliability of LLMs in scientific prediction tasks.
Related articles

Claude Code + Agent: Building a Fully Automated AI Testing Loop
Bilibili course breakdown: how test developers can use Claude Code terminal-based Agents to build a fully automated AI testing loop. Compares permission boundaries of terminal vs. device Agents, explains why enterprise projects choose Claude Code over Open Claude-type tools, and outlines the Node.js environment setup and DeepSeek model integration path.

Working with AI Agents Requires Nerves of Steel
The more autonomous AI agents become, the heavier the user's psychological burden. Drawing from a Hacker News discussion, this article analyzes black-box anxiety, behavior drift, and monitoring fatigue in agent collaboration, and offers practical approaches like sandbox isolation, permission control, and task granularity management to reduce cognitive load.

To Replace Adobe Acrobat, I Built My Own Open-Source PDF Reader Folio
A developer unhappy with Adobe Acrobat's bloat built Folio, a lightweight open-source PDF reader. Learn the design philosophy and use cases of this alternative.