Source

Fatemi et al. (2023), LIT-807. Read as NOTE-409.

The practice

The comparison is LIT-807’s. Fatemi, Halcrow and Perozzi wrote the same graphs as text in nine ways. They asked PaLM 62B and four sizes of PaLM 2 six basic questions with five prompting methods. Its “incident” encoding writes one line per node, listing that node’s neighbours. On PaLM 62B it beats the plain edge list on both neighbourhood questions under every prompting method. On connected nodes the scores are 53.8 against 19.8 zero-shot and 41.0 against 20.6 with CoT-BAG. On node degree they are 25.0 against 12.4 zero-shot and 75.2 against 66.8 with CoT-BAG (Table 1). On PaLM 2 L zero-shot the gap is 88.0 against 55.6 on connected nodes and 85.0 against 49.6 on degree (Table 11). Encodings with people’s names do far worse on both: 4.0–8.8 on connected nodes and 14.6–17.8 on degree with CoT, on PaLM 62B.

  • One line per node, listing its neighbours, when the question is about a node’s neighbours, degree, or anything computed from them
  • Integer node ids when the answer is a number. Names help only some yes/no questions, and not reliably
  • Re-check the choice for each task. For edge count, the edge list is better: 36.8 against 6.6 on PaLM 2 L zero-shot, and 25.2 against 21.4 on PaLM 62B with CoT
  • State the prompting method with the encoding. Ranked over all six tasks, incident is the best encoding under zero-shot CoT, few-shot, CoT and CoT-BAG, and the worst under plain zero-shot (Table 5)

Conditions

  • Not at the smallest scale. On PaLM 2 XXS the edge list matches or beats incident on degree (80.8 against 55.0 with CoT) and on connected nodes zero-shot (17.6 against 11.2). From PaLM 2 XS upwards, and on PaLM 62B, incident leads
  • Small graphs, 5–20 nodes, and basic look-up and counting questions. Whether the format still helps when the neighbour lists run to thousands of tokens is untested
  • It does not rescue questions the format does not make local. Edge existence stays near the majority rate, and listing disconnected nodes is about 0% under every encoding
  • A trained encoder can beat any text format on counting, though not here on neighbour listing. GraphToken (LIT-820) reaches 0.962 on degree and 0.264 on connected nodes, where incident text on PaLM 2 S reaches 81.6. That is a different intervention, and it needs gradient access to the model