Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

Author: torontoai

[R] Beyond Vector Spaces: Compact Data Representations Differentiable Weighted Graphs

[R] Beyond Vector Spaces: Compact Data Representations Differentiable Weighted Graphs

Paper: https://arxiv.org/abs/1910.03524 (NeurIPS 2019)

Code: https://github.com/stanis-morozov/prodige

The paper proposes an embedding layer based on weighted graph instead of vectors. Intuitively, this layer learns to represent concepts/words by their relation to other. Trains by backprop w.r.t. graph edges.

(Left) PRODIGE learned on a subset of MNIST. (Right) zoom-in of some clusters.

  • + Learns interpretable hierarchies from raw objects;
  • + The model is much smaller than typical vector embeddings;
  • The official code is CPU-only, it aint too fast

Interactive version of the plot above: https://neurips-anonymous.github.io/index.html

submitted by /u/justheuristic
[link] [comments]

[P] RL library focusing on easy experimental research with cloud experiment management

Hi everyone,

I have created a yet another reinforcement learning library. https://github.com/vwxyzjn/cleanrl

This repository focuses on a clean and minimal implementation of reinforcement learning algorithms. The highlights features of this repo are:

  • Most algorithms are self-contained in single files with a common dependency file common.py that handles different gym spaces.
  • Easy logging of training processes using Tensorboard and Integration with wandb.com to log experiments on the cloud. Check out https://app.wandb.ai/costa-huang/cleanrltest.
  • Easily customizable and being able to debug directly in Python’s interactive shell.
  • Convenient use of commandline arguments for hyper-parameters tuning.

Currently I support A2C, PPO, and DQN. If you are interested, please consider giving it a try 🙂

Motivation:

There are two types of RL library on the two ends of the spectrum. The first one is the demo kind that really just demos what the algorithm is doing, only deals with one gym environment and hard to record experiments and tune parameters.

On the other end of the spectrum, we have OpenAI/baselines, ray-project/ray, and couple google repos. My personal experience with them is that I could only run benchmark with them. They try to write modular code and employ good software engineering practices, but the problem is python is a dynamic language without IDE support. As a result, I had no idea what variable types in different files are and it was very difficult to do any kind of customization. I had to see through dozens of files before even able to try some experiments.

That’s why I created this repo that leans towards the first kind, but has more actual experimental support. I support multiple gym spaces (still working on it), command line arguments to tune parameters, and very seamless experiment logging, all of which are essential characteristics for building a pipeline for research I believe.

submitted by /u/vwxyzjn
[link] [comments]

[D] Best Foundational Textbooks

I want to start building a foundation in machine learning to ultimately do research in the intersection of machine learning and economics/finance. Would The Elements of Statistical Learning (Hastie et. al. 2009) be the best place to start? I fear that the text may be outdated in 2019, but I’m coming to ML with only econometric/statistical knowledge.

Also, would An Introduction to Statistical Learning with Applications in R (Gareth et al 2017) be too basic for my goals? Are there better texts I should start with than Hastie et al (2009)?

submitted by /u/the_transgressor
[link] [comments]

[D] The State of Machine Learning Frameworks in 2019 (@gradientpub)

Blog post on gradient.pub with quantitative extensive analysis of PyTorch vs TensorFlow adoption in research.

TensorFlow will always have a captive audience within Google/DeepMind, but I wonder whether Google will eventually relax this. Even now, many of the researchers that Google wants to recruit will already prefer PyTorch at varying levels, and I’ve heard grumblings that many researchers inside Google would like to use a framework other than TensorFlow.

In addition, PyTorch’s dominance might start to cut off Google researchers from the rest of the research community. Not only will they have a harder time building on top of outside research, outside researchers will also be less likely to build on top of code published by Google.

https://thegradient.pub/state-of-ml-frameworks-2019-pytorch-dominates-research-tensorflow-dominates-industry/

submitted by /u/sensetime
[link] [comments]

[N] Detectron2: A PyTorch-based modular object detection library

Detectron2: A PyTorch-based modular object detection library

Improvements in Detectron2

PyTorch: The original Detectron was implemented in Caffe2. PyTorch provides a more intuitive imperative programming model that allows researchers and practitioners to iterate more rapidly on model design and experiments. Because we’ve rewritten Detectron2 from scratch in PyTorch, users can now benefit from PyTorch’s approach to deep learning as well as the large and active community that continually improves PyTorch

Modular, extensible design: In Detectron2, we’ve introduced a modular design that allows users to plug custom module implementations into almost any part of an object detection system. This means that many new research projects can be written in hundreds of lines of code with a clean separation between the core Detectron2 library and the novel research implementation. We continue to refine the modular, extensible design by implementing new models and discovering new ways in which we can make Detectron2 more flexible.

submitted by /u/youali
[link] [comments]

Managing multi-topic conversation flows with Amazon Lex Session API checkpoints

In daily conversations, you often jump back and forth between multiple topics. For example, when discussing a home improvement project related to new windows and curtains, you might have questions like, “How about closing out on curtain styles and then revisiting colors?” When AWS launched Amazon Lex Session API, you learned how to address such digressions in the conversation. You can use Session API actions to switch an intent and continue the conversation. But in everyday interactions, you might have to deal with multiple digressions: “Let’s finish selecting windows before we get to curtains.”

How do you design conversation flows that contain a series of digressions? If you are like me, you’d have a dozen questions before even considering a specific product in a home improvement project.

With session checkpoints, you can easily design a conversation to support a switch to one of many topics. You can model the home improvement conversation as two intents: OrderWindows and OrderCurtains.  Now it is easy to switch topics. The flows for OrderWindows would have a checkpoint. If the user is ordering curtains but wants to complete selecting windows first, you could move the conversation back to the OrderWindows using “windowSelection” checkpoint.

Managing session checkpoints

The Amazon Lex runtime API provides operations that enable you to manage session checkpoints for a conversation. The PutSession and GetSession calls enable you to define and retrieve checkpoints.  Here’s how you can use the APIs to manage the conversation flows described earlier. Please review the bot schema for bot details.

Follow these steps to manage the conversation flow:

  1. Store the current state of the conversation
  2. Retrieve the previously stored state and continue the conversation

Store the current state of the conversation

Call the GetSession API with no filters to retrieve the current state of the conversation between your bot and the user. The GetSession API call is followed by a PutSession API call, which applies a checkpoint ‘windowSelection’ onto the OrderWindows intent. The PutSession call is shown in the code example:

PutSession Request:  Applying 'windowSelection' checkpoint on 'OrderWindows' intent

response = client.put_session (
	botName='HomeImprovementBot',
	botAlias='Prod',
	userId='abc1234',
	recentIntentSummaryView=[
	  {
	    "intentName": "OrderCurtains",
	    "slots": {
	      "curtainSize": "None",
	      "curtainStyle": "None"
	    },
	    "confirmationStatus": "None",
	    "dialogActionType": "ElicitSlot",
	    "slotToElicit": "curtainSize",
	    "checkpointLabel": "None"
	  },
	  {
	    "intentName": "OrderWindows",
	    "slots": {
	      "windowSize": "large",
	      "windowStyle": "None"
	    },
	    "confirmationStatus": "None",
	    "dialogActionType": "ElicitSlot",
	    "slotToElicit": "windowStyle",
	    "checkpointLabel": "windowSelection"
	  }
	]
)

Retrieve the previously stored state

At this point, the OrderCurtains intent has completed. Issue a GetSession API call, while passing a ‘windowSelection’ checkpointLabelFilter. This call results with the matching intent (OrderWindows), which received the checkpoint label in the previous step.

Continue with the conversation

Finally, issue a PutSession API call, setting the next step in the conversation to be continued where the user left off in OrderWindows. The following code example lists the details for GetSession:


GetSession Request:  Filtering on 'windowSelection' CheckpointLabel

--- GetSession Request with filter: ---
 
response = client.get_session(
	botName='HomeImprovementBot',
	botAlias='Prod',
	userId='abc123',
	checkpointLabelFilter='windowSelection'
)

--- Filtered GetSession Response: --- 
{
  "recentIntentSummaryView": [
    {
      "intentName": "OrderWindows",
      "slots": {
        "windowSize": "large",
        "windowStyle": "None"
      },
      "confirmationStatus": "None",
      "dialogActionType": "ElicitSlot",
      "slotToElicit": "windowStyle",
      "checkpointLabel": "windowSelection"
    }
  ],
  "sessionAttributes": {},
  "sessionId": "XXX",
  "dialogAction": {
    "type": "ElicitSlot",
    "intentName": "OrderCurtains",
    "slots": {
      "curtainSize": "None",
      "curtainStyle": "None"
    },
    "slotToElicit": "curtainSize"
  }
}

Getting started with Session API checkpoints

In this post, you learned how to use Session API checkpoints to manage multiple digressions. You can define Session API checkpoints using the AWS SDK. You can download the bot schema for the conversation in this post to implement a quick application. For more information, see the Amazon Lex documentation.


About the Author

Shahab Shekari works as a Software Development Engineer at Amazon AI. He works on scalable distributed systems and enhancing Lex user experiences. Outside of work, he can be found traveling and enjoying the Pacific Northwest with his dogs, friends and family.