JuliaDiff / JuliaDiff/ChainRulesCore.jl

The Representation Problem: semantic types, vs computational types

Open
#73 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
267
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Types get used in many ways, especially in Julia.
We can for this discussion break them down into two kinds.
Either a semantic use:for example the Int 5 in fill(x, 5)
or computational convience use, e.g. the Int 5 in exp2(5),
where it is just much faster to compute exp2 if your input is a Int.

In the semantic use, that Int has no derviative, it differential is DoesNotExist.
Or the singleton differential.

Where as in the computational convience case, the Int has a deriviative it's exp2(5)*log(2).

This also occurs for various kinda of (structured) sparsity.
Where you might do for computational convience f(u::AbstactMatrix) = istriu(u) ? f(UpperTrriangular(u)) : ...
Its important not to allow pertubations on the structual zeros of sparse types, when those have semantic meaning.
But when they don't then you should allow them to be perturbed.

idk if this affects us directly.
It might be something to document.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing the existing ChainRulesCore documentation and conventions for semantic versus computational types, then determine whether the distinction can be documented and what examples would establish the intended derivative behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.