liveBook · Manning

Non-Euclidean space

As explained in Knowledge Graphs and LLMs in Action

A non-Euclidean space is a geometric space whose distance or curvature properties differ from those of ordinary flat Euclidean space.

Non-Euclidean space provides a geometric setting for data whose relationships do not follow uniform, flat-grid structure. It is especially relevant to graph embeddings, where nodes can have different numbers of neighbors and irregular local neighborhoods. section 11.1.1

Key contrasts with Euclidean space include:

  • Euclidean space measures distance with straight lines and the Pythagorean theorem, representing objects as coordinate vectors. section 11.1.1
  • Euclidean space suits relationships that remain uniform across position or scale; graph neighborhoods often violate that regularity. section 11.1.1
  • Hyperbolic space expands exponentially outward, making it particularly suitable for representing hierarchical or tree-like graph structures. section 11.1.1

From pixels to graph nodes

Image pixels generally have a predictable neighborhood, while graph nodes may have widely varying connections. An embedding method can therefore choose geometry whose distances preserve the graph relationships that matter. section 11.1.1 section 11.8

Figure 11.2 Euclidean vs. non-Euclidean space [3]. Pixels in an image are all equally distant from each other and have eight neighbors (except those on the border). In a graph, the number of neighbors can vary enormously from one node to another.
figure

Compare regular pixel neighborhoods with graph neighborhoods whose connection counts and structures vary from node to node. section 11.1.1

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Defines Euclidean and non-Euclidean geometry through distances, neighborhood regularity, and growth rates, without formal metric derivations.
Examples
Uses image pixels, graph neighborhoods, branching trees, and multidimensional embeddings to contrast geometric behavior.
What you can do after
Evaluate whether hierarchical graph data may be better represented in hyperbolic rather than Euclidean space.
How it connects
Connects non-Euclidean space to graph embeddings, hyperbolic space, hierarchical data, and graph representation learning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.