In 2019, the AI community was abuzz with excitement when François Chollet introduced a groundbreaking concept in his paper “On the Measure of Intelligence” (ar5iv). This work unveiled the Abstraction and Reasoning Corpus (ARC), an innovative benchmark designed to test the general intelligence of AI systems. Think of ARC as an IQ test for AI—it challenges machines to solve problems in ways that mimic human thinking and reasoning.
Unlike traditional AI tests, which often rely on vast amounts of data and specific tasks, ARC pushes AI to understand and apply abstract concepts, much like how a child learns through experience and intuition. The tasks in ARC are presented as grids of colored squares, and while they may seem simple, solving them requires deep understanding and insight.
My Encounter with ARC
When I first stumbled upon ARC in 2019, I was instantly captivated by the unique challenge it presented. However, I wasn’t deeply involved in coding at the time, so I had to set my curiosity aside. Fast forward to today, and I’ve spent the last few years immersed in various programming languages (Python, Elixir, TypeScript), exploring the cutting-edge developments in AI (large language models, generative models, agents), and enhancing my mathematical toolkit (polynomials, functions, transformations).
Now, equipped with this enriched skill set, I have decided to revisit ARC with a fresh mind. My goal is to apply modern AI concepts and some interesting math techniques to these abstract reasoning tasks.
What is the ARC Corpus?
The Abstraction and Reasoning Corpus (ARC) is a dataset meticulously crafted to highlight the disparity between human and machine learning capabilities. Introduced by François Chollet in 2019, ARC comprises 1000 tasks that necessitate abstract reasoning (Papers with Code) (Lab42). Each task is presented with a series of input-output pairs (training examples) and novel inputs (test cases) for which the system must predict the outputs.
Unlike traditional AI benchmarks that emphasize specific tasks, ARC challenges algorithms to decipher and apply abstract reasoning from minimal demonstrations, pushing the boundaries of machine intelligence.
ARC’s uniqueness lies in its emphasis on core knowledge—understanding concepts that young children naturally acquire, such as object permanence and spatial relationships. This focus makes ARC a true test of general intelligence, pushing AI systems to adapt and apply reasoning in unfamiliar contexts.
Example Task – Pattern Expansion
Let’s dive into an intriguing ARC task to illustrate the abstract reasoning required to solve these problems. Here’s a visual representation of the task:

In this task, the input grid contains small, simple patterns that need to be expanded into larger, more complex patterns in the output grid. On the left side, you see two examples of input and output. On the right side, you see the input, but the output is blank. The output answer can be a grid of any size with dimensions ranging from 1×1 to 30×30, and can contain 10 different colors. The correct answer will have the appropriate grid size and the correct coloring on each cell.
To us humans, the pattern might seem obvious. Even a child could take the time to figure out the answer. You can try it yourself here and see if you can determine the rule that transforms the input into the output.
You can also try the other ARC Task problems here: https://liusida.github.io/ARC/

Example 1:
- Input: An orange-red cross pattern on a black grid.
- Output: The orange-red cross expands into a larger orange and red pattern.

Example 2:
- Input: A cyan-pink cross pattern on a black grid.
- Output: The cyan-pink cross expands into a larger cyan and pink pattern.
To solve this, we need to understand the underlying transformation rule. Here’s the thought process:
- Identify the basic shape: Both input grids contain a cross pattern.
- Recognize the expansion rule: The cross pattern expands uniformly, with additional colors added to form a larger pattern.
How do machines solve ARC?
Here’s a summary of the general approaches to solving ARC tasks, their challenges, benefits, and examples:
| Approach | Description | Challenges | Benefits | Example | Resources |
|---|---|---|---|---|---|
| Rule-Based Systems | Encode explicit rules for transformations. | Limited to tasks with clear, simple rules. | Easy to implement and understand for simple tasks. | Transforming a blue square to a red square based on a predefined rule: “If blue, change to red.” | Rule-Based Systems |
| Machine Learning Models | Rely on large datasets for training to infer patterns from input-output pairs. | Requires substantial tuning; may not generalize well. | Can handle complex patterns if trained correctly. | Using a neural network to identify and predict grid transformations. | Machine Learning |
| Symbolic Reasoning | Represent tasks in a formal language and apply logical rules to solve them. | Requires robust formal language and logical reasoning capabilities. | Suitable for tasks needing clear logical transformations. | Rotating a shape 90 degrees by applying logical transformations to each cell in the grid. | Symbolic AI |
| Program Synthesis | Generate programs to transform input grids into output grids using search algorithms or genetic programming. | Computationally intensive; requires sophisticated search algorithms. | Can discover novel solutions through program generation. | Generating a sequence of operations like “rotate” and “flip” to achieve the desired output. | Program Synthesis |
| Graph-Based Methods | Represent the grid as a graph where cells are nodes and edges represent relationships between cells. | Requires effective graph representation and manipulation techniques. | Captures spatial relationships and patterns effectively. | Identifying a connected component in the grid and applying transformations to all nodes in that component. | Graph Theory |
| Evolutionary Algorithms | Use principles of natural selection to evolve solutions to problems. | Can be slow and computationally expensive. | Can explore a wide range of solutions and adapt over time. | Evolving a population of potential solutions and selecting the best-performing ones iteratively. | Evolutionary Algorithms |
| Constraint Satisfaction | Define a set of constraints that the solution must satisfy and use algorithms to find solutions that meet these constraints. | Requires effective constraint definition and solving techniques. | Ensures solutions meet predefined criteria. | Defining constraints based on the colors and positions of cells and searching for valid transformations. | Constraint Satisfaction |
| Generative Models | Use generative adversarial networks (GANs) to generate plausible transformations of the input grid. | Training generative models can be complex and computationally intensive. | Can generate diverse and creative solutions. | A GAN generating transformed grids that match the style of output grids in the training examples. | Generative Adversarial Network |
| Transfer Learning | Use knowledge gained from solving one task to help solve another related task. | Requires careful selection of tasks for effective transfer learning. | Leverages existing knowledge to improve performance on new tasks. | A model trained to recognize and transform geometric patterns transferring this knowledge to solve new tasks involving similar patterns. | Transfer Learning |
Challenges in Solving ARC Tasks
- Understanding Patterns: Recognizing the underlying patterns and rules in the input-output pairs.
- Generalization: Developing solutions that can generalize from minimal examples to new, unseen tasks.
- Complexity: Managing the wide variety of tasks presented in the ARC dataset, each requiring unique reasoning and transformations.
- Efficiency: Implementing solutions that are computationally efficient and can process large grids within a reasonable time frame.
My Approaches to Solving ARC
Given the complex and abstract nature of ARC tasks, I have decided to explore a variety of approaches, each leveraging different aspects of modern AI and mathematical techniques. Here are nine approaches I plan to try in the next few months, along with some insights into their potential benefits and challenges. Each approach belongs to one or more broad families of AI methodologies.
1. Polynomials
- Family: Mathematical Representation, Symbolic Reasoning
- Description: Representing grids as polynomials and applying mathematical transformations.
- Why It’s Interesting: Polynomials can compactly encode complex relationships and transformations, allowing for efficient manipulation and elegant solutions to pattern recognition and transformation tasks.
- Benefits: Offers a new way to think about grid transformations using algebraic operations, potentially simplifying complex transformations.
- Challenges: Requires effective encoding and decoding of grid patterns as polynomials, and developing intuitive polynomial transformations can be complex.
2. Large Language Models (LLMs)
- Family: Machine Learning, Generative Models
- Description: Utilizing models like GPT-3 to generate potential transformations based on input-output pairs.
- Why It’s Interesting: LLMs can understand and generate human-like text, which can be used to interpret and describe transformations in natural language.
- Benefits: Capable of generating creative solutions and understanding complex instructions.
- Challenges: May struggle with precise and deterministic transformations required by ARC tasks (ar5iv) (OpenReview).
3. Geometry
- Family: Geometric Transformations, Spatial Reasoning
- Description: Using geometric transformations to manipulate and recognize patterns in the grids.
- Why It’s Interesting: Many ARC tasks involve spatial relationships and symmetry, making geometric approaches naturally suited for these problems.
- Benefits: Effective for tasks involving rotations, reflections, and other spatial manipulations.
- Challenges: Complex geometric transformations can be difficult to implement and generalize.
4. Symbolic Reasoning
- Family: Symbolic AI, Logic-Based Systems
- Description: Implementing logical rules and symbolic reasoning to solve tasks.
- Why It’s Interesting: Symbolic reasoning mimics human logical thinking, making it powerful for tasks requiring explicit rule application.
- Benefits: Suitable for tasks that require clear logical transformations.
- Challenges: Requires robust formal language and logical reasoning capabilities (AAAI).
5. Program Synthesis
- Family: Automated Programming, Search Algorithms
- Description: Generating programs to automate transformations.
- Why It’s Interesting: Program synthesis can discover novel solutions by automatically generating and testing code snippets.
- Benefits: Can create custom solutions tailored to specific tasks.
- Challenges: Computationally intensive and requires sophisticated search algorithms (Lab42).
6. Graph-Based Methods
- Family: Graph Theory, Spatial Reasoning
- Description: Leveraging graph theory to capture spatial relationships.
- Why It’s Interesting: Representing grids as graphs allows for the use of powerful graph algorithms to identify patterns and apply transformations.
- Benefits: Captures spatial relationships and patterns effectively.
- Challenges: Requires effective graph representation and manipulation techniques (Scott Sanner’s D3M Research Group).
7. Evolutionary Algorithms
- Family: Optimization, Bio-inspired Algorithms
- Description: Evolving solutions through iterative improvement.
- Why It’s Interesting: Mimics natural selection to iteratively improve solutions, potentially discovering innovative transformations.
- Benefits: Can explore a wide range of solutions and adapt over time.
- Challenges: Can be slow and computationally expensive (Scott Sanner’s D3M Research Group).
8. Constraint Satisfaction
- Family: Constraint-Based Reasoning, Optimization
- Description: Defining and solving constraints to find valid transformations.
- Why It’s Interesting: Ensures solutions meet predefined criteria, which is essential for maintaining the integrity of transformations.
- Benefits: Ensures solutions are valid and meet specific requirements.
- Challenges: Requires effective constraint definition and solving techniques (Scott Sanner’s D3M Research Group).
9. Generative Models
- Family: Generative Adversarial Networks (GANs), Deep Learning
- Description: Using GANs and other generative models to create solutions.
- Why It’s Interesting: Can generate diverse and creative solutions by learning the distribution of input-output pairs.
- Benefits: Capable of producing high-quality, varied transformations.
- Challenges: Training generative models can be complex and computationally intensive (OpenReview).
Focus on Polynomial Representation
Among the various approaches to solving ARC tasks, representing the grid using polynomials is particularly intriguing. This method involves encoding each cell as a term in a multivariate polynomial, with the coefficients representing colors and the exponents representing the coordinates. This approach allows for elegant mathematical transformations and provides a unique perspective on the problem.
Why Polynomials?
Polynomials are powerful mathematical tools that can represent complex relationships in a compact form. By encoding grid patterns as polynomials, we can leverage algebraic operations to perform transformations. For instance, rotating a grid or scaling a pattern can be achieved through polynomial manipulation. This method not only simplifies the computational process but also offers a new way to think about pattern transformations.
Implementation in Elixir
Let’s illustrate how polynomial representation can be applied to an ARC task using Elixir. We’ll walk through how to represent a grid as polynomials and then perform transformations using these representations.
Step 1: Encoding the Grid as Polynomials
Consider a grid where each cell is represented by a pair of coordinates (x,y)(x, y)(x,y) and a color value ccc. For example, in a 3×3 grid:
Input Grid:
1 0 2
0 3 0
4 0 5
We can represent this grid as a polynomial where each term corresponds to a cell in the grid:
Elixir Code to Encode Grid as Polynomials:
elixirCopy codedefmodule ARCPolynomial do
# Function to encode a grid as a polynomial
def encode_grid(grid) do
for {row, y} <- Enum.with_index(grid),
{value, x} <- Enum.with_index(row),
value != 0 do
{value, x, y}
end
end
# Function to create a polynomial from encoded terms
def create_polynomial(terms) do
fn x, y -> Enum.reduce(terms, 0, fn {value, px, py}, acc -> acc + value * :math.pow(x, px) * :math.pow(y, py) end) end
end
end
# Example usage
input_grid = [
[1, 0, 2],
[0, 3, 0],
[4, 0, 5]
]
terms = ARCPolynomial.encode_grid(input_grid)
polynomial = ARCPolynomial.create_polynomial(terms)
Step 2: Defining and Applying Transformations
To expand a cross pattern, we define transformations that modify the polynomial representation. For instance, to expand the cross, we add terms that represent the new cells created by the expansion.
Elixir Code to Transform and Evaluate Polynomials:
elixirCopy codedefmodule ARCPolynomial do
# ... (previous code)
# Function to expand the cross pattern
def expand_cross(polynomial, size) do
expand_rules = fn x, y ->
if polynomial.(x, y) != 0 do
[
{polynomial.(x, y), x, y},
{polynomial.(x, y), x + 1, y},
{polynomial.(x, y), x - 1, y},
{polynomial.(x, y), x, y + 1},
{polynomial.(x, y), x, y - 1}
]
else
[]
end
end
for y <- 0..(size-1), x <- 0..(size-1), reduce: [] do
acc -> acc ++ expand_rules.(x, y)
end
|> Enum.uniq()
|> create_polynomial()
end
# Function to evaluate the polynomial on the grid
def evaluate_polynomial(polynomial, size) do
for y <- 0..(size-1), x <- 0..(size-1) do
round(polynomial.(x, y))
end
|> Enum.chunk_every(size)
end
end
# Example usage
expanded_polynomial = ARCPolynomial.expand_cross(polynomial, 3)
output_grid = ARCPolynomial.evaluate_polynomial(expanded_polynomial, 3)
Implementation in Python
Let’s also illustrate how polynomial representation can be applied to an ARC task using Python.
Step 1: Encoding the Grid as Polynomials
Python Code to Encode Grid as Polynomials:
pythonCopy codeimport numpy as np
def encode_grid(grid):
terms = []
for y, row in enumerate(grid):
for x, value in enumerate(row):
if value != 0:
terms.append((value, x, y))
return terms
def create_polynomial(terms):
def polynomial(x, y):
return sum(value * (x ** px) * (y ** py) for value, px, py in terms)
return polynomial
# Example usage
input_grid = [
[1, 0, 2],
[0, 3, 0],
[4, 0, 5]
]
terms = encode_grid(input_grid)
polynomial = create_polynomial(terms)
Step 2: Defining and Applying Transformations
Python Code to Transform and Evaluate Polynomials:
pythonCopy codedef expand_cross(polynomial, size):
expand_rules = lambda x, y: [
(polynomial(x, y), x, y),
(polynomial(x + 1, y), x + 1, y),
(polynomial(x - 1, y), x - 1, y),
(polynomial(x, y + 1), x, y + 1),
(polynomial(x, y - 1), x, y - 1)
] if polynomial(x, y) != 0 else []
terms = []
for y in range(size):
for x in range(size):
terms.extend(expand_rules(x, y))
terms = list(set(terms)) # Remove duplicates
return create_polynomial(terms)
def evaluate_polynomial(polynomial, size):
grid = np.zeros((size, size), dtype=int)
for y in range(size):
for x in range(size):
grid[y, x] = round(polynomial(x, y))
return grid
# Example usage
expanded_polynomial = expand_cross(polynomial, 3)
output_grid = evaluate_polynomial(expanded_polynomial, 3)
print(output_grid)
Conclusion
In future blog posts, I will delve deeper into the polynomial approach to solving ARC tasks, documenting the methods, challenges, and results. Stay tuned for detailed explorations and insights into how this mathematical representation can unlock new possibilities for abstract reasoning in AI.
Meanwhile you can try the ARC Task problems here: https://liusida.github.io/ARC/ and also check out https://arcprize.org/.
TS
04.06.24

Leave a Reply