SlowGuess/NeurIPS_2023_OCR huggingface dataset:
LLMs are brittle to problem scales For the shortest path task, we study the correlation between model performance and the number of nodes on the optimal shortest path. We group problems by the shortest path length and present results in Figure 6 for the CoT approach, which shows that the accuracy steadily drops when the number of nodes on the shortest path increases. While the reasoning process towards finding the shortest paths stays the same for optimal solutions with varying lengths, large language models are not robust to changes in graph scales and problem settings.
In-context exemplars and test difficulty We investigate the model performance when the incontext exemplars and test difficulty vary. For the cycle task, we write chain-of-thought solutions for problems selected from the medium and hard subsets, and evaluate TEXT-DAVINCI-003 on the cycle task with the two prompts. We present the results in Figure 7. The performance drops when the exemplar difficulty increases, indicating that LLM struggles to learn from exemplars with more difficulty.
Partial credit for the maximum flow task We provide partial credit for the maximum flow task in Table 10. The performance generally has the same trend as the results provided in Figure 2. Though on the hard subsets, the performance of COt is the highest, we believe this is more like guessing, as when COt is combined with self-consistency, the performance drops significantly.
Table 9: Model performance when graph descriptions are changed into cities, roads, and distances on the shortest path task.
Method	Easy	Hard
ZERO-SHOT	25.65	10.37
FEW-SHOT	24.83	12.37
CoT	16.99	22.07
0-CoT	17.41	7.04
CoT+SC	9.88	8.62
Table 10: Partial credit for the maximum flow task.
E Additional Large Language Models
E.1 CODE-DAVINCI-002 Results
We evaluate CODE-DAVINCI-002 on cycle, shortest path, and Hamilton path. The results are provided in Table 8. The findings are mostly similar to TEXT-DAVINCI-003: language models are preliminary graph reasoners on easy tasks while the benefit of in-context learning and advanced prompting is limited on more complex problems. However, in the COt and  $\mathrm{COT + SC}$  settings, CODE-DAVINCI-002 generates too many tokens before reaching the final answer, so we do not present the results in Table 8.
E.2 OPT Results
We fine-tune OPT-2.7B [Zhang et al., 2022b] and evaluate the model on the NLGraph benchmark. We randomly divide the standard version of the NLGraph benchmark into 4902 training problems and 1,000 test problems. We generate zero-shot solutions for the training problems, combine the solutions with the problems, and attain nine corpus of text (i.e. one for each task and one that concatenating all the text). We then fine-tune OPT on the nine corpus separately. However, we find that fine-tuning did not elicit the graph reasoning abilities of OPT-2.7B: the generated text is mostly meaningless, falling short of answering questions and following formats. We leave it to future work on fine-tuning larger language models to elicit graph reasoning abilities due to our limitations in computational resources.
E.3 Qualitative Analysis with GPT-3.5-TURBO and GPT-4
Due to monetary costs, we only conduct qualitative analysis on GPT-3.5-TURBO and GPT-4 with 19 representative problems across the eight tasks. We provide the results in Table 11, Table 12, Table 13, Table 14, Table 15. Results demonstrate that while GPT-4 does present better graph reasoning abilities, it is still far from being a robust reasoner towards graph-based problems.