HackMD
    • Create new note
    • Create a note from template
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • Customize slides
    • Note Permission
    • Read
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Write
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Commenting & Invitee
    • Publishing
      Please check the box to agree to the Community Guidelines.
      Everyone on the web can find and read all notes of this public team.
      After the note is published, everyone on the web can find and read this note.
      See all published notes on profile page.
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions and GitHub Sync
    • Transfer ownership
    • Delete this note
    • Note settings
    • Template
    • Save as template
    • Insert from template
    • Export
    • Dropbox
    • Google Drive Export to Google Drive
    • Gist
    • Import
    • Dropbox
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Note settings Sharing Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Transfer ownership Delete this note
Export
Dropbox Google Drive Export to Google Drive Gist
Import
Dropbox Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Comment & Invitee
Publishing
Please check the box to agree to the Community Guidelines.
Everyone on the web can find and read all notes of this public team.
After the note is published, everyone on the web can find and read this note.
See all published notes on profile page.
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with GitHub
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
###### tags: `deep models` `one-offs` # Compositional Construction of Functions with Higher-Order Monotonicity Properties **Overview**: In this note, I describe some approaches to parametrising functions which have the property of 'higher-order monotonicity', i.e. that a finite number of derivatives of the function are nonnegative. This is related to recent developments in the design of neural networks which are convex functions. ## Compositional Parametrisation of Functions In light of the success of deep learning-based methods in recent years, there is substantial interest in parametrising the solutions to various tasks with neural networks. An essential aspect of neural networks is their *compositional nature*; that is, they are constructed as the composition of many elementary functions, i.e. \begin{align} f(x) = f_{L} \circ f_{L-1} \circ \cdots f_{1} \end{align} where for $1 \leqslant \ell \leqslant L$, we take $f_{\ell} (x) = \sigma(A_\ell x + b_\ell)$ for some matrix $A_\ell$, some vector $b_\ell$, and some fixed 'activation function' $\sigma$, e.g. $\sigma(x) = \max(x, 0)$. A challenge of the compositional paradigm is that it is qualitatively different to the classical approach of parametrising functions as being in the span of some linear basis. As such, enforcing structural constraints on the composite function $f$ requires new approaches, but also poses new opportunities. ## Higher-Order Monotonicity Let $K \in \mathbf{N}$. Define the class of $K$-monotone functions on $\mathbf{R}$ to be \begin{align} \mathcal{F}_K = \{ f \in C^K (\mathbf{R}) : D^k f(x) \geqslant 0 \text{ on } \mathbf{R} \text{ for } 1 \leqslant k \leqslant K\}. \end{align} Note that $k = 0$ is *not* included in the definition, i.e. the functions in this class need not be nonnegative. For simplicity, I have also assumed that $D^K f$ is continuous; in principle, this assumption could be removed. These function classes are **not** vector spaces, but they are convex (more precisely, they form a convex cone). Note also that these classes are nested, i.e. \begin{align} \mathcal{F}_1 \subsetneq \mathcal{F}_2 \subsetneq \cdots \end{align} and their union is known as the class of absolutely-monotone functions. For some concrete examples, * $\mathcal{F}_1$ is the class of nondecreasing functions on $\mathbf{R}$, and * $\mathcal{F}_2$ is the class of nondecreasing, convex functions on $\mathbf{R}$. Note that all sufficiently-smooth one-dimensional convex functions can be written as $f(x) = g(x) + h (-x)$ where $g, h \in \mathcal{F}_2$. There is extensive work in the statistical literature on nonparametric regression under both monotonicity and convexity constraints. It can be demonstrated that by making these structural assumption, one can construct estimators with improved rates of convergence. Moreover, there are many applications for which these assumptions are natural. For $K \geqslant 3$, the statistical relevance is not as clear to me, but one can expect that similar theoretical results should apply. From the compositional viewpoint, these classes are very nice, due to the following lemma. **Lemma**: Let $K \in \mathbf{N}$, and let $f, g \in \mathcal{F}_K$. Then $f \circ g \in \mathcal{F}_K$. **Proof**: Faà di Bruno's formula tells us that the $k^\text{th}$ derivative of $f \circ g$ can be written as a polynomial in $\{ (D^m f) \circ g \}_{1 \leqslant m \leqslant k} \cup \{ D^m g\}_{1 \leqslant m \leqslant k}$ with nonnegative coefficients, i.e. \begin{align} \left( D^k ( f \circ g) \right)(x) = \sum_{\mathbf{i}, \mathbf{j}} \alpha_{\mathbf{i}, \mathbf{j}} \cdot \prod_{1 \leqslant m \leqslant k} (D^m f) (g(x))^{i_m} \cdot \prod_{1 \leqslant n \leqslant k} (D^n g) (x)^{j_n} \end{align} with $\alpha_{\mathbf{i}, \mathbf{j}} \geqslant 0$. By assumption, for $1 \leqslant m, n \leqslant K$, it holds for all $x \in \mathbf{R}$ that $(D^m f) (g(x)) \geqslant 0, (D^m g) (x) \geqslant 0$, from which it follows that $\left( D^k ( f \circ g) \right)(x) \geqslant 0$ for $1 \leqslant k \leqslant K$. The result follows. ## An Explicit Construction We now turn to explicitly parametrising functions in $\mathcal{F}_K$. Suppose that we fix an activation function $\sigma \in \mathcal{F}_K$, e.g. $\sigma(x) = \max(x, 0)^K$ (ignoring for now the discontinuity in the $K^\text{th}$ derivative). By elementary considerations, we know that for any $a \geqslant 0, b \in \mathbf{R}$, it holds that $x \mapsto \sigma(ax+b)$ is also in $\mathcal{F}_K$. As such, we can take \begin{align} \mathbf{a}_1 = ( a_{1,1}, a_{1, 2}, \ldots, a_{1, N_1} ) &\in \mathbf{R}_{\geqslant 0}^{N_1} \\ \mathbf{b}_1 = ( b_{1,1}, b_{1, 2}, \ldots, b_{1, N_1} ) &\in \mathbf{R} \end{align} and define \begin{align} f_1 &: \mathbf{R} \to \mathbf{R}^{N_1} \\ &: x \mapsto \sigma ( \mathbf{a}_1 x + \mathbf{b}_1 ) \end{align} where $\sigma$ is applied coordinate-wise. Now, since each component of $f_1$ is in $\mathcal{F}_K$, we can apply this construction recursively. Let $\mathbf{A}_2 \in \mathbf{R}_{\geqslant 0}^{N_1 \times N_2}, \mathbf{b}_2 \in \mathbf{R}^{N_2}$, and define \begin{align} f_2 &: \mathbf{R}^{N_1} \to \mathbf{R}^{N_1 \times N_2} \\ &: x \mapsto \sigma ( \mathbf{A}_2 x + \mathbf{b}_2 ). \end{align} Our earlier results guarantee that the components of $f_2 \circ f_1$ will again be elements of $\mathcal{F}_K$. Constructing $f_3, \ldots, f_L$ in a similar fashion, we end up with a map $f_L \circ \cdots \circ f_1 : \mathbf{R} \to \mathbf{R}^{N_l}$. To recover a one-dimensional map $F \in \mathcal{F}_K$, it suffices to take some $\mathbf{a}_\text{Last} \in \mathbf{R}_{\geqslant 0}^{N_L}$ and define \begin{align} F(x) = \langle \mathbf{a}_\text{Last}, \left( f_L \circ \cdots \circ f_1 \right) (x) \rangle. \end{align} ## Residual Connections and ODE Flows In conventional neural networks, a popular module is the so-called 'residual connection', given by \begin{align} \text{Res}_{\varepsilon, F} (x) = x + \varepsilon F (x). \end{align} This allows the evolution of the state along the evaluation of the neural network to be more gradual, and can improve certain aspects of the optimisation problem. A similar technique can be applied here. Suppose that $x \in \mathbf{R}$, and $F \in \mathcal{F}_K$. Because $x \mapsto x \in \mathcal{F}_K$ for all $K \geqslant 1$ and $\mathcal{F}_K$ is a convex cone, it is straightforward to deduce that $\text{Res}_{\varepsilon, F} \in \mathcal{F}_K$ as well. A common trick in this area is to consider taking $\varepsilon \to 0$ in the above formulation, and recover an ordinary differential equation. In our context, this would correspond to an ODE \begin{align} \dot{x} = F(x, t) \end{align} where for each $t \geqslant 0$, the mapping $x \mapsto F (x, t)$ is an element of $\mathcal{F}_K$. A byproduct of our earlier analysis is that for any $t \geqslant 0$, the ODE flow which maps $x(0)$ to $x(t)$ is itself an element of $\mathcal{F}_K$. ## Towards High Dimensions The above constructions are very clean, at least partially because they are essentially one-dimensional in nature. While convex mappings from $\mathbf{R}^d$ to $\mathbf{R}$ exist, they cannot be composed in such interesting ways, and one eventually returns to dealing with convex mappings from $\mathbf{R}$ to itself. This seems to be roughly what happens in the line of research on Input-Convex Neural Networks, though it is not always framed this way. An exciting avenue is to develop multivariate notions of (higher-order) monotonicity which behave nicely under composition. I am not yet aware of such notions which are practically relevant.

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lost their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.


Upgrade

All
  • All
  • Team
No template found.

Create custom template


Upgrade

Delete template

Do you really want to delete this template?

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Tutorials

Book Mode Tutorial

Slide Mode Tutorial

YAML Metadata

Contacts

Facebook

Twitter

Discord

Feedback

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync

Sign in to link this note to GitHub Learn more
This note is not linked with GitHub Learn more
 
Add badge Pull Push GitHub Link Settings
Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub

      Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

       Sign in to GitHub

      HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully